monarch-initiative / phenogrid

The phenogrid widget
13 stars 14 forks source link

Adding Behave tests and Unit tests #162

Closed yuanzhou closed 9 years ago

yuanzhou commented 9 years ago

Will add python behave tests and javascript unit tests (using npm mocha/thai).

yuanzhou commented 9 years ago

Python behave tests added, and instructions documented.

yuanzhou commented 9 years ago

I think I should categorize the behave tests into generic feature file and config specific feature file. Right now some test scenarios are specific to the configurations and the input phenotypes. We would need to update those scenarios if config changes. Otherwise the tests will fail on Travis CI.

yuanzhou commented 9 years ago

Now in tests/behave we have generic.feature and specific.feature. The specific.feature should be updated according to specific configurations or data input.

yuanzhou commented 9 years ago

Mocha tests added. Mocha is the testing framework, Chai is used for should/expect/assert. Right now we validate the simsearch and ontology (e.g., HPO expansion) JSON data against the desired JSON structure. This can be done using ajax testing later. I'll need to figure out how to make ajax calls in mocha, prob will need to use phantomjs as the testing browser.