Closed luciano-renzi closed 3 years ago
Example, a test file with two test (functions)
test_file_one.py
def test_one(data):
assert 2 + 2 == 4
def test_two(data):
assert 2 + 2 == 5
The report folder structure is the same when runnning a test file, a suite or a folder.
New report file structure:
reports/
test_file_one/ # name of the execution (one test file, a suite, or an entire folder)
2021.05.17.19.00.52.301/
test_file_one/ # one folder for each individual test file
report.json # result of all test functions in test_file_one
report.json # result of every test function in every test file included in this execution
Example, json report for a test file:
[
{
"test_file": "test_file_one",
"test": "test_one",
"set_name": "", <-- set name a random str used when the same test is run multiple times using test data.
empty when there is no test data. (the test is run once)
"environment": "",
"result": "success",
"description": null,
"browser": "chrome",
"test_data": {},
"steps": [],
"errors": [],
"elapsed_time": 0.0,
"timestamp": "2021.05.17.19.00.52.303"
},
{
"test_file": "test_file_one",
"test": "test_two",
"set_name": "",
"environment": "",
"result": "failure",
"description": null,
"browser": "chrome",
"test_data": {},
"steps": [...]
"errors": [...],
"elapsed_time": 0.0,
"timestamp": "2021.05.17.19.00.52.303"
}
]
Add the possibility to have more than one test per file.