您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
phpunit使用testdox的testdox-text与testdox-html参数
发布时间:2021-09-18 15:47:32编辑:雪饮阅读()
前面有了解到phpunit中testdox在有测试方法带有参数(数据供给器)的情况下生成敏捷文档的一种效果,之前了解的testdox生成文档都是生成于控制台(cmd)中的。
那么敏捷文档还可以生成纯文本的文本文件或者网页html。
命令如:
C:\Users\Administrator>D:\phpstudy_pro\Extensions\php\php7.3.4nts\php.exe D:\phpstudy_pro\Extensions\php\php7.3.4nts\phpunit-9.5.8.phar --testdox --testdox-text 1.txt --testdox-html 2.html C:\Users\Administrator\PhpstormProjects\untitled\BankAccountTest.php
PHPUnit 9.5.8 by Sebastian Bergmann and contributors.
Bank Account (TestNamespace\BankAccount)
✔ Balance is initially zero
✘ Balance is initially zero
│
│ Failed asserting that false is true.
│
│ C:\Users\Administrator\PhpstormProjects\untitled\BankAccountTest.php:13
│
✔ Balance cannot become negative
✔ Balance cannot become negative
✔ Banancing method with data set "my named data"
✔ Banancing method with data set "my data"
Time: 00:00.009, Memory: 20.00 MB
Summary of non-successful tests:
Bank Account (TestNamespace\BankAccount)
✘ Balance is initially zero
│
│ Failed asserting that false is true.
│
│ C:\Users\Administrator\PhpstormProjects\untitled\BankAccountTest.php:13
│
FAILURES!
Tests: 6, Assertions: 6, Failures: 1.
这里分别生成了1.txt和2.html
关键字词:phpunit,testdox,testdox-text,testdox-html
下一篇:(解决 class Thread not found )php中安装pthreads扩展(php-5.4.45-Win32-VC9-x86+php_pthreads-2.0.8-5.4-ts-vc9-
相关文章
- phpunit敏捷文档testdox的带参情况
- phpunit使用testdox情况下多个测试方法的名字互相之间
- phpunit使用testdox生成敏捷文档
- phpunit中filter的使用(匹配命名空间、类、方法以及数
- phpunit中expectException的使用
- phpunit中NOTICE、WARNING、ERROR的断言支持
- phpunit中expectDeprecationMessageMatches的使用
- phpunit中expectDeprecationMessage的使用
- phpunit中的expectDeprecation的使用
- phpunit使用弱比较(assertEquals)时在差异生成过程中