Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created April 11, 2024 05:29
Show Gist options
  • Save SarahElson/f06643f04a80bb193d183ad2cebb2a6a to your computer and use it in GitHub Desktop.
Save SarahElson/f06643f04a80bb193d183ad2cebb2a6a to your computer and use it in GitHub Desktop.
How To Retry Failed Tests Using IRetryAnalyzer In TestNG
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Demo Test Suite ">
<listeners>
<listener class-name="RetryListener"/>
</listeners>
<test name="Retry failed tests ">
<parameter name="browser" value="chrome"/>
<classes>
<class name="demo.tests.retrytests.RetryFailedTests">
<methods>
<include name="testOne"/>
<include name="testTwo"/>
</methods>
</class>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment