#771: Improve test case coverage for trac-admin command
---------------------------+-----------------------
  Reporter:  rjollos       |      Owner:  nobody
      Type:  defect        |     Status:  new
  Priority:  major         |  Milestone:  Release 9
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:
---------------------------+-----------------------
Description changed by rjollos:

Old description:

> This ticket will explore how we can improve test coverage to avoid
> defects like those in #756 and #757.
>
> After tests were added in r1572372, only one failure is seen, with the
> method that is run on the global environment: `test_product_help_ok`. The
> tests in `test_product_help_version` and `test_product_help_version_add`
> should have failed if they were run against a global environment, but
> don't fail because they are run directly against a product environment.
> This is not realistic, because when `trac-admin` is called, it is called
> on a global environment and the command is dispatched to the product
> environment (this may be a poor way to describe what is actually
> happening, and I'll try to refine the description as I investigate
> further).
>
> The test in r1572374 has the same issue. It should fail if executed
> against the global environment, but it doesn't fail since it's execute
> against the product environment.
>
> Action items are:
>  1. In trac:#11502, test case coverage will be improved in the Trac core.
> The test methods `test_product_help_version` and
> `test_product_help_version_add` added in r1572372 will be back-ported.
>  1. Refactoring in trac:#11500 needs to be integrated.
>  1. Modify test harness so that tests are executed in the global
> environment. An initial patch is attached: attachment:t771-r1572373.diff.
> The patch will likely be refined, after trac:#11500 and trac:#11502 are
> integrated in Bloodhound.

New description:

 This ticket will explore how we can improve test coverage to avoid defects
 like those in #756 and #757.

 After tests were added in r1572372, only one failure is seen, with the
 method that is run on the global environment: `test_product_help_ok`. The
 tests in `test_product_help_version` and `test_product_help_version_add`
 should have failed if they were run against a global environment, but
 don't fail because they are run directly against a product environment.
 This is not realistic, because when `trac-admin` is called, it is called
 on a global environment and the command is dispatched to the product
 environment (this may be a poor way to describe what is actually
 happening, and I'll try to refine the description as I investigate
 further).

 The test in r1572374 has the same issue. It should fail if executed
 against the global environment, but it doesn't fail since it's execute
 against the product environment.

 Action items are:
  1. In trac:#11502, test case coverage will be improved in the Trac core.
 The test methods `test_product_help_version` and
 `test_product_help_version_add` added in r1572372 will be back-ported.
  1. Refactoring in trac:#11500 needs to be integrated.
  1. Modify test harness so that tests are executed in the global
 environment. An initial patch is attached: attachment:t771-r1572399.diff.
 The patch will likely be refined, after trac:#11500 and trac:#11502 are
 integrated in Bloodhound.

--

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/771#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to