Class OSTestMethodSelector

java.lang.Object
org.alfresco.utility.testng.OSTestMethodSelector
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
  • Constructor Details

    • OSTestMethodSelector

      public OSTestMethodSelector()
  • Method Details

    • beforeInvocation

      public void beforeInvocation(org.testng.IInvokedMethod testNGmethod, org.testng.ITestResult testResult)
      Specified by:
      beforeInvocation in interface org.testng.IInvokedMethodListener
    • afterInvocation

      public void afterInvocation(org.testng.IInvokedMethod testNGmethod, org.testng.ITestResult testResult)
      Specified by:
      afterInvocation in interface org.testng.IInvokedMethodListener