How to run only one test in TestCase in NetBeans PHP?
Asked Answered
H

2

6

I can run all tests for current file, but how to run only one test?

Histopathology answered 5/2, 2011 at 15:2 Comment(1)
Was it added or is it still not possible?Mcadams
P
2

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.

Population answered 5/2, 2011 at 21:1 Comment(1)
"Right-click a test in that same pane to see if you get an option to run it alone." Unfortunately there is no such option.Histopathology
H
0

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

Halogenate answered 13/5, 2016 at 7:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.