PHPUnit tests doesn't run

Hi Community

So I'm trying to find a solution for this problem since hours.
In my opinion the configuration of PHPUnit should be ok.

When I make a right click on a class I can generate a PHPUnit test class - without problems.
The problem now is, when I click run on this class I don't see any test results. The only thing I can see in the Console is:

/Applications/MAMP/bin/php/php5.3.6/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_port=9000 -dxdebug.remote_mode=req /Applications/MAMP/htdocs/System/IndexTest2.php

Process finished with exit code 255


My configuration of PHPUnit is like the attachment Config1.png

And the configuration of PHP is like in the attachment Config2.png

Does anybody have an idea why it doesn't run? What I'm doing wrong?

Thanks!

Regards, Dario



Attachment(s):
Config2.png
Config1.png
8 comments
Comment actions Permalink

Hi Dario,

Based on command from Console I think you are executing "IndexTest2.php" (which is "PHP Script" type) configuration instead of the one named "Test" (which is PHPUnit type). Please make sure that you are using correct Configuration in the dropdown box on Main toolbar (just before Run and Debug buttons).

Plus I think you are running in Debug mode instead of just Run (based on all these params: "-dxdebug.remote_enable=1 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_port=9000 -dxdebug.remote_mode=req")

0
Comment actions Permalink

Hi Andriy

Thank you so much for your help, now it's working fine.

I just love how fast you can get support from here!

Wish you a nice day

Dario

0
Comment actions Permalink

I cannot run it too :(
what should I change in configurations to make it work ?

0
Comment actions Permalink
what should I change in configurations to make it work ?

Well ... you can start with describing your problem in details

0
Comment actions Permalink

Im trying to run Selenium test from IDE using PHPUnit
and test doesn't run and error appears:


Process finished with exit code 255



what this code actually mean ?
0
Comment actions Permalink

Process finished with exit code 255

what this code actually mean ?

No idea -- the error code is sent from PHPUnit itself -- maybe it cannot find some required files or something (worth checking PHP error log as it may have some details).

BTW -- are you able to execute your tests from command line (using phpunit command)?

0
Comment actions Permalink

BTW -- are you able to execute your tests from command line (using phpunit command)?

yes, Iam

0
Comment actions Permalink

BTW -- are you able to execute your tests from command line (using phpunit command)?

yes, Iam

Well .. what can I say. It is quite possible that PhpStorm's wrapper script (that is used for integration purposes between PHPUnit itself and IDE) can cause some issues -- no solution is perfect.

Unfortunately it is not possible to say what is going wrong and where with this sort of information. If you can create reproducible case and submit it to the Issue Tracker as new ticket, then corresponding dev will have a look at it (if the project you are working on is open source / publicly available then I see no problems with creating such ticket; if it's private project -- well, devs need to have something to work with -- maybe you can create such ready-to-test project for them).

Other than that -- no real idea on how to resolve it for you. You can try using "Debug" instead of "Run" and pinpoint the place where the issue occurs (maybe it's out of resources, or wrapper script code is not safe, or php process just crashes for whatever reason) -- this may give you some ideas on what is wrong and how it can be improved/bypassed.

P.S.
When you execute tests from within the IDE, it executes that wrapper  script that does all the job. If you execute that exactly the same  command but launched from command line and not from IDE -- do you see  the same behavior (i.e. it fails with the same error code of 255)?

P.P.S.
And to double check -- please check that you using correct Run/Debug configuration entry (the issue that original poster had) -- maybe, just maybe, you are doing something wrong here? Can you post some screenshots with your configurations etc that would show how it is configured, what you are trying to run and what command is executed (the console/output window).

0

Please sign in to leave a comment.