启用正在记录的pysys测试

2024-05-29 05:42:24 发布

您现在位置:Python中文网/ 问答频道 /正文

我目前正在尝试建立一些基于pysys框架的自动化测试。你知道吗

测试运行得很好,我还根据项目文件中显示的示例添加了JUnitXMLResultsWriter。 但是,由于某些原因,录制未激活。你知道吗

我已经在BaseRunner中找到了变量记录,当它被直接设置为True时,它就会像预期的那样工作,但这并不是我们的意图。你知道吗

因此,我的问题是,为了激活测试用例的记录,应该设置什么?你知道吗

谨致问候Stefan


Tags: 文件项目框架true示例记录测试用例原因
1条回答
网友
1楼 · 发布于 2024-05-29 05:42:24

您可以从pysys.py公司使用-r选项运行启动程序,即“pysys.py公司运行-r”。然后,这将根据.pysysproject文件中配置的结果写入程序记录输出。要获得完整的选项列表,请使用-h选项pysys.py公司运行目标上的启动器,即

C:\dev>pysys.py 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) 

相关问题 更多 >

    热门问题