Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug mode and continuing on crash #66

Closed
JoelMarcey opened this issue Oct 28, 2013 · 6 comments
Closed

Debug mode and continuing on crash #66

JoelMarcey opened this issue Oct 28, 2013 · 6 comments

Comments

@JoelMarcey
Copy link

Hi, two questions about paratest:

*** 1. Is there a way to run phpunit in --debug mode with paratest, so that I can see the name of each individual test running as paratest is executing? I tried:

paratest --phpunit "phpunit --debug"

but that continues to run the tests like the --debug switch was never specified.

*** 2. Is there an option to have paratest continue running even after a phpunit crash? I am using HHVM to run various framework test suites and some of the tests in those suites cause fatal errors. So I get the

"Log file /tmp/PT_G8Mg9B is empty. This means a PHPUnit process has crashed."

type of message. Instead, is there a way to (1) spawn another instance of phpunit that continues with the next test after the crash? (2) run each test in its own process so that one crash does not affect all of the other tests (sort of like phpunit --process-isolation, I guess).

Thank you.

@julianseeger
Copy link
Contributor

I think "--functional" is what you expect for (2).
It will "Run methods instead of suites in separate processes." so it's probably like process-isolation except for dataproviders.

@JoelMarcey
Copy link
Author

@julianseeger Thanks for the reply. I thought about that and tried. But with and without -f, I get the following for a framework like assetic. Basically I crash at the 244th test or so.


hhvm ../../vendor/bin/paratest --functional

Running phpunit in 5 processes with /data/users/joelm/fbcode/hphp/test/frameworks/vendor/bin/phpunit. Functional mode is on

Configuration read from /data/users/joelm/fbcode/hphp/test/frameworks/frameworks/assetic/phpunit.xml.dist

...............................................................  63 / 269 ( 23%)
...............................F.......................E....... 126 / 269 ( 46%)
.............................................................EE 189 / 269 ( 70%)
E.EEEEEEEEEEEEEEEEEEEEEEEE.EEE.......


  [InvalidArgumentException]
  Log file /tmp/PT_Xii2HZ is empty. This means a PHPUnit process has crashed.



paratest [-p|--processes="..."] [-f|--functional] [--no-test-tokens] [-h|--help] [--phpunit="..."] [--runner="..."] [--bootstrap="..."] [-c|--configuration="..."] [-g|--group="..."] [--log-junit="..."] [--colors] [--path="..."] [path]

@brianium
Copy link
Contributor

Hey guys. My time to support paratest has definitely been limited, so I apologize for explanation rather than solution at the moment.

Just to clarify on some of the phpunit configurations, paratest is pretty limited in what it can support at the moment. Some things just don't delegate to PHPUnit as nicely as we might hope.

The functional switch [-f|--functional] switch works best for methods that have no external dependencies; it was originally designed to speed up selenium tests.

@uzbxodgiev
Copy link

Hi guys in Laravel 5.4 I installed paratest with composer but it crashes when I run my tests. Crash Log below

Log file C:\Users\SomUserName\AppData\Local\Temp\PT_9E76.tmp is empty. This means a PHPUnit process has crashed.
The process: C:\xampp\htdocs\project\project_project\some_project\vendor\bin\phpunit.bat --configuration C:\xampp\htdocs\project\project_project\some_project\phpunit.xml --log-junit C:\Users
SomUserName\AppData\Local\Temp\PT_9E76.tmp Tests\Feature\ExampleTest C:\xampp\htdocs\project\project_project\some_project\tests\Feature\ExampleTest.php
This means a PHPUnit process was unable to run "C:\xampp\htdocs\project\project_project\some_project\tests\Feature\ExampleTest.php"

@paslandau
Copy link

paslandau commented Jan 25, 2019

@JoelMarcey

For

*** 1. Is there a way to run phpunit in --debug mode with paratest, so that I can see the name of each individual test running as paratest is executing? I tried:

I added a --verbose=1 option in #361 that will now output the underyling phpunit command.

@github-actions
Copy link

This issue has gone two months without activity. In another two weeks, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Backlog or In Progress, I will leave it alone ... forever!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants