Class RtTaskReq


  • public final class RtTaskReq
    extends Object
    A request that is used to trigger a regression test. Old name: RegressionTestingRequest
    • Field Detail

      • rootWorkspace

        public Path rootWorkspace
      • prevRecordedBehavior

        public Path prevRecordedBehavior
      • recordingExists

        public final Set<String> recordingExists
      • sampleSolutionsIncluded

        public final Set<String> sampleSolutionsIncluded
        Bei variablen Aufgaben kann dieses Set von readOnlySampleSolutions abweichen. Sonst nicht.
    • 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 generation
        operation - to execute with the mechanism
        sampleSolutions - sampleSolutions to use as test cases, can not contain a sample solution with the name of "index" as that would conflict with the index.html
        properties - properties of this request from i.e. the assignment.properties
        pathToTaskZip - a path pointing to an already existing task.zip, be aware that a task.zip might be modified when recording new behavior
        pathToRegressionReport - a path pointing to a folder which will contain the generated report
        pathToPersistedBehavior - 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()
      • getOperation

        public Operation getOperation()
      • getPathToTaskZip

        public Path getPathToTaskZip()
      • getPathToPersistedBehavior

        public Path getPathToPersistedBehavior()
      • getReadOnlySampleSolutions

        public Set<String> getReadOnlySampleSolutions()
      • getReadOnlyParameters

        public Map<String,​String> getReadOnlyParameters()
      • getAssignmentId

        public String getAssignmentId()
      • getRecordedSampleSizeRoundsFor

        public Set<String> getRecordedSampleSizeRoundsFor()
      • getUnsetRequestParameters

        public Set<String> getUnsetRequestParameters()
      • getLocalLevenshteinThreshold

        public Map<String,​Integer> getLocalLevenshteinThreshold()
      • getGlobalLevenshteinThreshold

        public int getGlobalLevenshteinThreshold()
      • getLevenshteinFor

        public int getLevenshteinFor​(String sampleSolution)
      • isKeepWorkspace

        public boolean isKeepWorkspace()
      • getExpectedSuccessRate

        public Map<String,​Double> getExpectedSuccessRate()
      • getExpectedSuccessRateFor

        public Double getExpectedSuccessRateFor​(String sampleSolution)
      • isConsumed

        public boolean isConsumed()
        A request can only be submitted once. A consumed request will trigger an exception when supplied again.
        Use copyOf() to create a copy of this request that can be submitted again.
        Returns: