public abstract class ExternalSutController extends SutController
| Modifier and Type | Field and Description |
|---|---|
protected Process |
process |
static String |
PROP_MUTE_SUT
System property to avoid printing the console output of the SUT.
|
| Constructor and Description |
|---|
ExternalSutController() |
| Modifier and Type | Method and Description |
|---|---|
List<AdditionalInfo> |
getAdditionalInfoList() |
List<TargetInfo> |
getAllCoveredTargetInfos() |
abstract String |
getBaseURL() |
BootTimeInfoDto |
getBootTimeInfoDto() |
String |
getExecutableFullPath() |
abstract String[] |
getInputParameters() |
void |
getJvmDtoSchema(List<String> dtoNames) |
abstract String[] |
getJVMParameters() |
abstract String |
getLogMessageOfInitializedServer() |
abstract long |
getMaxAwaitForInitializationInSeconds() |
abstract String |
getPathToExecutableJar() |
List<TargetInfo> |
getTargetInfos(Collection<Integer> ids) |
UnitsInfoDto |
getUnitsInfoDto() |
int |
getWaitingSecondsForIncomingConnection() |
boolean |
isInstrumentationActivated()
Check if bytecode instrumentation is on.
|
Boolean |
isSUTInitialized()
a customized interface to implement for checking if the system under test is started.
|
boolean |
isSutRunning()
Check if the system under test (SUT) is running and fully initialized
|
void |
newActionSpecificHandler(ActionDto dto) |
void |
newSearch()
Re-initialize all internal data to enable a completely new search phase
which should be independent from previous ones
|
void |
newTestSpecificHandler() |
abstract void |
postStart()
This method is going to be called after the SUT is started.
|
abstract void |
postStop()
If the SUT needs some third-party processes (eg a non-embedded database),
here we can shut them down once the SUT has been stopped.
|
abstract void |
preStart()
If the SUT needs some third-party processes (eg a non-embedded database),
here they can be configured and started.
|
abstract void |
preStop()
This method is going to be called before the SUT is stopped.
|
void |
setExecutingAction(boolean executingAction) |
void |
setExecutingInitMongo(boolean executingInitMongo) |
void |
setExecutingInitSql(boolean executingInitSql) |
void |
setInstrumentation(boolean instrumentation) |
ExternalSutController |
setJaCoCo(String jaCoCoAgentLocation,
String jaCoCoCliLocation,
String jaCoCoOutputFile,
int port) |
ExternalSutController |
setJavaCommand(String command) |
void |
setKillSwitch(boolean b) |
void |
setNeedsJdk17Options(boolean needsJdk17Options) |
void |
setupForGeneratedTest()
There might be different settings based on when the SUT is run during the
search of EvoMaster, and when it is later started in the generated tests.
|
protected void |
startExternalProcessPrinter(boolean checkSutInitializedWithLog) |
String |
startSut()
Start a new instance of the SUT.
|
void |
stopSut()
Stop the SUT.
|
addSuccessfulInitSqlInsertion, addTableToInserted, categorizeBasedOnResponse, cleanAccessedTables, computeExtraHeuristics, computeMongoHeuristics, customizeMockingDatabase, customizeMockingRPCExternalService, customizeRPCTestOutput, doEmploySmartDbClean, enableComputeSqlHeuristicsOrExtractExecution, execInsertionsIntoDatabase, execInsertionsIntoMongoDatabase, executeAction, executeHandleLocalAuthenticationSetup, executeRPCEndpoint, extractRPCProblemDto, extractRPCSchema, getActionIndex, getBootTimeInfoDto, getConnection, getConnectionIfExist, getControllerHost, getControllerPort, getControllerServerPort, getCustomizedValueInRequests, getDatabaseDriverName, getExceptionImportanceLevels, getExtraHeuristics, getInfoForAuthentication, getLocalAuthSetupSchemaMap, getPackagePrefixesToCover, getPreferredOutputFormat, getProblemInfo, getRPCClient, getRPCSchema, getSqlDatabaseSchema, getUnitsInfoDto, handleSeededTests, initMongoHandler, initSqlHandler, mockDatabasesWithCustomizedHandling, mockRPCExternalServicesWithCustomizedHandling, newAction, newTest, packagesToSkipInstrumentation, postSearchAction, readFileAsStringFromTestResource, registerOrExecuteInitSqlCommandsIfNeeded, registerOrExecuteInitSqlCommandsIfNeeded, resetCustomizedMethodForMockObject, resetDatabase, resetExtraHeuristics, seedRPCTests, setControllerHost, setControllerPort, specifyCustomizedNotNullAnnotation, startTheControllerServer, stopTheControllerServer, verifySqlConnectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDbSpecifications, getMongoConnection, handleLocalAuthenticationSetup, resetStateOfSUTpublic static final String PROP_MUTE_SUT
protected volatile Process process
public final ExternalSutController setJaCoCo(String jaCoCoAgentLocation, String jaCoCoCliLocation, String jaCoCoOutputFile, int port)
public int getWaitingSecondsForIncomingConnection()
public final void setupForGeneratedTest()
SutHandlerpublic void setNeedsJdk17Options(boolean needsJdk17Options)
public final void setInstrumentation(boolean instrumentation)
public abstract String[] getInputParameters()
public abstract String[] getJVMParameters()
public abstract String getBaseURL()
public abstract String getPathToExecutableJar()
public abstract String getLogMessageOfInitializedServer()
public Boolean isSUTInitialized()
public abstract long getMaxAwaitForInitializationInSeconds()
public abstract void preStart()
public abstract void postStart()
public abstract void preStop()
public abstract void postStop()
public final ExternalSutController setJavaCommand(String command)
public final String startSut()
SutHandlerStart a new instance of the SUT.
This method must be blocking until the SUT is initialized.
How this method is implemented depends on the library/framework in which
the application is written.
For example, in Spring applications you can use something like:
SpringApplication.run()
public final boolean isSutRunning()
SutControllerCheck if the system under test (SUT) is running and fully initialized
How to implement this method depends on the library/framework used
to build the application.
In Spring applications, this can be done with something like:
ctx != null && ctx.isRunning(), where ctx is a field where
ConfigurableApplicationContext should be stored when starting
the application.
isSutRunning in class SutControllerpublic final void stopSut()
SutHandlerStop the SUT.
How to implement this method depends on the library/framework in which
the application is written.
For example, in Spring applications you can save in a variable the ConfigurableApplicationContext
returned when starting the application, and then call stop() on it here.
public final boolean isInstrumentationActivated()
SutControllerisInstrumentationActivated in class SutControllerpublic final void newSearch()
SutControllernewSearch in class SutControllerpublic final void newTestSpecificHandler()
newTestSpecificHandler in class SutControllerpublic final List<TargetInfo> getTargetInfos(Collection<Integer> ids)
getTargetInfos in class SutControllerpublic final List<TargetInfo> getAllCoveredTargetInfos()
getAllCoveredTargetInfos in class SutControllerpublic final List<AdditionalInfo> getAdditionalInfoList()
getAdditionalInfoList in class SutControllerpublic BootTimeInfoDto getBootTimeInfoDto()
getBootTimeInfoDto in class SutControllerpublic final void newActionSpecificHandler(ActionDto dto)
newActionSpecificHandler in class SutControllerpublic final UnitsInfoDto getUnitsInfoDto()
getUnitsInfoDto in class SutControllerpublic final void setKillSwitch(boolean b)
setKillSwitch in class SutControllerpublic final void setExecutingInitSql(boolean executingInitSql)
setExecutingInitSql in class SutControllerpublic final void setExecutingInitMongo(boolean executingInitMongo)
setExecutingInitMongo in class SutControllerpublic final void setExecutingAction(boolean executingAction)
setExecutingAction in class SutControllerpublic final String getExecutableFullPath()
getExecutableFullPath in class SutControllerpublic final void getJvmDtoSchema(List<String> dtoNames)
getJvmDtoSchema in class SutControllerprotected void startExternalProcessPrinter(boolean checkSutInitializedWithLog)
Copyright © 2016–2024. All rights reserved.