Uploaded image for project: 'CiviHR'
  1. CiviHR
  2. HR-186

Consolidate HR test jobs by type

    Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: HR-1.0
    • Fix Version/s: HR-1.0
    • Component/s: None
    • Labels:
      None

      Description

      When running the test suite for CiviHR, we currently overload "WebTest_AllTests" in each of the HR extensions and spawn subjobs to execute each. These tests run independently in Jenkins, but this has the side-effect of consuming a lot of disk and CPU. (Each test requires its own working copy of CiviCRM+CiviHR, and each working copy has to be initialized for each test run.) Thus test runs are rather slow/expensive.

      The goal is to run more tests together in the same job. (We will still need a couple jobs – but fewer.)

      In the past, I tried using a simple shell script to run multiple test suites in the same job, e.g.

      --------------------
      #!/bin/bash
      cd hrjob; phpunit api_v3_AllTests
      cd hrjob; phpunit CRM_AllTests
      cd hrreport; phpunit WebTest_AllTests
      --------------------

      This kind of works, but: (1) If you mix api/CRM-tests with web-tests, the web-tests will fail (because API/CRM clobbers the DB). (2) The exit code should indicate whether any one of the test suites failed. (An incorrect exit code causes Jenkins to incorrectly display the result.) You can use "set -e/set +e" and "$?" to facilitate.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour, 30 minutes Original Estimate - 1 hour, 30 minutes
                1h 30m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 6 hours, 40 minutes
                2d 6h 40m