Package de.hsh.graja.regression
Class RtTaskReq
- java.lang.Object
-
- de.hsh.graja.regression.RtTaskReq
-
public final class RtTaskReq extends Object
A request that is used to trigger a regression test. Old name: RegressionTestingRequest
-
-
Field Summary
Fields Modifier and Type Field Description Path
prevRecordedBehavior
Set<String>
recordingExists
Path
rootWorkspace
Set<String>
sampleSolutionsIncluded
Bei variablen Aufgaben kann dieses Set von readOnlySampleSolutions abweichen.Map<String,Ticket>
tickets
-
Method Summary
-
-
-
Method Detail
-
cleanup
public void cleanup()
-
consumeIfNotConsumed
public boolean consumeIfNotConsumed()
-
of
public static RtTaskReq of(String assignmentId, Operation operation, Set<String> sampleSolutions, Map<String,String> properties, Path pathToTaskZip, Path pathToPersistedBehavior, Logging log, WorkerPool pool)
Create a new request for the regression testing mechanism.- Parameters:
assignmentId
- identifier of the assignment, used for the report generationoperation
- to execute with the mechanismsampleSolutions
- sampleSolutions to use as test cases, can not contain a sample solution with the name of "index" as that would conflict with the index.htmlproperties
- properties of this request from i.e. the assignment.propertiespathToTaskZip
- a path pointing to an already existing task.zip, be aware that a task.zip might be modified when recording new behaviorpathToRegressionReport
- a path pointing to a folder which will contain the generated reportpathToPersistedBehavior
- a path pointing to a folder where the recorded behavior shall be persisted in- Returns:
- a new regression test request that can be used with the RegressionTestOperations API
-
copyOf
public RtTaskReq copyOf()
Create a copy of an request with its internal state reset.- Returns:
- a copy of a consumed request that can be submitted again.
-
getRecordedSampleSizeRounds
public int getRecordedSampleSizeRounds()
-
getTicket
public Ticket getTicket()
-
getIdGenerator
public IdGenerator getIdGenerator()
-
getPool
public WorkerPool getPool()
-
getLog
public Logging getLog()
-
getOperation
public Operation getOperation()
-
getPathToTaskZip
public Path getPathToTaskZip()
-
getPathToPersistedBehavior
public Path getPathToPersistedBehavior()
-
getAssignmentId
public String getAssignmentId()
-
getGlobalLevenshteinThreshold
public int getGlobalLevenshteinThreshold()
-
getLevenshteinFor
public int getLevenshteinFor(String sampleSolution)
-
getScoreMax
public BigDecimal getScoreMax()
-
isKeepWorkspace
public boolean isKeepWorkspace()
-
isConsumed
public boolean isConsumed()
A request can only be submitted once. A consumed request will trigger an exception when supplied again.
UsecopyOf()
to create a copy of this request that can be submitted again.- Returns:
-
-