Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12400

Output upgrade test results in JUnit XML format

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.5
    • Component/s: Test suite
    • Labels:
      None

      Description

      The civicrm-upgrade-test [F1] shell script verifies that the CiviCRM upgrade logic executes without error for a range of databases. The outputs are displayed on the console.

      To facilitate automated testing with Jenkins, the test script should create a JUnit XML [F2] that can be recognized by Jenkins. The XML output should include the name of each tested database, the pass/fail status, and (for failures) the drush output.

      For example, one might replace the last ten lines ([F3] under "Report Status") with a PHP helper script. For example, the PHP helper script might be used like:

      php create-junit-xml.php "/path/to/output" databases/db_1.sql.bz2 databases/db_2.sql.bz2 databases/db_3.sql.bz2 > junit.xml

      [F1] https://github.com/civicrm/civicrm-upgrade-test
      [F2] http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports
      [F3] https://github.com/civicrm/civicrm-upgrade-test/blob/05a300c590fa21b0dc9fa33207f69c2415cc2def/civicrm-upgrade-test#L121

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timotten Tim Otten
                Reporter:
                timotten Tim Otten
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: