Class JUnit5Oracle
- java.lang.Object
-
- edu.odu.cs.zeil.codegrader.oracle.Oracle
-
- edu.odu.cs.zeil.codegrader.oracle.JUnit5Oracle
-
public class JUnit5Oracle extends Oracle
An oracle that ignores the expected string and scans the observed string for a JUnit 5 report, as generated by running junit-platform-console-*.jar. E.g.,Test run finished after 64 ms [ 3 containers found ] [ 0 containers skipped ] [ 3 containers started ] [ 0 containers aborted ] [ 3 containers successful ] [ 0 containers failed ] [ 10 tests found ] [ 0 tests skipped ] [ 10 tests started ] [ 0 tests aborted ] [ 6 tests successful ] [ 4 tests failed ]
The score is the ratio of successful tests to started tests.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.odu.cs.zeil.codegrader.oracle.Oracle
Oracle.ScoringOptions
-
-
Field Summary
-
Fields inherited from class edu.odu.cs.zeil.codegrader.oracle.Oracle
PASSED_TEST_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description JUnit5Oracle(OracleProperties config, TestCase testCase, Submission submission, Stage submitterStage)Create a new oracle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OracleResultcompare(java.lang.String expected, java.lang.String actual)Compare two strings to see if one is an acceptable variant of the other.-
Methods inherited from class edu.odu.cs.zeil.codegrader.oracle.Oracle
getCap, getCommand, getIgnoreCase, getIgnoreEmptyLines, getIgnorePunctuation, getIgnoreWS, getNumbersOnly, getPattern, getPrecision, getScoring, getStage, getSubmission, getTestCase
-
-
-
-
Constructor Detail
-
JUnit5Oracle
public JUnit5Oracle(OracleProperties config, TestCase testCase, Submission submission, Stage submitterStage)
Create a new oracle.- Parameters:
config- configuration propertiestestCase- the test case to which this oracle will applysubmission- the submission being judgedsubmitterStage- the stage where the submitted code has been built
-
-
Method Detail
-
compare
public OracleResult compare(java.lang.String expected, java.lang.String actual)
Compare two strings to see if one is an acceptable variant of the other. The precise meaning of "acceptable" depends on the settings.
-
-