covid19_scenarios
covid19_scenarios copied to clipboard
Add tests
In order to perform refactoring and to add new features with more confidence, we need unit, integration and end-to-end tests for:
-
algorithm parts. See
src/algorithms
-
React parts - components and pages. See
src/components
andsrc/pages
-
State management: redux reducers and sagas. See
src/state
The infrastructure:
-
jest
and@testing-library
are already set up. Unit and integration tests can be ran withyarn test
oryarn test:watch
-
cypress
is planned for e2e tests -
We plan either Travis CI or CircleCI for continuous integration
Any help is appreciated!
@ivan-aksamentov did you already start implementing e2e with cypress? I can help with that.
@Joluma Hi Joël, I haven't started yet. But the e2e testing is probably one of the most valuable things to contribute.
It may be tricky, because many parts of the project are changing rapidly. For example, I have a huge Redux revamp coming soon(ish). We are in process of changing how some of the widgets behave. So the tests will have to be adjusted frequently.
Also, Plots might be somewhat hard to operate automatically. If you have app testability improvements in mind (for the app source code itself), it is very welcome too.
Feel free to try it out!
Some more thoughts on unit and integration tests:
-
The goal is to bring confidence that refactors and new features don't break the results.
-
Most importantly, care should be taken to not produce wrong science in the end! That's people's lives counts, not just numbers we are juggling there.
-
Focusing on testing
run()
function is somewhat pointless, I think. It's an entry point of the algorithm and it has too many parameter combinations and too many possible results to cover. -
Instead, we should focus on writing slightly more granular tests for everything in the
src/algorithms/
directory. -
Overall, in terms of testing, I am in the same camp as Guillermo Rauch (@rauchg) and Kent C. Dodds (@kentcdodds): "Write tests. Not too many. Mostly integration." .
Adding more tests and improving the app testability will ensure that we can expand the app's usability and add more interesting algorithmic features.
Contributions are desperately needed!
I could do the CI building if its not taken.
how can i get the code of this projectSent from my Samsung Galaxy smartphone. -------- Original message --------From: szonjajakab [email protected] Date: 21/03/2020 2:55 pm (GMT+05:30) To: neherlab/covid19_scenarios [email protected] Cc: Subscribed [email protected] Subject: Re: [neherlab/covid19_scenarios] Add tests (#19) I could do the CI building if its not taken.
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/neherlab/covid19_scenarios/issues/19#issuecomment-602018479", "url": "https://github.com/neherlab/covid19_scenarios/issues/19#issuecomment-602018479", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
Hi all,
My partner shijurodhaz and I are cs students who would like to help contribute to this project. Is the area most in need of tests still src/algorithms/,
or is there another area we should focus on first?