X

An Oracle blog about NetBeans for PHP

Nette Tester support added

Hi all, today we will show you our support for another testing framework which has been added in NetBeans 8.0. This time, we will talk about Nette Tester.

As always, let's start with IDE Options:

IDE Options for Nette Tester

The next step (besides adding your testfiles, of course ;) is to select Nette Tester for your project. One can simply Test his/her project and if no testing provider is set yet (PHPUnit and atoum are the other possibilities), NetBeans will ask which one should be used.

PHP Project Options for Testing

If you use Composer (which you really should!), you definitely want to set tester script from your PHP project:

Nette Tester propertios of PHP project

Finally, your tests are run and you can review the results using the our Test Results UI:

Test Results UI for tests

Of course, one can also review the log produced by Nette Tester, just open/switch to the Output window:

Nette Tester log

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 Nette). You can also leave a comment here (please notice that the comments are moderated so they will not appear here immediately) but reporting issues is strongly preferred.

Join the discussion

Comments ( 14 )
  • John Tuesday, February 11, 2014

    What about Codeception support? It's more mature than this silly tester. Tester's author obviously never heard about fixtures, hierarchical tests, Hamcrest, BDD etc.


  • Tomas Mysik Tuesday, February 11, 2014

    To John: Have you reported it into NetBeans Bugzilla? If not, we can hardly know about every single PHP framework/tool and provide a support for it, sorry.


  • John Tuesday, February 11, 2014
  • Tomas Mysik Tuesday, February 11, 2014

    To John: Thanks for your report!


  • Wiseo Wednesday, March 5, 2014

    Thanks for the repost John,really appreciate it!

    Best regards, keep up the good work!


  • Aparna Basu Thursday, March 6, 2014

    Can you give a comprehensive - end to end - detail with an example? It should provide sufficient information on configuring nette/tester for NB8*; (if possible, also doing the same for composer since its diagnosis often shows errors); a sample class; a sample test class; necessary steps to run the same.

    I followed the above description and ran into the following problem.

    (1) I created composer.json (init)

    (2) I I rand composer to add dependency of bette/tester.

    (3) I used the example of https://github.com/nette/tester: (i) created a project, (ii) created a 'test' directory and placed the class and test class files in the source and test directories, respectively.

    (4) Followed the above steps in two ways: (i) exactly as mentioned, and (ii) using the test dir in the above step.

    Still when I ran the 'test' (ctrl + F6), I inevitably get the diagnosis as 'no tests executed (0.0s). What should I do?

    An early response will be appreciated. Thanks,

    Aparna Basu

    P.S. For some reasons, I am getting 'Comment authentication failed' error repeatedly.


  • Tomas Mysik Thursday, March 6, 2014

    To Aparna Basu: The simplest way to start with Nette Tester is likely to create a new PHP Sample project - Calculator with Nette Tester (simply invoke the New project wizard and choose this sample from Samples > PHP)


  • Aparna Basu Thursday, March 6, 2014

    Tomas: Hope, you can reach the dropbox URL.

    Earlier message:

    Cannot attach screenshot: sending email to Petr.Pisl@Oracle.COM: just an observation, it looks like the sender and writer of the email are different. Could you respond to the specific problem?

    Thanks for your prompt response though I am in a hurry to move on due to project constraint.


  • Tomas Mysik Thursday, March 6, 2014

    To Aparna Basu: Please, do NOT send any private e-mails. As written in the blog post, use NetBeans Bugzilla (the link is there as well) if you find any problem/issue.

    Thanks.


  • Aparna Basu Thursday, March 6, 2014

    Am I to understand that this IS a bug: what a waste of time!


  • Bob Tuesday, August 5, 2014

    Hi Tomas,

    I want to point out that support for Codeception if very important for the php-community. One thing that is lacking, is the support for enabling different File names. Now it is restricted to *Test.

    That means I cannot use 'run focused testmethod' in a *Cest class. This restriction I dont understand, as it does not seem useful.


  • Tomas Mysik Tuesday, August 5, 2014

    To Bob: Codeception is simply not supported by NetBeans right now, sorry. Feel free to submit a new enhancement for it.

    Thanks.


  • Bob Tuesday, August 5, 2014

    is it possible to remove restrictions for the 'run focused test method'?

    Currently, it does not work when:

    * a file is not ending with Test

    * and when a method does not start with test

    This restriction is from a conceptual and functionality perspective not useful. Without this restrictions, Netbeans actually does fully support Codeception as you can choose your own phpunit runfile.


  • Tomas Mysik Tuesday, August 5, 2014

    To Bob:

    > This restriction is from a conceptual and functionality perspective not useful.

    Not true. It follows PHPUnit conventions.

    > Without this restrictions, Netbeans actually does fully support Codeception as you can choose your own phpunit runfile.

    So, you are using existing *PHPUnit* support for running some *other* tool, right?


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

Integrated Cloud Applications & Platform Services