Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Testing #38

Closed
laceysanderson opened this issue Jun 6, 2018 · 7 comments
Closed

Automated Testing #38

laceysanderson opened this issue Jun 6, 2018 · 7 comments
Labels
Community - Feature Request For any issues describing new functionality that users/admin would like added to the module.

Comments

@laceysanderson
Copy link
Member

With #35 I have begun creating PHPUnit tests for this module using the TripalTestSuite. 🎉

This issue is a place to discuss where to start and any other philosophy related to tests :-)

First up, I asked for guidance in #35: specifically,

I would love input on where to go from here! :-) Should I

  1. continue on with more complete testing of the blastdb node (used as the template in the blast form)
  2. test each API function (api/blast_ui.api.inc) independently
  3. focus on the blast form everyone uses ;-p

@bradfordcondon replied with

What would be cool is if you installed blast on the travis environment and somehow thought of a smart way to loop through all the option combos presented in the blastn form and submitted a blast job with them, ensuring no errors. That has some tricky things though (some options are AJAX-dependent).

Otherwise try to focus on the "end points" of the module. So API functions that are true API functions (we expect them to be called by anything else) are great places to start.

Any other input? @ekcannon? I'm tempted to go with the ambitious suggestion by @bradfordcondon since I feel this would be the most useful testing but I also don't want to bite off more then I can chew ;-p

@bradfordcondon
Copy link
Member

I bet we can get blast installed very easily. And we can include a sample blastdb or download one from somewhere in travis if available. Then we would need to run something (a dbseeder I guess?) before testing to configure the blast db.

@laceysanderson
Copy link
Member Author

It's setting up blast on travis that has me worried so if you ever find your tempted to try it I would be very grateful ;-) <3

My intent was to distribute a blast database with the module in the tests directory (pending size) and we already have the blastdb node seeder for configuring it. I figured I would just seed the db in the tests like I did here and submit the form using drupal_form_submit(). I'm really only intimidated about getting blast to run on TravisCI...

@bradfordcondon
Copy link
Member

bradfordcondon commented Jun 6, 2018

OK I'll start a branch to add that. Then we can worry about hooking it up to the module later.

Feel free to add issue and assign me, or I'll just work on it and keep you in the loop.

@laceysanderson
Copy link
Member Author

Awesome! Feel free to use my add-tests branch --that way when you're done you could pass the theoretical baton back to me without needing a merge into master but as always, I'm good with whatever you prefer :-D

@bradfordcondon
Copy link
Member

Downloading blast onto the docker from my computer

docker exec -it t3 bash -c "curl -O ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.30/ncbi-blast-2.2.30+-x64-linux.tar.gz"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  164M  100  164M    0     0  11.3M      0  0:00:14  0:00:14 --:--:-- 10.8M

downloading onto the docker within the travis environment;

docker exec -it tripal bash -c "curl -O ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.30/ncbi-blast-2.2.30+-x64-linux.tar.gz"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:33 --:--:--     0  0     0    0     0    0     0      0      0 --:--:--  0:02:07 --:--:--     0
curl: (55) Send failure: Broken pipe

I either need to figure this out, or simply push the changes to dockerhub and use that image. The problem with the latter solution is when we upgrade the tripal container whatever someone will have to also create a new blast container. Its very straightforward but it would be simpler if we downloaded and installed blast in the travis environment.

@bradfordcondon
Copy link
Member


The command "docker exec -it tripal bash -c "cp /modules/tripal_blast/ncbi-blast-2.2.30+/bin/* /usr/local/bin && cp -r /modules/tripal_blast/ncbi-blast-2.2.30+/data /usr/local/blast-data"" exited with 1.
0.07s$ docker exec -it tripal bash -c "blastp"
BLAST query/options error: Either a BLAST database or subject sequence(s) must be specified
Please refer to the BLAST+ user manual.

got it. for some reason, curl just will not work, but wget is OK. so we download it in the travis env, then move it into bin after it goes into the docker container with the rest of the module.

@bradfordcondon
Copy link
Member

I think this issue is resolved?

@laceysanderson laceysanderson added the Community - Feature Request For any issues describing new functionality that users/admin would like added to the module. label Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community - Feature Request For any issues describing new functionality that users/admin would like added to the module.
Projects
None yet
Development

No branches or pull requests

2 participants