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() |
abstract String |
getBaseURL() |
abstract String[] |
getInputParameters() |
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 |
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 |
setExecutingInitSql(boolean executingInitSql) |
void |
setInstrumentation(boolean instrumentation) |
void |
setJavaCommand(String command) |
void |
setKillSwitch(boolean b) |
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() |
String |
startSut()
Start a new instance of the SUT.
|
void |
stopSut()
Stop the SUT.
|
computeExtraHeuristics, enableComputeSqlHeuristicsOrExtractExecution, execInsertionsIntoDatabase, getActionIndex, getConnection, getControllerHost, getControllerPort, getControllerServerPort, getDatabaseDriverName, getExtraHeuristics, getInfoForAuthentication, getPackagePrefixesToCover, getPreferredOutputFormat, getProblemInfo, getSqlDatabaseSchema, getUnitsInfoDto, handleSql, initSqlHandler, newAction, newTest, resetExtraHeuristics, setControllerHost, setControllerPort, startTheControllerServer, stopTheControllerServer, verifySqlConnectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresetStateOfSUTpublic static final String PROP_MUTE_SUT
protected volatile Process process
public final void setupForGeneratedTest()
SutHandlerpublic 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 abstract long getMaxAwaitForInitializationInSeconds()
public abstract void preStart()
public abstract void postStart()
public abstract void preStop()
public abstract void postStop()
public final void setJavaCommand(String command)
public 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 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 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<AdditionalInfo> getAdditionalInfoList()
getAdditionalInfoList in class SutControllerpublic final void newActionSpecificHandler(ActionDto dto)
newActionSpecificHandler in class SutControllerpublic final UnitsInfoDto getUnitsInfoDto()
getUnitsInfoDto in class SutControllerpublic void setKillSwitch(boolean b)
setKillSwitch in class SutControllerpublic void setExecutingInitSql(boolean executingInitSql)
setExecutingInitSql in class SutControllerprotected void startExternalProcessPrinter()
public int getWaitingSecondsForIncomingConnection()
Copyright © 2016–2021. All rights reserved.