Changes between Version 22 and Version 23 of Obsolete/Development/Code/TestingComponents


Ignore:
Timestamp:
Dec 12, 2015, 12:54:05 PM (10 years ago)
Author:
/C=FR/O=CNRS/OU=UMR8607/CN=Michel Jouvin/emailAddress=jouvin@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Obsolete/Development/Code/TestingComponents

    v22 v23  
    240240=== Getting the component output displayed ===
    241241
    242 By default, all the component output produced by `$self->info()`, `$self->error()`, `$self->debug()`, `$self->verbose()` are not displayed when running the tests.
    243 To get it display, you can add the following line to your `~/.proverc`:
    244 
     242By default, all the component output produced by `$self->info()`, `$self->error()`, `$self->debug()`, `$self->verbose()` *are not displayed* when running the tests. To get it displayed, use one of the following two methodds:
     243
     244* Pass this option from the command line when executing the test:
     245{{{
     246mvn -Dprove.args=-v
     247}}}
     248
     249* Set it as your default configuration when executing the tests, adding the following line to your `~/.proverc`:
    245250{{{
    246251-v
    247252}}}
    248 Or pass this option from the command line with:
    249 {{{
    250 mvn -Dprove.args=-v
    251 }}}
     253
     254When doing the one of the actions described above, the component is run in `verbose`mode.
     255
     256=== Setting debug level in the component ===
     257
     258If you'd like to get debug message displayed to help troubleshooting a component, in addition to enabling the display of componennt output, you need to define the environment variable `QUATTOR_TEST_LOG_DEBUGLEVEL` to the appropriate debug level (1 to 5).
    252259
    253260== Conclusion ==
    254261
    255 I hope this will reduce the effort required to test Quattor code. New components should have a detailed test suite. And older components should receive one.
    256 
    257 With time, we should see less regressions and less fear to change the code in maintainable ways.
     262Unit tests are critical to prevent regressions in new versions and validate new features.
     263
     264New components *MUST HAVE* a detailed test suite. And older components should receive one.
     265