| type | slide | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| slideOptions |
|
- Package to write and manage tests.
- Includes command-line interface called
pytest. - All tests need to be in files named
test_*.py. - Each test function needs to be named as
test_*. - pytest gives a detailed description for failing tests.
- Python framework specifically designed to run, monitor and automate unit tests.
- Many features like test automation, sharing of setup and shutdown of tests, etc.
- Use the base class
unittest.TestCaseto create a test suite. MagicMockfromunittest.mockused for mock testing.- Command-line interface:
python -m unittest. - Part of the Python standard library.
- Python library to check code coverage
- Testing frameworks can be run via coverage to generate code coverage data while tests run.
- Code coverage information can be viewed on the terminal using:
coverage report -m.
- Environment orchestrator to setup and execute various tools for a project.
- Creates virtual environments for each process.
- Processes include testing, linting, building, documentation generation, and more.
- Configuration via
tox.tomlortox.inifile.
- nose is an extension to
unittestwith added plugins. - testify based on unittest and nose with additional features.
- robotframework is a generic automation framework.