简体   繁体   中英

Pysys. About modifying the log level by default

How can I modify the log trace level set by default in PySys? I've defined some DEBUG log traces that don't appear when I run the testcase, assuming that the default value for that is currently set as INFO.

Thanks in advance.

You can use the -v option to the pysys run launcher ie pysys run -v DEBUG. See below for the available options (use pysys run -h to output this yourself);

PySys System Test Framework (version 0.9.2): Console run test helper

Usage: pysys.py run [option]* [tests]*
   where [option] includes;
       -h | --help                 print this message
       -r | --record               record the test results in the working directory
       -p | --purge                purge the output subdirectory on test pass
       -v | --verbosity STRING     set the verbosity level (CRIT, WARN, INFO, DEBUG)
       -a | --type      STRING     set the test type to run (auto or manual, default is both)
       -t | --trace     STRING     set the requirement id for the test run
       -i | --include   STRING     set the test groups to include (can be specified multiple times)
       -e | --exclude   STRING     set the test groups to exclude (can be specified multiple times)
       -c | --cycle     INT        set the the number of cycles to run the tests
       -o | --outdir    STRING     set the name of the test output subdirectory
       -m | --mode      STRING     set the user defined mode to run the tests
       -n | --threads   INT        set the number of worker threads to run the tests (defaults to 1).
                                   A value of 0 sets to the number of available CPUs
       -X               KEY=VALUE  set user defined options to be passed through to the test and
                                   runner classes. The left hand side string is the data attribute
                                   to set, the right hand side string the value (True of not specified)

   and where [tests] describes a set of tests to be run. Note that multiple test sets can be specified,
   where none are given all available tests will be run. If an include group is given, only tests that
   belong to that group will be run. If an exclude group is given, tests in the group will not be run.
   The following syntax is used to select a test set;

       test1    - a single testcase with id test1
       :test2   - upto testcase with id test2
       test1:   - from testcase with id test1 onwards
       id1:id2  - all tests between tests with ids test1 and test2

   e.g.
       pysys.py -vDEBUG --include MYTESTS test1:test4 test7
       pysys.py -c2 -Xhost=localhost test1:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM