An Oracle blog about NetBeans for PHP

Run/Debug focused test method

Hi all, today it will be just very short blog post about a useful feature that will be present in NetBeans 7.4.

Everyone of us has a plenty of unit tests, right? And currently, there is no easy way to run (or debug) just one single test (one single method) - but this will change in NetBeans 7.4. The only thing one has to do is to right click in a test method which shows this context menu:

Run single test method

If you invoke the selected action, expected test result will appear:

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans Bugzilla (component php, subcomponent PHPUnit).

Join the discussion

Comments ( 7 )
  • Tom Friday, April 26, 2013

    A very good idea!

    But: is the wording a good choice?

    The word "Focused" is not "simple English" and non-English users may have difficulties understanding what it means.

    Especially since "focused" is a programming term, not everyone will know that the "focused method" is the one where your cursor is.

    How about "Run Test Method At Your Cursor" instead?

    Or shorter: "Run This Test Method"?

    Anyway, I would suggest to avoid the term "focused" here.

  • Tomas Mysik Friday, April 26, 2013

    @Tom: Please, submit an issue to NetBeans Bugzilla (link is in the blog post).


  • Chris Friday, May 3, 2013

    Nice improvement :D

  • kirugan Monday, May 6, 2013

    @Tomas @Tom is right, "Run this test method" is much easy to understand than "Run Focused ...". Until i saw @Tom comment i thought its something like "Run specific test cases"

  • Tomas Mysik Tuesday, May 7, 2013

    @kirugan: I can only repeat myself - please, submit an issue (we use action from the IDE infrastructure and the label comes from it, not from PHP support).


  • boen_robot Monday, May 13, 2013

    Does that command ignore any @depends annotations? IMHO, it should ignore them, if it doesn't already.

  • David Harkness Tuesday, June 25, 2013

    @boen_robot - Of course, if that method takes the return value from the method it depends upon, the test will likely fail for non-obvious reasons.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.