scenario.campaignexecution module¶
Campaign execution results.
The CampaignExecution
class stores the execution results of a campaign.
It owns a list of TestSuite
instances (actually one, called ‘All’),
which owns a list of TestCase
instances (one test case per scenario).
- class CampaignExecution¶
Bases:
object
Main campaign result object.
- __init__(outdir)¶
- Parameters:
outdir –
Output directory path.
None
initializes the output directory path with the current working directory.
- outdir¶
Output directory path.
- test_suite_executions¶
Test suite results.
- time¶
Time statistics.
- __repr__()¶
Canonical string representation.
- property junit_path¶
JUnit path.
- property steps¶
Step statistics.
- property actions¶
Action statistics.
- property results¶
Expected result statistics.
- property counts¶
Campaign statistics.
- class TestSuiteExecution¶
Bases:
object
Test suite execution object.
- __init__(campaign_execution, test_suite_path)¶
- Parameters:
campaign_execution – Owner
CampaignExecution
object.test_suite_path –
Test suite file path.
None
initializes thetest_suite_file
member with a void file path, which makes thetest_suite_file
instance void as well. This path can be fixed programmatically later on.
- campaign_execution¶
Owner campaign execution.
- test_suite_file¶
Campaign file.
- test_case_executions¶
Test cases.
- time¶
Time statistics.
- __repr__()¶
Canonical string representation.
- property steps¶
Step statistics.
- property actions¶
Action statistics.
- property results¶
Expected result statistics.
- property counts¶
Campaign statistics.
- class TestCaseExecution¶
Bases:
object
Test case (i.e. test scenario) execution object.
- __init__(test_suite_execution, script_path)¶
- Parameters:
test_suite_execution – Owner
TestSuite
object.script_path –
Scenario script path.
None
initializes thescript_path
member with a void file path. This path can be fixed programmatically later on.
- test_suite_execution¶
Owner test suite execution.
- script_path¶
Scenario script path.
- time¶
Time statistics.
- log¶
Test case log output.
- json¶
Test case JSON output.
- __repr__()¶
Canonical string representation.
- property scenario_execution¶
Scenario execution data.
- property name¶
Test case name.
- property status¶
Scenario execution status.
- property errors¶
Test errors.
- property warnings¶
Warnings.
- property steps¶
Step statistics.
- property actions¶
Action statistics.
- property results¶
Expected result statistics.
- class CampaignStats¶
Bases:
object
JUnit compatible statistics.
Failures v/s errors
According to https://stackoverflow.com/questions/3425995/whats-the-difference-between-failure-and-error-in-junit:
tests are considered that they have “failed” because of an assertion,
tests are said to be in “error” but of an unexpected error.
- __init__()¶
Initializes all counters with
0
.
- total¶
Total number of test cases.
- disabled¶
Number of test cases disabled.
- skipped¶
Number of skipped test cases.
For test suites.
- warnings¶
Number of tests that terminated with warnings.
- failures¶
Number of test cases that failed due to assertions.
- errors¶
Number of test cases that failed unexpectedly.
- class LogFileReader¶
Bases:
object
Log file path and content.
- path¶
Test case log file path.
- content¶
Test case log file content.
- read()¶
Read the log file.
- Returns:
True
when the log file could be read successfully,False
otherwise.