Skip to content

Commit

Permalink
Update to stats.total.failed and stats.total.passed
Browse files Browse the repository at this point in the history
  • Loading branch information
manykarim authored Jul 31, 2024
1 parent 4e3f032 commit d2572cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/docs/parsing_results.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Simple example to read number of passed and failed tests
from robot.api import ExecutionResult
result = ExecutionResult('output.xml')
stats = result.statistics
print(f"Number of Failed Tests: {stats.failed}")
print(f"Total number of Tests: {stats.passed}")
print(f"Number of Failed Tests: {stats.total.failed}")
print(f"Total number of Tests: {stats.total.passed}")
```

You can also create a table in a markdown file `report.md`with the results.
Expand Down Expand Up @@ -128,4 +128,4 @@ That's how the result will look like:
|A Failed Test Case|FAIL|

### More information
Check the [documentation](https://robot-framework.readthedocs.io/en/stable/autodoc/robot.result.html?highlight=Resultvisitor%20#module-robot.result.visitor)
Check the [documentation](https://robot-framework.readthedocs.io/en/stable/autodoc/robot.result.html?highlight=Resultvisitor%20#module-robot.result.visitor)

0 comments on commit d2572cb

Please sign in to comment.