Package org.alfresco.utility.testrail
Class TestRailExecutorListener
- java.lang.Object
-
- org.alfresco.utility.testrail.TestRailExecutorListener
-
- All Implemented Interfaces:
org.testng.ISuiteListener,org.testng.ITestListener,org.testng.ITestNGListener
public class TestRailExecutorListener extends java.lang.Object implements org.testng.ISuiteListener, org.testng.ITestListenerListen 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 {@link 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
-
-
Constructor Summary
Constructors Constructor Description TestRailExecutorListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonFinish(org.testng.ISuite suite)voidonFinish(org.testng.ITestContext context)voidonStart(org.testng.ISuite suite)voidonStart(org.testng.ITestContext context)voidonTestFailedButWithinSuccessPercentage(org.testng.ITestResult result)voidonTestFailure(org.testng.ITestResult result)voidonTestSkipped(org.testng.ITestResult result)voidonTestStart(org.testng.ITestResult currentTest)voidonTestSuccess(org.testng.ITestResult result)
-
-
-
Method Detail
-
onStart
public void onStart(org.testng.ISuite suite)
- Specified by:
onStartin interfaceorg.testng.ISuiteListener
-
onFinish
public void onFinish(org.testng.ISuite suite)
- Specified by:
onFinishin interfaceorg.testng.ISuiteListener
-
onTestStart
public void onTestStart(org.testng.ITestResult currentTest)
- Specified by:
onTestStartin interfaceorg.testng.ITestListener
-
onTestSuccess
public void onTestSuccess(org.testng.ITestResult result)
- Specified by:
onTestSuccessin interfaceorg.testng.ITestListener
-
onTestFailure
public void onTestFailure(org.testng.ITestResult result)
- Specified by:
onTestFailurein interfaceorg.testng.ITestListener
-
onTestSkipped
public void onTestSkipped(org.testng.ITestResult result)
- Specified by:
onTestSkippedin interfaceorg.testng.ITestListener
-
onTestFailedButWithinSuccessPercentage
public void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult result)
- Specified by:
onTestFailedButWithinSuccessPercentagein interfaceorg.testng.ITestListener
-
onStart
public void onStart(org.testng.ITestContext context)
- Specified by:
onStartin interfaceorg.testng.ITestListener
-
onFinish
public void onFinish(org.testng.ITestContext context)
- Specified by:
onFinishin interfaceorg.testng.ITestListener
-
-