Class AbstractRemoteTestNG

  • All Implemented Interfaces:
    IRemoteTestNG
    Direct Known Subclasses:
    RemoteTestNG6_12

    public abstract class AbstractRemoteTestNG
    extends org.testng.TestNG
    implements IRemoteTestNG
    Extension of TestNG registering a remote TestListener.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  AbstractRemoteTestNG.RemoteSuiteListener
      A ISuiteListener wiring the results using the internal string-based protocol.
      • Nested classes/interfaces inherited from class org.testng.TestNG

        org.testng.TestNG.ExitCodeListener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String LOCALHOST  
      private boolean m_ack  
      protected org.testng.ITestRunnerFactory m_customTestRunnerFactory  
      private boolean m_debug  
      private boolean m_dontExit  
      private java.lang.String m_host  
      private java.lang.Integer m_port
      Port used for the string protocol
      private java.lang.String m_protocol
      Protocol used for inter-communication
      private java.lang.Integer m_serPort
      Port used for the serialized protocol
      • Fields inherited from class org.testng.TestNG

        DEFAULT_COMMAND_LINE_SUITE_NAME, DEFAULT_COMMAND_LINE_TEST_NAME, DEFAULT_OUTPUTDIR, DEFAULT_VERBOSE, m_end, m_start, m_suites, m_useDefaultListeners, SHOW_TESTNG_STACK_FRAMES, TEST_CLASSPATH
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract org.testng.ITestRunnerFactory buildTestRunnerFactory()
      Override by the plugin if you need to configure differently the TestRunner (usually this is needed if different listeners/reporters are needed).
      protected boolean canRun()
      run after initialize(), tell if it's ready for running the test
      void configure​(org.testng.CommandLineArgs cla)  
      protected abstract org.testng.ITestRunnerFactory createDelegatingTestRunnerFactory​(org.testng.ITestRunnerFactory trf, MessageHub smsh)  
      static java.lang.String defaultIfStringEmpty​(java.lang.String s, java.lang.String defaultValue)  
      void dontExit​(boolean dontExit)  
      protected java.lang.String getHost()  
      private IMessageSender getMessageSender()  
      protected int getPort()  
      protected void initialize()  
      static boolean isStringEmpty​(java.lang.String s)  
      void run()  
      void setAck​(boolean ack)  
      void setDebug​(boolean debug)  
      void setHost​(java.lang.String host)  
      void setPort​(java.lang.Integer port)  
      void setProtocol​(java.lang.String protocol)  
      void setSerPort​(java.lang.Integer serPort)  
      static void validateCommandLineParameters​(org.testng.CommandLineArgs args)  
      • Methods inherited from class org.testng.TestNG

        addAlterSuiteListener, addClassLoader, addExecutionListener, addInvokedMethodListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addMethodSelector, addMethodSelector, configure, getAnnotationTransformer, getConfigFailurePolicy, getConfiguration, getDefault, getDefaultSuiteName, getDefaultTestName, getEnd, getOutputDirectory, getReporters, getServiceLoaderListeners, getStart, getStatus, getSuiteListeners, getSuiteThreadPoolSize, getTestListeners, hasFailure, hasFailureWithinSuccessPercentage, hasSkip, initializeEverything, initializeSuitesAndJarFile, isJdk14, main, privateMain, runSuites, runSuitesLocally, setAnnotationTransformer, setCommandLineSuite, setConfigFailurePolicy, setConfigFailurePolicy, setDataProviderThreadCount, setDefaultSuiteName, setDefaultTestName, setExcludedGroups, setGroupByInstances, setGroups, setJUnit, setListenerClasses, setMethodInterceptor, setMixed, setObjectFactory, setObjectFactory, setOutputDirectory, setParallel, setParallel, setPreserveOrder, setRandomizeSuites, setServiceLoaderClassLoader, setSkipFailedInvocationCounts, setSourcePath, setSuiteThreadPoolSize, setTestClasses, setTestJar, setTestNames, setTestNGVersion, setTestRunnerFactory, setTestSuites, setThreadCount, setUseDefaultListeners, setVerbose, setXmlPathInJar, setXmlSuites
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_customTestRunnerFactory

        protected org.testng.ITestRunnerFactory m_customTestRunnerFactory
      • m_host

        private java.lang.String m_host
      • m_port

        private java.lang.Integer m_port
        Port used for the string protocol
      • m_serPort

        private java.lang.Integer m_serPort
        Port used for the serialized protocol
      • m_protocol

        private java.lang.String m_protocol
        Protocol used for inter-communication
      • m_debug

        private boolean m_debug
      • m_dontExit

        private boolean m_dontExit
      • m_ack

        private boolean m_ack
    • Constructor Detail

      • AbstractRemoteTestNG

        public AbstractRemoteTestNG()
    • Method Detail

      • dontExit

        public void dontExit​(boolean dontExit)
        Specified by:
        dontExit in interface IRemoteTestNG
      • setAck

        public void setAck​(boolean ack)
        Specified by:
        setAck in interface IRemoteTestNG
      • setHost

        public void setHost​(java.lang.String host)
        Specified by:
        setHost in interface IRemoteTestNG
      • setSerPort

        public void setSerPort​(java.lang.Integer serPort)
        Specified by:
        setSerPort in interface IRemoteTestNG
      • setProtocol

        public void setProtocol​(java.lang.String protocol)
        Specified by:
        setProtocol in interface IRemoteTestNG
      • setPort

        public void setPort​(java.lang.Integer port)
        Specified by:
        setPort in interface IRemoteTestNG
      • configure

        public void configure​(org.testng.CommandLineArgs cla)
        Specified by:
        configure in interface IRemoteTestNG
        Overrides:
        configure in class org.testng.TestNG
      • validateCommandLineParameters

        public static void validateCommandLineParameters​(org.testng.CommandLineArgs args)
      • defaultIfStringEmpty

        public static java.lang.String defaultIfStringEmpty​(java.lang.String s,
                                                            java.lang.String defaultValue)
      • isStringEmpty

        public static boolean isStringEmpty​(java.lang.String s)
      • run

        public void run()
        Specified by:
        run in interface IRemoteTestNG
        Overrides:
        run in class org.testng.TestNG
      • initialize

        protected void initialize()
      • canRun

        protected boolean canRun()
        run after initialize(), tell if it's ready for running the test
        Returns:
        true for ready.
      • buildTestRunnerFactory

        protected abstract org.testng.ITestRunnerFactory buildTestRunnerFactory()
        Override by the plugin if you need to configure differently the TestRunner (usually this is needed if different listeners/reporters are needed). Note: you don't need to worry about the wiring listener, because it is added automatically.
      • getHost

        protected java.lang.String getHost()
      • getPort

        protected int getPort()
      • createDelegatingTestRunnerFactory

        protected abstract org.testng.ITestRunnerFactory createDelegatingTestRunnerFactory​(org.testng.ITestRunnerFactory trf,
                                                                                           MessageHub smsh)