Class XMLTestSuiteRunnerValidator

  • All Implemented Interfaces:
    Test, TestSuite

    public class XMLTestSuiteRunnerValidator
    extends DefaultTestSuite
    Validates the operation of the XMLTestSuireRunner by checking that it runs the tests specified by the command line parameter and only these tests.
    The test uses an dummy <testRun> which contains:
    - testRun, id="all" - testSuite, href="testSuiteA.xml"
    - testSuite, href="testSuiteB.xml"
    Where:
    - testSuite, id="A"
    - test, id="A1"
    - test, id="A2"
    - test, id="duplicateId"
    - testGroup, id="AG"
    - test, id="AG1"
    - test, id="AG2"
    and:
    - testSuite, id="B"
    - test, id="B1"
    - test, id="B2"
    - test, id="B3"
    - test, id="duplicateId"
    where all the leaf test pass.
    Version:
    $Id: XMLTestSuiteRunnerValidator.java 1805408 2017-08-18 12:21:52Z ssteiner $
    • Field Detail

      • ERROR_TEST_NOT_RUN

        public static final java.lang.String ERROR_TEST_NOT_RUN
        See Also:
        Constant Field Values
      • ERROR_EXTRA_TEST_RUN

        public static final java.lang.String ERROR_EXTRA_TEST_RUN
        See Also:
        Constant Field Values
      • ENTRY_KEY_CONFIGURATION

        public static final java.lang.String ENTRY_KEY_CONFIGURATION
        See Also:
        Constant Field Values
      • ENTRY_KEY_EXPECTED_RESULT

        public static final java.lang.String ENTRY_KEY_EXPECTED_RESULT
        See Also:
        Constant Field Values
      • ENTRY_KEY_ACTUAL_RESULT

        public static final java.lang.String ENTRY_KEY_ACTUAL_RESULT
        See Also:
        Constant Field Values
      • ENTRY_KEY_TEST_IDS_NOT_RUN

        public static final java.lang.String ENTRY_KEY_TEST_IDS_NOT_RUN
        See Also:
        Constant Field Values
      • ENTRY_KEY_TEST_ID_NOT_EXPECTED

        public static final java.lang.String ENTRY_KEY_TEST_ID_NOT_EXPECTED
        See Also:
        Constant Field Values
      • dummyTestRun

        static final java.lang.String dummyTestRun
        Dummy test-suite used to run the test
        See Also:
        Constant Field Values
    • Constructor Detail

      • XMLTestSuiteRunnerValidator

        public XMLTestSuiteRunnerValidator()
        This suite is made of elementary tests which validate that the XML result for a given input contains a list of report ids and no more (i.e., that the expected test reports were generated and no more).
        Specificaly, with fully qualified ids:
        - no arguments. All tests-reports should be produced.
        - 1 target test: "all.B.B3". A single test-report should be produced for B3.
        - 1 target test-suite: "all.A". A test-report with "A1", "A2", "duplicatedId", "AG", "AG.AG1" and "AG.AG2" should be produced.
        - 1 target test-suite and 2 tests: "all.B and all.A.A1 and all.A.A2. A test-report for "all.B.B1", "all.B.B2", "all.B.B3", "all.B.duplicatedId", "all.A.A1" and "all.A.A2" should be produced.
        - 1 target testGroup: "AG". A test-report with "A.AG", "A.AG.AG1" and "A.AG.AG2" should be produced.

        In addition, the following test with non-qualified ids:
        - 1 target test id: "duplicatedId" should be produced and pass for "all.A.duplicatedId" and "all.B.duplicatedId".