Edgewall Software

Changes between Version 12 and Version 13 of Report Formats


Ignore:
Timestamp:
Sep 16, 2010, 11:46:05 AM (14 years ago)
Author:
osimons
Comment:

Migrated to repository.

Legend:

Unmodified
Added
Removed
Modified
  • Report Formats

    v12 v13  
    11= Report Formats =
    22
    3 
    4 ----
    5 ref: http://groups.google.com/group/bitten/browse_thread/thread/537d240d0124cde0
    6 
    7 Cut 'n paste from Allen Bierbaum's post.
    8 ----
    9 
    10 The base element of the report must be "report" and have an attribute
    11 "category" that is one of "test", "coverage" or "lint".  Ex:
    12 
    13 {{{
    14 <report category="test|coverage|lint">
    15 </report>
    16 }}}
    17 
    18 Inside the report there must be elements for each report type.  The way the
    19 data is captured is pretty flexible because it can either be in attributes
    20 or in child elements.
    21 
    22 == Test Reports ==
    23 
    24 Test reports must have sub-elements of report of type "test".  These
    25 elements can have any of these attributes (or subelements with contained
    26 cdata)
    27 
    28   * '''duration:''' float duration of test
    29   * '''status:''' string "success", "failure", "error", or "ignore" (Changed in 0.6: added "ignore")
    30   * '''name:''' string name of the test
    31   * '''fixture:''' string name of the test fixture
    32   * '''file:''' path to test file relative to the base path for the build configuration
    33   * '''stdout:''' The output from the test
    34   * '''traceback:''' The traceback from any error or failure.
    35 
    36 Example:
    37 
    38 {{{
    39 #!xml
    40 <report category="test">
    41    <test duration="0.073"
    42          status="success"
    43          fixture="bitten.tests.model.BuildConfigTestCase"
    44          name="test_config_update_name"
    45          file="bitten/tests/model.py"
    46          stdout="Renaming build configuration"
    47          traceback="None">
    48    </test>
    49    <test>
    50      <duration>0.073</duration>
    51      <status>success</status>
    52      <fixture>bitten.tests.model.BuildConfigTestCase</fixture>
    53      <name>test_config_update_name</name>
    54      <file>bitten/tests/model.py</file>
    55      <stdout>Renaming build configuration</stdout>
    56    </test>
    57 </report>
    58 }}}
    59 
    60 == Coverage Reports ==
    61 
    62 Similarly, coverage reports must be inside "coverage" elements.  The
    63 allowable attributes are:
    64 
    65   * '''name:''' The name of the module being tested for coverage
    66   * '''file:''' The name of the file relative to the base path in the build configuration
    67   * '''percentage:''' The percentage of lines in that file covered
    68   * '''lines:''' The number of statements covered
    69   * '''line_hits:''' Line-by-line coverage of the file, where code lines have 0 or more times covered and non-code lines are marked as `'-'` (optional)
    70 
    71 Ex:
    72 
    73 {{{
    74 #!xml
    75 <report category="coverage">
    76    <coverage name="my_module"
    77              file="my_module.py"
    78              percentage="75"
    79              lines="4"
    80              line_hits="2 0 - 1 1">
    81     </coverage>
    82 </report>
    83 }}}
    84 
    85 == Lint Reports ==
    86 
    87 Lint issues are placed inside `<problem/>` tags, with allowed attributes of:
    88 
    89  * '''file:''' The name of the file relative to the base path in the build configuration
    90  * '''tag:''' Class, method or other useful identifiable location inside the file
    91  * '''line:''' Line number
    92  * '''cateory:''' Category for problem; "convention|warning|refactor|error"
    93 
    94 Example:
    95 
    96 {{{
    97 #!xml
    98 <report category="lint">
    99    <problem category="convention"
    100             line="17"
    101             tag="TestResultsChartGenerator"
    102             file="bitten/report/testing.py">
    103         Missing docstring
    104     </problem>
    105 </report>
    106 }}}
     3This page is now integrated into the main documentation in repository, so please see wiki:Documentation/reports.html for latest version.
    1074
    1085== See also ==