Package com.dkfqs.selenium.mainrunner
Class JUnit4MainRunner
- java.lang.Object
-
- java.lang.Thread
-
- com.dkfqs.tools.javatest.AbstractJavaTest
-
- com.dkfqs.selenium.mainrunner.JUnit4MainRunner
-
- All Implemented Interfaces:
java.lang.Runnable
public class JUnit4MainRunner extends com.dkfqs.tools.javatest.AbstractJavaTestA generic main program for executing JUnit 4 tests - which is normally started as Java OS process on measuring agents.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJUNIT_CONFIG_FILE_MAIN_ARGThe required (main) argument name for the JUnit config execution file.static java.lang.StringTESTJOB_PROPERTIES_FILE_NAMEThe name of the testjob properties file.-
Fields inherited from class com.dkfqs.tools.javatest.AbstractJavaTest
ABORT_TESTJOB_FILE_NAME, ENCODE_ALGORITHM_DECODE, ENCODE_ALGORITHM_ENCODE, ENCODE_ALGORITHM_NONE, ERROR_SEVERITY_ERROR, ERROR_SEVERITY_FATAL, ERROR_SEVERITY_WARNING, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, SESSION_STATUS_END_OF_TEST, SESSION_STATUS_END_OF_USER, SESSION_STATUS_FAILED, SESSION_STATUS_SUCCESS, STATISTIC_TYPE_AVERAGE_AND_CURRENT_VALUE, STATISTIC_TYPE_CUMULATIVE_COUNTER_LONG, STATISTIC_TYPE_EFFICIENCY_RATIO_PERCENT, STATISTIC_TYPE_SAMPLE_EVENT_TIME_CHART, STATISTIC_TYPE_THROUGHPUT_TIME_CHART, stdoutLog, SUSPEND_TESTJOB_FILE_NAME, VALID_ENCODE_ALGORITHM_SET, VALID_SESSION_STATUS_SET
-
-
Constructor Summary
Constructors Constructor Description JUnit4MainRunner(int userNumber)Constructor: Create a new instance per simulated user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeclareStatistics()voidexecuteUserEnd(int userNumber)intexecuteUserSession(int userNumber, int sessionLoopNumber)voidexecuteUserSessionEnd(int sessionStatus, int userNumber, int sessionLoopNumber)voidexecuteUserStart(int userNumber)static voidmain(java.lang.String[] args)Main: Execute the JUnit tests as (real load) test.voidonUserResume(int userNumber)voidonUserSuspend(int userNumber)voidonUserTestAbort(int userNumber)-
Methods inherited from class com.dkfqs.tools.javatest.AbstractJavaTest
abstractMain, addAverageDeltaAndCurrentValue, addCounterLong, addEfficiencyRatioDelta, addSampleError, addSampleError, addSampleLong, addSimulatedUser, addTestResultAnnotationExecEvent, addThroughputDelta, declareStatistic, getArgDataOutputDirectory, getArgDelayPerSessionLoopMillis, getArgJobDescription, getArgMaxSessionLoopsPerUser, getArgMaxTestDuration, getArgNumberOfUsers, getArgRampUpTime, getExecuteEndTimestamp, getExecuteStartTimestamp, getFileApiThread, getSessionLoopNumber, getStdoutLogAdapter, getTotalFailedSessions, getTotalPassedSessions, getUserNumber, isArgDebugExecution, isArgDebugMeasuring, isGlobalAbortFlag, logTestSpecificResourceFileNames, registerSampleStart, run, setSpecificPassedLoopTimeDuration, sleep, startUserThreads, waitUserThreadsEnd
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
JUNIT_CONFIG_FILE_MAIN_ARG
public static final java.lang.String JUNIT_CONFIG_FILE_MAIN_ARG
The required (main) argument name for the JUnit config execution file.- See Also:
- Constant Field Values
-
TESTJOB_PROPERTIES_FILE_NAME
public static final java.lang.String TESTJOB_PROPERTIES_FILE_NAME
The name of the testjob properties file.- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Main: Execute the JUnit tests as (real load) test.- Parameters:
args- the command line args
-
declareStatistics
public void declareStatistics()
- Specified by:
declareStatisticsin classcom.dkfqs.tools.javatest.AbstractJavaTest
-
executeUserStart
public void executeUserStart(int userNumber) throws java.lang.Exception- Specified by:
executeUserStartin classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
executeUserSession
public int executeUserSession(int userNumber, int sessionLoopNumber) throws java.lang.Exception- Specified by:
executeUserSessionin classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
executeUserSessionEnd
public void executeUserSessionEnd(int sessionStatus, int userNumber, int sessionLoopNumber) throws java.lang.Exception- Specified by:
executeUserSessionEndin classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
onUserSuspend
public void onUserSuspend(int userNumber) throws java.lang.Exception- Specified by:
onUserSuspendin classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
onUserResume
public void onUserResume(int userNumber) throws java.lang.Exception- Specified by:
onUserResumein classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
executeUserEnd
public void executeUserEnd(int userNumber) throws java.lang.Exception- Specified by:
executeUserEndin classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
onUserTestAbort
public void onUserTestAbort(int userNumber) throws java.lang.Exception- Specified by:
onUserTestAbortin classcom.dkfqs.tools.javatest.AbstractJavaTest- Throws:
java.lang.Exception
-
-