Skip to content

Running Tests and Continuous Integration

Andrew Lee edited this page Jul 8, 2021 · 3 revisions

When and How to Run Tests

Developers should run the unit and component tests at a minimum before creating a Pull Request in order to avoid test failures on the PR. A PR must pass all tests (including integration tests) before it will be merged, thus it is best to identify these early. It is also a good idea to run the integration tests unless you are certain your changes will not affect the examples - these take a long time to run however, so be judicious when running them. The IDAES tests can be run from a Python command line using the following:

>>> pytest

Running Specific Tests

Pytest can be used to run tests in a specific path or file using:

>>> pytest PATH

Pytest can also be directed to run tests with specific marks:

>>> pytest -m unit  # Only run tests with the "unit" mark
>>> pytest -m "not integration"  # Run all tests in PATH that do not have the "integration" mark

Automated Testing

IDAES Also used automated testing via GitHub Actions to run the test suite on all Pull Requests to the main repository, as well as to run regularly scheduled tests of the current code.

Clone this wiki locally