Package com.consol.citrus.testng
Class TestNGHelper
- java.lang.Object
-
- com.consol.citrus.testng.TestNGHelper
-
public final class TestNGHelper extends Object
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestNGHelper.FakeExecutionCallBackClass faking test execution as callback.static interfaceTestNGHelper.TestLoaderProvider
-
Field Summary
Fields Modifier and Type Field Description static StringBUILDER_ATTRIBUTE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<TestLoader>createMethodTestLoaders(Method method, TestNGHelper.TestLoaderProvider provider)Creates test loader from @CitrusXmlTest annotated test method and saves those to local member.static TestCaseRunnercreateTestCaseRunner(Object target, Method method, TestContext context)Creates new test runner instance for this test method.static voidinvokeTestMethod(Object target, org.testng.ITestResult testResult, Method method, TestLoader testLoader, TestContext context, int invocationCount)Invokes test method.
-
-
-
Field Detail
-
BUILDER_ATTRIBUTE
public static final String BUILDER_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
invokeTestMethod
public static void invokeTestMethod(Object target, org.testng.ITestResult testResult, Method method, TestLoader testLoader, TestContext context, int invocationCount)
Invokes test method.- Parameters:
target-testResult-method-testLoader-context-invocationCount-
-
createTestCaseRunner
public static TestCaseRunner createTestCaseRunner(Object target, Method method, TestContext context)
Creates new test runner instance for this test method.- Parameters:
method-context-- Returns:
-
createMethodTestLoaders
public static List<TestLoader> createMethodTestLoaders(Method method, TestNGHelper.TestLoaderProvider provider)
Creates test loader from @CitrusXmlTest annotated test method and saves those to local member. Test loaders get executed later when actual method is called by TestNG. This way user can annotate multiple methods in one single class each executing several Citrus XML tests.- Parameters:
method-provider-- Returns:
-
-