Package org.testng.remote
Class AbstractRemoteTestNG
- java.lang.Object
-
- org.testng.TestNG
-
- org.testng.remote.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 classAbstractRemoteTestNG.RemoteSuiteListenerA ISuiteListener wiring the results using the internal string-based protocol.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringLOCALHOSTprivate booleanm_ackprotected org.testng.ITestRunnerFactorym_customTestRunnerFactoryprivate booleanm_debugprivate booleanm_dontExitprivate java.lang.Stringm_hostprivate java.lang.Integerm_portPort used for the string protocolprivate java.lang.Stringm_protocolProtocol used for inter-communicationprivate java.lang.Integerm_serPortPort used for the serialized protocol
-
Constructor Summary
Constructors Constructor Description AbstractRemoteTestNG()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.testng.ITestRunnerFactorybuildTestRunnerFactory()Override by the plugin if you need to configure differently theTestRunner(usually this is needed if different listeners/reporters are needed).protected booleancanRun()run afterinitialize(), tell if it's ready for running the testvoidconfigure(org.testng.CommandLineArgs cla)protected abstract org.testng.ITestRunnerFactorycreateDelegatingTestRunnerFactory(org.testng.ITestRunnerFactory trf, MessageHub smsh)static java.lang.StringdefaultIfStringEmpty(java.lang.String s, java.lang.String defaultValue)voiddontExit(boolean dontExit)protected java.lang.StringgetHost()private IMessageSendergetMessageSender()protected intgetPort()protected voidinitialize()static booleanisStringEmpty(java.lang.String s)voidrun()voidsetAck(boolean ack)voidsetDebug(boolean debug)voidsetHost(java.lang.String host)voidsetPort(java.lang.Integer port)voidsetProtocol(java.lang.String protocol)voidsetSerPort(java.lang.Integer serPort)static voidvalidateCommandLineParameters(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
-
-
-
-
Field Detail
-
LOCALHOST
private static final java.lang.String LOCALHOST
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
dontExit
public void dontExit(boolean dontExit)
- Specified by:
dontExitin interfaceIRemoteTestNG
-
setDebug
public void setDebug(boolean debug)
- Specified by:
setDebugin interfaceIRemoteTestNG
-
setAck
public void setAck(boolean ack)
- Specified by:
setAckin interfaceIRemoteTestNG
-
setHost
public void setHost(java.lang.String host)
- Specified by:
setHostin interfaceIRemoteTestNG
-
setSerPort
public void setSerPort(java.lang.Integer serPort)
- Specified by:
setSerPortin interfaceIRemoteTestNG
-
setProtocol
public void setProtocol(java.lang.String protocol)
- Specified by:
setProtocolin interfaceIRemoteTestNG
-
setPort
public void setPort(java.lang.Integer port)
- Specified by:
setPortin interfaceIRemoteTestNG
-
configure
public void configure(org.testng.CommandLineArgs cla)
- Specified by:
configurein interfaceIRemoteTestNG- Overrides:
configurein classorg.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:
runin interfaceIRemoteTestNG- Overrides:
runin classorg.testng.TestNG
-
initialize
protected void initialize()
-
canRun
protected boolean canRun()
run afterinitialize(), tell if it's ready for running the test- Returns:
truefor ready.
-
getMessageSender
private IMessageSender getMessageSender()
-
buildTestRunnerFactory
protected abstract org.testng.ITestRunnerFactory buildTestRunnerFactory()
Override by the plugin if you need to configure differently theTestRunner(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)
-
-