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 TestCaseRunnercreateTestCaseRunner(Object target, Method method, TestContext context)Creates new test runner instance for this test method.static List<TestLoader>createTestLoadersForMethod(Method method, TestNGHelper.TestLoaderProvider provider)Creates test loader from @CitrusXmlTest annotated test method and saves those to local member.static voidinvokeTestMethod(Citrus citrus, Object target, org.testng.ITestResult testResult, Method method, TestCase testCase, TestContext context, int invocationCount)Invokes test method based on designer or runner environment.static voidinvokeTestMethod(Object target, org.testng.ITestResult testResult, Method method, TestCaseRunner runner, 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(Citrus citrus, Object target, org.testng.ITestResult testResult, Method method, TestCase testCase, TestContext context, int invocationCount)
Invokes test method based on designer or runner environment.- Parameters:
citrus-target-testResult-method-testCase-context-invocationCount-
-
invokeTestMethod
public static void invokeTestMethod(Object target, org.testng.ITestResult testResult, Method method, TestCaseRunner runner, TestContext context, int invocationCount)
Invokes test method.- Parameters:
target-testResult-method-runner-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:
-
createTestLoadersForMethod
public static List<TestLoader> createTestLoadersForMethod(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:
-
-