Class TAPOracle


  • public class TAPOracle
    extends Oracle
    An oracle that ignores the expected string and scans the observed string for a TAP (Test Anything Protocol) JUnit 5 report. E.g.,
     1..8
     ok 1 - EncyclopediaAddCourse
     ok 2 - EncyclopediaAssign
     not ok 3 - EncyclopediaConstructor
     ok 4 - EncyclopediaCopy
     ok 5 - EncyclopediaRead
     not ok 6 - EncyclopediaRemoveCourse
     ok 7 - ResearchPlanAddPrior
     
    The score is the ratio of OK tests to the number tests.
    • Constructor Detail

      • TAPOracle

        public TAPOracle​(OracleProperties config,
                         TestCase testCase,
                         Submission submission,
                         Stage submitterStage)
        Create a new oracle.
        Parameters:
        config - configuration properties
        testCase - the test case to which this oracle will apply
        submission - the submission being judged
        submitterStage - 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.
        Specified by:
        compare in class Oracle
        Parameters:
        expected - the expected string
        actual - the string being examined
        Returns:
        true if actual is an acceptable variant of expected.