public class TestNGService extends java.lang.Object implements ITestNGService
| Modifier and Type | Field and Description |
|---|---|
static com.epam.reportportal.service.tree.TestItemTree |
ITEM_TREE |
static com.epam.ta.reportportal.ws.model.issue.Issue |
NOT_ISSUE |
static java.lang.String |
NULL_VALUE |
static java.lang.String |
RP_ID |
static java.lang.String |
RP_METHOD_TYPE |
static java.lang.String |
RP_RETRY |
static java.lang.String |
SKIPPED_ISSUE_KEY |
| Constructor and Description |
|---|
TestNGService() |
TestNGService(java.util.function.Supplier<com.epam.reportportal.service.Launch> launchSupplier) |
| Modifier and Type | Method and Description |
|---|---|
protected com.epam.ta.reportportal.ws.model.FinishTestItemRQ |
buildFinishTestMethodRq(com.epam.reportportal.listeners.ItemStatus status,
org.testng.ITestResult testResult)
Extension point to customize test method on it's finish
|
protected com.epam.ta.reportportal.ws.model.FinishTestItemRQ |
buildFinishTestMethodRq(java.lang.String status,
org.testng.ITestResult testResult)
Deprecated.
|
protected com.epam.ta.reportportal.ws.model.FinishTestItemRQ |
buildFinishTestRq(org.testng.ITestContext testContext)
Extension point to customize test on it's finish
|
protected com.epam.ta.reportportal.ws.model.FinishTestItemRQ |
buildFinishTestSuiteRq(org.testng.ISuite suite)
Extension point to customize test suite on it's finish
|
protected com.epam.ta.reportportal.ws.model.StartTestItemRQ |
buildStartConfigurationRq(org.testng.ITestResult testResult,
TestMethodType type)
Extension point to customize beforeXXX creation event/request
|
protected com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ |
buildStartLaunchRq(com.epam.reportportal.listeners.ListenerParameters parameters)
Extension point to customize launch creation event/request
|
protected com.epam.ta.reportportal.ws.model.StartTestItemRQ |
buildStartStepRq(org.testng.ITestResult testResult)
Extension point to customize test step creation event/request
|
protected com.epam.ta.reportportal.ws.model.StartTestItemRQ |
buildStartStepRq(org.testng.ITestResult testResult,
TestMethodType type)
Extension point to customize test step creation event/request
|
protected com.epam.ta.reportportal.ws.model.StartTestItemRQ |
buildStartSuiteRq(org.testng.ISuite suite)
Extension point to customize suite creation event/request
|
protected com.epam.ta.reportportal.ws.model.StartTestItemRQ |
buildStartTestItemRq(org.testng.ITestContext testContext)
Extension point to customize test creation event/request
|
protected java.lang.String |
createConfigurationDescription(org.testng.ITestResult testResult)
Extension point to customize beforeXXX step description
|
protected java.lang.String |
createConfigurationName(org.testng.ITestResult testResult)
Extension point to customize beforeXXX step name
|
protected void |
createSkippedSteps(org.testng.ITestResult testResult)
Extension point to customize skipped test insides
|
protected java.util.Set<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> |
createStepAttributes(org.testng.ITestResult testResult) |
protected java.lang.String |
createStepDescription(org.testng.ITestResult testResult)
Extension point to customize test step description
|
protected java.lang.String |
createStepName(org.testng.ITestResult testResult)
Extension point to customize test step name
|
protected java.util.List<com.epam.ta.reportportal.ws.model.ParameterResource> |
createStepParameters(org.testng.ITestResult testResult)
Extension point to customize Report Portal test parameters
|
void |
finishLaunch()
Finish current launch
|
void |
finishTest(org.testng.ITestContext testContext)
Finish test event handler
|
void |
finishTestMethod(com.epam.reportportal.listeners.ItemStatus status,
org.testng.ITestResult testResult)
Finish test method event handler
|
void |
finishTestMethod(java.lang.String statusStr,
org.testng.ITestResult testResult)
Deprecated.
|
void |
finishTestSuite(org.testng.ISuite suite)
Finish test suite event handler
|
protected <T> T |
getAttribute(org.testng.IAttributes attributes,
java.lang.String attribute) |
static com.epam.reportportal.service.ReportPortal |
getReportPortal() |
protected java.lang.String |
getSuiteStatus(org.testng.ISuite suite)
Extension point to customize test suite status being sent to ReportPortal
|
protected boolean |
isTestPassed(org.testng.ITestContext testContext)
Check is current method passed according the number of failed tests and
configurations
|
void |
sendReportPortalMsg(org.testng.ITestResult result) |
protected static void |
setReportPortal(com.epam.reportportal.service.ReportPortal reportPortal) |
void |
startConfiguration(org.testng.ITestResult testResult)
Start configuration method(any before of after method)
|
void |
startLaunch()
Start current launch
|
void |
startTest(org.testng.ITestContext testContext)
Start test event handler
|
void |
startTestMethod(org.testng.ITestResult testResult)
Start test method event handler
|
void |
startTestSuite(org.testng.ISuite suite)
Start test suite event handler
|
public static final java.lang.String SKIPPED_ISSUE_KEY
public static final java.lang.String RP_ID
public static final java.lang.String RP_RETRY
public static final java.lang.String RP_METHOD_TYPE
public static final java.lang.String NULL_VALUE
public static final com.epam.reportportal.service.tree.TestItemTree ITEM_TREE
public static final com.epam.ta.reportportal.ws.model.issue.Issue NOT_ISSUE
public TestNGService()
public TestNGService(java.util.function.Supplier<com.epam.reportportal.service.Launch> launchSupplier)
public static com.epam.reportportal.service.ReportPortal getReportPortal()
protected static void setReportPortal(com.epam.reportportal.service.ReportPortal reportPortal)
public void startLaunch()
ITestNGServicestartLaunch in interface ITestNGServicepublic void finishLaunch()
ITestNGServicefinishLaunch in interface ITestNGServicepublic void startTestSuite(org.testng.ISuite suite)
ITestNGServicestartTestSuite in interface ITestNGServicesuite - TestNG's suiteprotected <T> T getAttribute(org.testng.IAttributes attributes,
java.lang.String attribute)
public void finishTestSuite(org.testng.ISuite suite)
ITestNGServicefinishTestSuite in interface ITestNGServicesuite - TestNG's suitepublic void startTest(org.testng.ITestContext testContext)
ITestNGServicestartTest in interface ITestNGServicetestContext - TestNG's test contextpublic void finishTest(org.testng.ITestContext testContext)
ITestNGServicefinishTest in interface ITestNGServicetestContext - TestNG's test contextprotected com.epam.ta.reportportal.ws.model.StartTestItemRQ buildStartConfigurationRq(org.testng.ITestResult testResult,
TestMethodType type)
testResult - TestNG's testResult contexttype - Type of methodpublic void startConfiguration(org.testng.ITestResult testResult)
ITestNGServicestartConfiguration in interface ITestNGServicetestResult - TestNG's test resultprotected com.epam.ta.reportportal.ws.model.StartTestItemRQ buildStartStepRq(@Nonnull
org.testng.ITestResult testResult)
testResult - TestNG's testResult contextprotected com.epam.ta.reportportal.ws.model.StartTestItemRQ buildStartStepRq(@Nonnull
org.testng.ITestResult testResult,
@Nonnull
TestMethodType type)
testResult - TestNG's testResult contexttype - method typepublic void startTestMethod(org.testng.ITestResult testResult)
ITestNGServicestartTestMethod in interface ITestNGServicetestResult - TestNG's test resultprotected com.epam.ta.reportportal.ws.model.FinishTestItemRQ buildFinishTestMethodRq(com.epam.reportportal.listeners.ItemStatus status,
org.testng.ITestResult testResult)
status - item execution statustestResult - TestNG's testResult context@Deprecated
protected com.epam.ta.reportportal.ws.model.FinishTestItemRQ buildFinishTestMethodRq(java.lang.String status,
org.testng.ITestResult testResult)
buildFinishTestMethodRq(ItemStatus, ITestResult)status - item execution statustestResult - TestNG's testResult contextprotected void createSkippedSteps(org.testng.ITestResult testResult)
testResult - TestNG's testResult contextpublic void finishTestMethod(com.epam.reportportal.listeners.ItemStatus status,
org.testng.ITestResult testResult)
ITestNGServicefinishTestMethod in interface ITestNGServicestatus - Status (PASSED/FAILED)testResult - TestNG's test resultItemStatus@Deprecated
public void finishTestMethod(java.lang.String statusStr,
org.testng.ITestResult testResult)
ITestNGServicefinishTestMethod in interface ITestNGServicestatusStr - Status (PASSED/FAILED)testResult - TestNG's test resultStatusespublic void sendReportPortalMsg(org.testng.ITestResult result)
sendReportPortalMsg in interface ITestNGServiceprotected com.epam.ta.reportportal.ws.model.StartTestItemRQ buildStartSuiteRq(org.testng.ISuite suite)
suite - TestNG suiteprotected com.epam.ta.reportportal.ws.model.StartTestItemRQ buildStartTestItemRq(org.testng.ITestContext testContext)
testContext - TestNG test contextprotected com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ buildStartLaunchRq(com.epam.reportportal.listeners.ListenerParameters parameters)
parameters - Launch Configuration parametersprotected com.epam.ta.reportportal.ws.model.FinishTestItemRQ buildFinishTestSuiteRq(org.testng.ISuite suite)
suite - TestNG's suite contextprotected com.epam.ta.reportportal.ws.model.FinishTestItemRQ buildFinishTestRq(org.testng.ITestContext testContext)
testContext - TestNG test contextprotected java.util.List<com.epam.ta.reportportal.ws.model.ParameterResource> createStepParameters(org.testng.ITestResult testResult)
testResult - TestNG's testResult contextprotected java.lang.String createConfigurationName(org.testng.ITestResult testResult)
testResult - TestNG's testResult contextprotected java.lang.String createConfigurationDescription(org.testng.ITestResult testResult)
testResult - TestNG's testResult contextprotected java.lang.String createStepName(org.testng.ITestResult testResult)
testResult - TestNG's testResult contextprotected java.lang.String createStepDescription(org.testng.ITestResult testResult)
testResult - TestNG's testResult contextprotected java.lang.String getSuiteStatus(org.testng.ISuite suite)
suite - TestNG's suiteprotected boolean isTestPassed(org.testng.ITestContext testContext)
testContext - TestNG's test contentprotected java.util.Set<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> createStepAttributes(org.testng.ITestResult testResult)