public class AbstractJUnitTest
extends java.lang.Object
| Constructor and Description |
|---|
AbstractJUnitTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAverageDeltaAndCurrentValue(long statisticId,
long sumValuesDelta,
long numValuesDelta,
long currentValue,
long currentValueTimestamp)
All Purpose Interface: Add delta values to the average and set the current value for a 'average-and-current-value' statistic.
|
void |
addCounterLong(long statisticId,
long value)
All Purpose Interface: Increment the counter of a declared 'cumulative-counter-long' statistic.
|
void |
addEfficiencyRatioDelta(long statisticId,
long efficiencyDeltaValue,
long inefficiencyDeltaValue)
All Purpose Interface: Add efficiency ratio delta values to a 'efficiency-ratio-percent' statistic.
|
void |
addError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.util.List<java.lang.String> errorLogLines,
java.util.List<java.lang.String> errorContextLines)
All Purpose Interface: Add an error to the test result.
|
void |
addError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.lang.String errorLog,
java.lang.String errorContext)
All Purpose Interface: Add an error to the test result.
|
void |
addSampleError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.util.List<java.lang.String> errorLogLines,
java.util.List<java.lang.String> errorContextLines)
All Purpose Interface: Add an error to a declared statistic (for sample-event-time-chart statistics only, when measuring of a data sample did fail).
|
void |
addSampleError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.lang.String errorLog,
java.lang.String errorContext)
All Purpose Interface: Add an error to a declared statistic (for sample-event-time-chart statistics only, when measuring of a data sample did fail).
|
void |
addSampleLong(long statisticId,
long value)
All Purpose Interface: Add a measured long value to a statistic.
|
int |
addTestResultAnnotationExecEvent(java.lang.String eventText)
All Purpose Interface: Add an execution annotation event to the test result.
|
void |
addThroughputDelta(long statisticId,
double deltaValue)
All Purpose Interface: Add a measured delta value to a throughput statistic.
|
void |
closeAllPurposeInterface()
Close the All Purpose Interface.
|
void |
declareStatistic(long statisticId,
java.lang.String statisticType,
java.lang.String statisticTitle,
java.lang.String statisticSubtitle,
java.lang.String yAxisTitle,
java.lang.String unitText,
int sortPosition,
boolean addToSummaryStatistic,
java.lang.String backgroundColor)
All Purpose Interface: Declare a new statistic.
|
static java.io.File |
getArgDataOutputDirectory()
Get the data output directory.
|
static java.lang.String |
getUserInputField(java.lang.String variableName,
java.lang.String defaultValue)
Get the value of a user input field.
|
static int |
getUserNumber()
Get the simulated user number.
|
static boolean |
isArgDebugExecution()
Get if debug test execution is enabled.
|
static boolean |
isArgDebugMeasuring()
Get if debug data measuring is enabled.
|
void |
openAllPurposeInterface()
Open the All Purpose Interface for a specific simulated user.
|
void |
registerSampleStart(long statisticId)
All Purpose Interface: Register that the measuring of a long value sample has started
|
public static boolean isArgDebugExecution()
public static boolean isArgDebugMeasuring()
public static java.io.File getArgDataOutputDirectory()
public static int getUserNumber()
public static java.lang.String getUserInputField(java.lang.String variableName,
java.lang.String defaultValue)
variableName - the variable name of the user input fielddefaultValue - the default valuepublic void openAllPurposeInterface()
getUserNumber(),
closeAllPurposeInterface()public void closeAllPurposeInterface()
openAllPurposeInterface()public void declareStatistic(long statisticId,
java.lang.String statisticType,
java.lang.String statisticTitle,
java.lang.String statisticSubtitle,
java.lang.String yAxisTitle,
java.lang.String unitText,
int sortPosition,
boolean addToSummaryStatistic,
java.lang.String backgroundColor)
statisticId - the unique ID of the statisticstatisticType - the type of the statisticstatisticTitle - the title shown in the UIstatisticSubtitle - the subtitle shown in the UI, or an empty string = not shown in the UIyAxisTitle - the Y-axis title of the diagram shown in the UI, or an empty string = not shown in the UIunitText - the text for the measured unit shown in the UI, or an empty string = not shown in the UIsortPosition - the UI sort position (sorting order: from small to large positions)addToSummaryStatistic - if true = add the number of passed/failed/pending samples to the summary statisticbackgroundColor - the background color either as #hex-triplet or as bootstrap class, or an empty string = no special background colorAbstractJavaTest.STATISTIC_TYPE_SAMPLE_EVENT_TIME_CHART,
AbstractJavaTest.STATISTIC_TYPE_THROUGHPUT_TIME_CHART,
AbstractJavaTest.STATISTIC_TYPE_CUMULATIVE_COUNTER_LONG,
AbstractJavaTest.STATISTIC_TYPE_EFFICIENCY_RATIO_PERCENT,
AbstractJavaTest.STATISTIC_TYPE_AVERAGE_AND_CURRENT_VALUEpublic void registerSampleStart(long statisticId)
statisticId - the unique ID of the statisticaddSampleLong(long, long),
addSampleError(long, String, String, String, String, String),
AbstractJavaTest.STATISTIC_TYPE_SAMPLE_EVENT_TIME_CHARTpublic void addSampleLong(long statisticId,
long value)
statisticId - the unique ID of the statisticvalue - the measured long valueregisterSampleStart(long),
AbstractJavaTest.STATISTIC_TYPE_SAMPLE_EVENT_TIME_CHARTpublic void addSampleError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.lang.String errorLog,
java.lang.String errorContext)
statisticId - the unique ID of the statisticerrorSubject - the subject of the error. Note that multiple errors which contains the same subject can be grouped.errorSeverity - the error severityerrorType - the (optional) type of the error which reflects why the error did occur. Note that multiple errors which contains the same error type can be grouped.errorLog - the (optional) error logerrorContext - the (optional) error context that describes the circumstances under which the error occurred. It's recommended to pass a JSON object as string.AbstractJavaTest.ERROR_SEVERITY_WARNING,
AbstractJavaTest.ERROR_SEVERITY_ERROR,
AbstractJavaTest.ERROR_SEVERITY_FATAL,
AbstractJavaTest.registerSampleStart(long),
AbstractJavaTest.STATISTIC_TYPE_SAMPLE_EVENT_TIME_CHARTpublic void addSampleError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.util.List<java.lang.String> errorLogLines,
java.util.List<java.lang.String> errorContextLines)
statisticId - the unique ID of the statisticerrorSubject - the subject of the error. Note that multiple errors which contains the same subject can be grouped.errorSeverity - the error severityerrorType - the (optional) type of the error which reflects why the error did occur. Note that multiple errors which contains the same error type can be grouped.errorLogLines - the lines of the error log, or an empty list if no such data are availableerrorContextLines - the lines of the error context, or an empty list if no such data are availableAbstractJavaTest.ERROR_SEVERITY_WARNING,
AbstractJavaTest.ERROR_SEVERITY_ERROR,
AbstractJavaTest.ERROR_SEVERITY_FATAL,
registerSampleStart(long),
AbstractJavaTest.STATISTIC_TYPE_SAMPLE_EVENT_TIME_CHARTpublic void addThroughputDelta(long statisticId,
double deltaValue)
statisticId - the unique ID of the statisticdeltaValue - the measured delta valueAbstractJavaTest.STATISTIC_TYPE_THROUGHPUT_TIME_CHARTpublic void addCounterLong(long statisticId,
long value)
statisticId - the unique ID of the statisticvalue - the value by which the counter is incrementedAbstractJavaTest.STATISTIC_TYPE_CUMULATIVE_COUNTER_LONGpublic void addEfficiencyRatioDelta(long statisticId,
long efficiencyDeltaValue,
long inefficiencyDeltaValue)
statisticId - the unique ID of the statisticefficiencyDeltaValue - the efficiency delta value to addinefficiencyDeltaValue - the inefficiency delta value to addAbstractJavaTest.STATISTIC_TYPE_EFFICIENCY_RATIO_PERCENTpublic void addAverageDeltaAndCurrentValue(long statisticId,
long sumValuesDelta,
long numValuesDelta,
long currentValue,
long currentValueTimestamp)
statisticId - the unique ID of the statisticsumValuesDelta - the sum of delta values to add to the averagenumValuesDelta - the number of delta values to add to the averagecurrentValue - the current value, or -1 if no such data is availablecurrentValueTimestamp - the Unix-like timestamp of the current value, or -1 if no such data is availableAbstractJavaTest.STATISTIC_TYPE_AVERAGE_AND_CURRENT_VALUEpublic void addError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.lang.String errorLog,
java.lang.String errorContext)
statisticId - the unique ID of the statistic, or -1 if this error is not bound to any statisticerrorSubject - the subject of the error. Note that multiple errors which contains the same subject can be grouped.errorSeverity - the error severityerrorType - the (optional) type of the error which reflects why the error did occur. Note that multiple errors which contains the same error type can be grouped.errorLog - the (optional) error logerrorContext - the (optional) error context that describes the circumstances under which the error occurred. It's recommended to pass a JSON object as string.AbstractJavaTest.ERROR_SEVERITY_WARNING,
AbstractJavaTest.ERROR_SEVERITY_ERROR,
AbstractJavaTest.ERROR_SEVERITY_FATAL,
AbstractJavaTest.addError(long, String, String, String, String, String)public void addError(long statisticId,
java.lang.String errorSubject,
java.lang.String errorSeverity,
java.lang.String errorType,
java.util.List<java.lang.String> errorLogLines,
java.util.List<java.lang.String> errorContextLines)
statisticId - the unique ID of the statistic, or -1 if this error is not bound to any statisticerrorSubject - the subject of the error. Note that multiple errors which contains the same subject can be grouped.errorSeverity - the error severityerrorType - the (optional) type of the error which reflects why the error did occur. Note that multiple errors which contains the same error type can be grouped.errorLogLines - the lines of the error log, or an empty list if no such data are availableerrorContextLines - the lines of the error context, or an empty list if no such data are availableAbstractJavaTest.ERROR_SEVERITY_WARNING,
AbstractJavaTest.ERROR_SEVERITY_ERROR,
AbstractJavaTest.ERROR_SEVERITY_FATAL,
AbstractJavaTest.addSampleError(long, String, String, String, List, List)public int addTestResultAnnotationExecEvent(java.lang.String eventText)
eventText - the event text