ocs_ci.framework.pytest_customization package
Subpackages
Submodules
ocs_ci.framework.pytest_customization.marks module
In this pytest plugin we will keep all our pytest marks used in our tests and all related hooks/plugins to markers.
- ocs_ci.framework.pytest_customization.marks.get_current_test_marks()
Get the list of the current active marks
The current_active_marks global is updated by ocs_ci/tests/conftest.py::update_current_test_marks_global at the start of each test
ocs_ci.framework.pytest_customization.ocscilib module
This is plugin for all the plugins/hooks related to OCS-CI and its configuration.
The basic configuration is done in run_ocsci.py module casue we need to load all the config before pytest run. This run_ocsci.py is just a wrapper for pytest which proccess config and passes all params to pytest.
- ocs_ci.framework.pytest_customization.ocscilib.pytest_addoption(parser)
Add necessary options to initialize OCS CI library.
ocs_ci.framework.pytest_customization.reports module
- ocs_ci.framework.pytest_customization.reports.pytest_html_results_table_header(cells)
Add Description header to the table
- ocs_ci.framework.pytest_customization.reports.pytest_html_results_table_row(report, cells)
Add content to the column Description
- ocs_ci.framework.pytest_customization.reports.pytest_report_teststatus(report, config)
This function checks the status of the test at which stage it is at an calculates the time take by each stage to complete it. There are three stages: setup : when the test case is setup call : when the test case is run teardown: when the teardown of the test case happens.
- ocs_ci.framework.pytest_customization.reports.pytest_runtest_makereport(item, call)
Add extra column( Log File) and link the log file location
- ocs_ci.framework.pytest_customization.reports.pytest_sessionfinish(session, exitstatus)
save session’s report files and send email report
- ocs_ci.framework.pytest_customization.reports.pytest_sessionstart(session)
Prepare results dict