Robot Framework Test Reports
Robot Framework Test Reports
Robot Framework generates three key output files after a test execution: output.xml, log.html, and report.html. These files are essential for reviewing the results of the tests and for debugging any issues. Here’s an explanation of each:
Report.html
The report.html file is a summary report that provides a high-level overview of the test execution. It’s an easy-to-read summary of your test suite, which includes key statistics, such as the number of passed and failed tests, and the overall status of the suite.
- Format: HTML (easy to read in a web browser)
- Contents:
- Summary: Displays the total number of tests, passed/failed/skipped tests, and execution time.
- Pass/Fail Overview: Visual representation (usually green/red) showing the overall success/failure rate.
- Test Suites and Test Cases: List of all suites and their respective test cases, along with their overall status (pass/fail).
- Execution Time: Time taken to run each suite/test case.
This report is great for a quick overview or summary after test execution, especially for managers or teams who need to understand the results without diving into detailed logs.
- High-Level Summary: Displays the number of tests passed, failed, and skipped, along with total execution time.
- Suite and Test Case Status: Shows the status of each suite and test case (pass, fail, or skipped).
- Execution Time: Helps you see how long each suite/test case took to execute.
Output.xml
The output.xml file is the raw output from the test execution in XML format. This file is primarily used by Robot Framework and other tools to analyze and extract test results. It’s not human-readable, but it’s extremely useful for automation tools or other systems that need to parse test results.
- Format: XML (extensible markup language)
- Contents: Includes detailed information about the execution, such as:
- Test case results (pass/fail)
- Execution time
- Keyword execution details
- Suite and test case hierarchy
- Logs and error messages
You don’t typically view output.xml directly but use it to generate reports and logs (in HTML format).
- Test Results: Each test’s result is recorded with details like the status (PASS/FAIL), start time, end time, and duration.
- Suites and Test Cases: The structure of the test suite and cases is captured.
- Error/Failure Information: Any failures or errors in the test are recorded with error messages, stack traces, and additional information.
Log.html
The log.html file is a detailed, human-readable log of the entire test run. It provides a step-by-step breakdown of the tests that were executed, making it easy to understand exactly what happened during the test and where it might have failed.
- Format: HTML (easy to read in a web browser)
- Contents: Includes:
- A list of test suites and their test cases.
- Detailed information for each test case, including each keyword executed, its arguments, and its result.
- A timeline of keyword execution.
- Error messages and failure details with stack traces.
- Screenshots (if configured) in case of test failures.
This file is used primarily for debugging and understanding the flow of your tests, especially in case of failures.
- Detailed Execution Flow: It shows all the steps (keywords) executed within the test case.
- Test Case Status: Displays whether a test case passed, failed, or was skipped.
- Error and Failure Details: If a test case fails, the log will provide detailed failure messages, including the failure’s location (keyword or test case).
- Interactive View: You can click on test cases to view more detailed information about each step and keyword.