如何在PySys中修改默认设置的日志跟踪级别?我已经定义了一些调试日志跟踪,这些跟踪在运行测试用例时不会出现,假设它的默认值当前设置为INFO。
提前谢谢。
发布于 2017-01-17 01:00:27
您可以使用-v选项来启动pysys run DEBUG,即pysys run -v DEBUG。下面是可用的选项(使用pysys run -h自己输出);
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:https://stackoverflow.com/questions/41633024
复制相似问题