- All Implemented Interfaces:
- org.testng.ISuiteListener, org.testng.ITestListener, org.testng.ITestNGListener
public class TestRailExecutorListener
extends Object
implements org.testng.ISuiteListener, org.testng.ITestListener
Listen for all test cases created and update them accordingly in Test Rail (configured based on *.properties file)
This is the seconds approach of updating TestRail test cases based on test execution.
The initial approach was to perform queries and update test cases as we go. Running many tests in parallel or multiple suites will throw
"HTTP 429 (No additional error message received)" from the server http://docs.gurock.com/testrail-api2/introduction
-
In order to bypass this, before we start the suite of test we query the list of test cases from current project specified in default.properties and save it
in memory.
- when the test is executed if the test is not in temporary collection we add it (make a post request to /add_case)
- after test execution, for our test object we define the status and other details from ITestResult
- after the entire tests are executed, we traverse the list of all tests executed and bulk upload their results in TestRail with just one query command.
- Author:
- Paul Brodner