php – 仅生成刚刚测试过的内容

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – 仅生成刚刚测试过的内容脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
每次我运行一个类或整个文件夹的单元测试时,PHPunIT会为整个系统生成覆盖,因为它是在PHPunit.XMl中配置的.
这很糟糕,因为它需要更长的时间并耗尽 PHP的内存.

我的PHPunit.xML@H_502_3@

<!-- http://www.PHPunit.de/manual/current/en/apPEndixes.configuration.html -->
<PHPunit
    backupGlobals               = "false"
    backupstaticAttributes      = "false"
    colors                      = "true"
    convertErrorsToExceptions   = "true"
    convertNoticesToExceptions  = "true"
    convertWarningsToExceptions = "true"
    PRocessIsolation            = "false"
    stopOnFailure               = "false"
    SyntaxCheck                 = "false"
    bootstrap                   = "Bootstrap.PHP" >

    <testsuites>
        <testsuite name="Application Module Suite Test">
            <directory>./Module1Test</directory>
            <directory>./Module2Test</directory>
            <directory>./Module3Test</directory>
        </testsuite>
    </testsuites>

    <filter>
        <whitelist>
            <directory>../module/Module1</directory>
            <directory>../module/Module2</directory>
            <directory>../module/Module3</directory>
        </whitelist>
    </filter>

</PHPunit>

有没有办法动态地生成我现在正在测试的内容?@H_502_3@


对于下面的命令,我想仅为Controller / ExampleController.PHP路径生成覆盖.@H_502_3@

PHPunit Controller/ExampleController.PHP --coverage-html ~/Desktop/tests

我正在使用PHPUnit 4.8和3.7,Sublime Text Editor,应用程序正在使用Zend Framework 2.@H_502_3@

脚本宝典总结

以上是脚本宝典为你收集整理的php – 仅生成刚刚测试过的内容全部内容,希望文章能够帮你解决php – 仅生成刚刚测试过的内容所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。