首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启用pysys测试被记录

启用pysys测试被记录
EN

Stack Overflow用户
提问于 2015-09-23 13:00:09
回答 1查看 118关注 0票数 2

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

测试运行良好,我还根据项目文件中显示的示例添加了JUnitXMLResultsWriter。但是,由于某些原因,记录没有被激活。

我已经在BaseRunner中找到了变量记录,当被直接设置为True时,它会按预期的方式工作,但这并不是真正的目的。

因此,我的问题是,应该在设置什么来激活我的测试案例的记录?

亲切问候斯特凡

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-09-23 14:21:13

您可以使用pysys.py运行启动程序使用-r选项(即"pysys.py run -r“)进行记录。然后,这将根据.pysysproject文件中配置的结果编写器记录输出。要获得完整的选项列表,请在运行目标上对pysys.py启动程序使用pysys.py选项,即

代码语言:javascript
复制
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) 
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32740320

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档