Retriggered Failed Test Cases In Robot Framework

Retriggered Failed Test Cases In Robot Framework

Step-by-Step Guide to Re-Triggered Failed Test Cases in Robot Framework:


Article content

Step 1: Before re-running any failed tests, it's essential to obtain an initial set of test results. You can do this by executing your test suite as normal, which will produce an output file (output.xml), a log file (log.html), and a report file (report.html).

Command:

robot  --output output.xml path/to/your/test/suite

 

E.g.:     robot  --output output.xml .\Tests_Regression\02_Browse.robot

  • --output output.xml: Specifies the name of the output file.
  • path/to/your/test/suite: The path to your test suite or file.

 

 

Step 2: Identifying Failed Tests

Once the initial test run is complete, review the report.html or log.html files to pinpoint the failed test cases. These files contain detailed information about the status of each test, highlighting any failures.

Step 3: Re-running Failed Tests To re-Triggered only the failed test cases, Robot Framework offers the

--rerunfailed option. This option reads the previous output file and re-executes only the tests that failed.

Command:

robot --rerunfailed output.xml --output rerun_output.xml path/to/your/test/suite

E.g.:  robot --rerunfailed output.xml --output rerun_output.xml .\Tests_Regression\02_Browse.robot

  • --rerunfailed output.xml: Specifies the output file from the initial run, which contains the information about failed tests.
  • --output rerun_output.xml: Specifies the name of the new output file for the re-run results.

 

 

Step 4: Merging Results

After re-running the failed tests, you'll have two sets of results: one from the initial run and one from the re-run. To obtain a comprehensive overview, combine these results using the rebot tool.

Command:

rebot --output final_output.xml --merge output.xml rerun_output.xml

  • --output final_output.xml: The name of the merged output file.
  • --merge output.xml rerun_output.xml: Merges the initial and re-run results.

Step 5: Analyzing the Final Results

Open final_output.xml using Robot Framework's log viewer, or review the corresponding report.html and log.html files to view the combined results from both runs. This will indicate which tests still failed and which ones passed after the re-run.

Article content


To view or add a comment, sign in

More articles by Vivek Kumar

  • OOPS in Java

    #OOPS: • Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It…

  • Important Question for Manual Testing:

    # Software Testing It is the process of analyzing any given piece of software to determine if it meets shareholders’…

    2 Comments
  • Selenium Interview Question:

    # Selenium 1. is a free and open source 2.

Explore content categories