Sort Tests on Build Summary page

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Builds, User Interface
    • None
    • 0
    • 2

      Problem Definition

      At this time, Tests are not filtered on the Build Result Summary page, and appear to only be ordered by Test Class.

      Suggested Solution

      Add test case name to order by clause of Hibernate query findTestsForChainResultByDeltaStates

      Workaround

      One way to get a list of Tests ordered alphabetically by Test Class and Test Case, for a given list of Jobs and Job Numbers:

      For MySQL
      select concat(substring_index(tcl.test_class_name,'.',-1), ' ', tca.test_case_name) 'Test',
          tcar.failing_since 'Failing since',
          b.title 'Job',
          tcar.duration 'Duration'
      FROM test_case_result tcar
      JOIN test_case tca ON (tcar.test_case_id = tca.test_case_id)
      JOIN test_class_result tclr ON (tcar.test_class_result_id = tclr.test_class_result_id)
      JOIN test_class tcl ON (tclr.test_class_id = tcl.test_class_id)
      JOIN build b ON (b.build_id = tcl.plan_id)
      JOIN buildresultsummary brs USING (buildresultsummary_id)
      WHERE full_key in (<list of job keys : PROJ-PLAN-JOB>)
        AND failing_since = <first failed job number>
        AND tcar.delta_state = 'BROKEN'
      ORDER BY tcl.test_class_name,
               tca.test_case_name,
               b.title;
      
      For PostgreSQL
      select replace(substring(tcl.test_class_name from '%#"._+#"' for '#'), '.', '')||' '||tca.test_case_name "Test",
          tcar.failing_since "Failing since'"
          b.title "Job",
          tcar.duration "Duration"
      FROM test_case_result tcar
      JOIN test_case tca ON (tcar.test_case_id = tca.test_case_id)
      JOIN test_class_result tclr ON (tcar.test_class_result_id = tclr.test_class_result_id)
      JOIN test_class tcl ON (tclr.test_class_id = tcl.test_class_id)
      JOIN build b ON (b.build_id = tcl.plan_id)
      JOIN buildresultsummary brs USING (buildresultsummary_id)
      WHERE full_key in (<list of job keys : PROJ-PLAN-JOB>)
        AND failing_since = <first failed job number>
        AND tcar.delta_state = 'BROKEN'
      ORDER BY tcl.test_class_name,
               tca.test_case_name,
               b.title;
      

              Assignee:
              Unassigned
              Reporter:
              Ellie Z
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: