From d2572cbfdbde0211b6023a372e740a157ae1a35e Mon Sep 17 00:00:00 2001 From: Many Kasiriha <61293164+manykarim@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:26:25 +0200 Subject: [PATCH] Update to stats.total.failed and stats.total.passed --- website/docs/parsing_results.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/parsing_results.md b/website/docs/parsing_results.md index 4928aa96..ff81c329 100644 --- a/website/docs/parsing_results.md +++ b/website/docs/parsing_results.md @@ -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. @@ -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) \ No newline at end of file +Check the [documentation](https://robot-framework.readthedocs.io/en/stable/autodoc/robot.result.html?highlight=Resultvisitor%20#module-robot.result.visitor)