开发者

How to run only one test in TestCase in NetBeans PHP?

开发者 https://www.devze.com 2023-02-09 06:04 出处:网络
I can run all tests for current file, but how to run only one开发者_StackOverflow中文版 test?There are buttons in the Test Results pane to rerun only the tests that failed during the previous run, but

I can run all tests for current file, but how to run only one开发者_StackOverflow中文版 test?


There are buttons in the Test Results pane to rerun only the tests that failed during the previous run, but I know of no way to run a single test. Right-click a test in that same pane to see if you get an option to run it alone. I'm not at work to test out that theory.


There is a way to do it netbeans: Click Window -> Ide Tools -> Terminal and type:

phpunit --filter '/::testName$/' MyTest.php

Then click Enter. as far as I know there is no button or something in Netbeans that does that. So using terminal seems like the easiest way. It still is quite convenient though, because it should remember the history and later on you can just copy paste the test name.

Note that you may have to navigate to the test folder first or specify path to your Test file first in case Netbeans terminal doesn't open in your test project folder already

0

精彩评论

暂无评论...
验证码 换一张
取 消