- All Implemented Interfaces:
- org.testng.IInvokedMethodListener, org.testng.ITestNGListener
public class OSTestMethodSelector
extends Object
implements org.testng.IInvokedMethodListener
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