Interface CustomizationHandler
- All Known Implementing Classes:
EmbeddedSutController,ExternalSutController,SutController
-
Method Summary
Modifier and TypeMethodDescriptionorg.evomaster.client.java.controller.api.dto.CustomizedCallResultCodecategorizeBasedOnResponse(Object response) categorize result based on responsebooleancustomizeMockingDatabase(List<org.evomaster.client.java.controller.api.dto.MockDatabaseDto> databaseDtos, boolean enabled) implement how to enable/disable customized mock objects for databasebooleancustomizeMockingRPCExternalService(List<org.evomaster.client.java.controller.api.dto.problem.rpc.MockRPCExternalServiceDto> externalServiceDtos, boolean enabled) implement how to enable/disable mocking of RPC based external servicesbooleancustomizeRPCTestOutput(org.evomaster.client.java.controller.api.dto.RPCTestWithResultsDto rpcTest) here we provide additional handling on the generated RPC testsorg.evomaster.client.java.controller.api.dto.problem.rpc.ScheduleTaskInvocationResultDtocustomizeScheduleTaskInvocation(org.evomaster.client.java.controller.api.dto.problem.rpc.ScheduleTaskInvocationDto invocationDto, boolean invoked) implement how to invoke schedule task for providing a customized solution regarding ScheduleTaskInvocationResultDto, its status typed with ExecutionStatusDto indicates invocation status of the schedule tasks Once the task is successfully invoked, its status should be RUNNING then if the task is completed, its status should be COMPLETE FAILED is used to handle any exception in handling invocation of the schedule task.List<org.evomaster.client.java.controller.api.dto.CustomizedRequestValueDto>specify candidate values in requestsspecify importance levels for exceptions lower value more important, 0 is the most important exception which needs to be fixed earliestbooleanisScheduleTaskCompleted(org.evomaster.client.java.controller.api.dto.problem.rpc.ScheduleTaskInvocationResultDto invocationInfo) List<org.evomaster.client.java.controller.api.dto.problem.rpc.SeededRPCTestDto>specify seeded tests for RPCspecify customized annotation indicating that field in DTO is not null if any
-
Method Details
-
categorizeBasedOnResponse
org.evomaster.client.java.controller.api.dto.CustomizedCallResultCode categorizeBasedOnResponse(Object response) categorize result based on response
- Parameters:
response- is a given response- Returns:
- a call result code based on the response
-
getCustomizedValueInRequests
List<org.evomaster.client.java.controller.api.dto.CustomizedRequestValueDto> getCustomizedValueInRequests()specify candidate values in requests
- Returns:
- a list of specified values for requests
-
specifyCustomizedNotNullAnnotation
List<CustomizedNotNullAnnotationForRPCDto> specifyCustomizedNotNullAnnotation()specify customized annotation indicating that field in DTO is not null if any
- Returns:
- a list of such annotation
-
seedRPCTests
List<org.evomaster.client.java.controller.api.dto.problem.rpc.SeededRPCTestDto> seedRPCTests()specify seeded tests for RPC
- Returns:
- a list of dto for seeded tests
-
customizeRPCTestOutput
boolean customizeRPCTestOutput(org.evomaster.client.java.controller.api.dto.RPCTestWithResultsDto rpcTest) here we provide additional handling on the generated RPC tests
- Parameters:
rpcTest- represent generated tests by evomaster which contains executed actions and executed results, ie, return, for deriving assertions- Returns:
- a result of handling of additional RPC Test
-
customizeMockingRPCExternalService
boolean customizeMockingRPCExternalService(List<org.evomaster.client.java.controller.api.dto.problem.rpc.MockRPCExternalServiceDto> externalServiceDtos, boolean enabled) implement how to enable/disable mocking of RPC based external services
- Parameters:
externalServiceDtos- contains info about how to setup responsesenabled- reflect to enable (set it true) or disable (set it false) the specified external service dtos. Note that null [externalServiceDtos] with false [enabled] means that all existing external service setup should be disabled.- Returns:
- whether the mocked instance starts successfully,
-
customizeMockingDatabase
boolean customizeMockingDatabase(List<org.evomaster.client.java.controller.api.dto.MockDatabaseDto> databaseDtos, boolean enabled) implement how to enable/disable customized mock objects for database
- Parameters:
databaseDtos- contains info about how to mock databases based on commandNameenabled- reflect to enable (set it true) or disable (set it false) mock objects for sql command based on commandName Note that null [databaseDtos] with false [enabled] means that all existing mock objects should be disabled.- Returns:
- whether the mocked instance starts successfully,
-
customizeScheduleTaskInvocation
org.evomaster.client.java.controller.api.dto.problem.rpc.ScheduleTaskInvocationResultDto customizeScheduleTaskInvocation(org.evomaster.client.java.controller.api.dto.problem.rpc.ScheduleTaskInvocationDto invocationDto, boolean invoked) implement how to invoke schedule task for providing a customized solution regarding ScheduleTaskInvocationResultDto, its status typed with ExecutionStatusDto indicates invocation status of the schedule tasks Once the task is successfully invoked, its status should be RUNNING then if the task is completed, its status should be COMPLETE FAILED is used to handle any exception in handling invocation of the schedule task.
- Parameters:
invocationDto- specified necessary info for invoking/terminating schedule tasksinvoked- defines to invoke (invoked is true) or terminate (invoked is false) the specified schedule task- Returns:
- invocation result dto
-
isScheduleTaskCompleted
boolean isScheduleTaskCompleted(org.evomaster.client.java.controller.api.dto.problem.rpc.ScheduleTaskInvocationResultDto invocationInfo) - Parameters:
invocationInfo- has the info about the invoked schedule task- Returns:
- whether the task is completed
-
getExceptionImportanceLevels
specify importance levels for exceptions lower value more important, 0 is the most important exception which needs to be fixed earliest
- Returns:
- a map, key is the class of exception, and value is importance level which must not be less than 0
-