Skip to content

Test Coverage

Jeremy Leung edited this page Feb 6, 2021 · 5 revisions

Under consideration...Test coverage of only key components of WESTPA?

Pull requests (PRs) that modify code should either have new tests, or modify existing tests to fail before the PR and pass afterwards. You should run the tests before pushing a PR.

Tests for a module should ideally cover all code in that module, i.e., statement coverage should be at 100%. To measure the test coverage, install pytest-cov and then run:

  $ python runtests.py --coverage

This will create a report in build/coverage, which can be viewed with:

  $ firefox build/coverage/index.html

Below are unit/functional tests that should be passed after making new contributions to your fork of WESTPA. (STUB)

Unit tests:

  • Test ZMQ work manager
  • Test MPI work manager
  • Test simulation manager
  • Test WE driver
  • Test segment manager
  • Test functional bin mapper
  • Test HDF5 data manager
Functional tests:
  • ODLD test of rate-constant calculation
  • ODLD test of creating a probability distribution.
  • OpenMM test of WESTPA interface with a dynamics engine via Python libraries.
  • Amber test of WESTPA interface with a dynamics engine via shell scripts.
  • w_ipa analysis tool test.
  • Plugin test.
Clone this wiki locally