Package org.alfresco.utility.testng
Class OSTestMethodSelector
java.lang.Object
org.alfresco.utility.testng.OSTestMethodSelector
- All Implemented Interfaces:
org.testng.IInvokedMethodListener,org.testng.ITestNGListener
Use this listener if you want to exclude automatically tests based on your operating system.
Example:
@Test(groups = { TestGroup.OS_WIN })
public void testA()
{
}
@Test(groups = { TestGroup.OS_WIN, TestGroup.OS_UNIX })
public void testB()
{
}
@Test(groups = { TestGroup.OS_WIN })
public void testC()
{
}
and you are running your tests on Unix, then only testB will be executed, the remaining ones will be marked as skipped.
- Author:
- Paul Brodner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterInvocation(org.testng.IInvokedMethod testNGmethod, org.testng.ITestResult testResult) voidbeforeInvocation(org.testng.IInvokedMethod testNGmethod, org.testng.ITestResult testResult) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.IInvokedMethodListener
afterInvocation, beforeInvocation
-
Constructor Details
-
OSTestMethodSelector
public OSTestMethodSelector()
-
-
Method Details
-
beforeInvocation
public void beforeInvocation(org.testng.IInvokedMethod testNGmethod, org.testng.ITestResult testResult) - Specified by:
beforeInvocationin interfaceorg.testng.IInvokedMethodListener
-
afterInvocation
public void afterInvocation(org.testng.IInvokedMethod testNGmethod, org.testng.ITestResult testResult) - Specified by:
afterInvocationin interfaceorg.testng.IInvokedMethodListener
-