PHPUnit hanging on first test of third testcase class - phpunit

Running Laravel 5.1
I've got a couple of testcase classes, each one runs fine by itself but when I run them together, eg. >phpunit without a filter, it hangs on the first test of the final testcase class. (I implemented my own listener so I could see which suites where running.
It doesn't break or just stop, it just sits at the command line and I have to ctrl C to stop the batch file. If I remove the first test case in the 3rd suite, it hangs on the next test.
I put in the xml file and also run it with --stderr, to no avail.

Related

How to stop PHPUnit in the middle of tests but still get a list of failures / reports?

We have a test suite that runs 30 or more minutes and it is not uncommon for me to see a situation like this:
I don't generally want to break on a first failure (--stop-on-failure) but in this specific example, I also don't want to wait another 10-15 minutes for the test suite to finish. If I do Ctrl+C, the process stops immediately and I won't see any messages.
I'm specifically interested in the format that PHPUnit uses in the console which I find very useful. For example, logging to a file using --testdox-text produces a nice but not very detailed list. Logging with --log-teamcity is verbose and quite technical.
Is there a way to see "console-like" PHPUnit messages before the test suite fully finishes?
Update: I've also opened an issue in the official repo.
maybe you could register a listener in your phpunit.xml file and implement its addFailure() method to display some info in console or a file...

How to run multiple debug instances of a GM:S game

I'm building a client/server application in Game Maker: Studio 1.4 and need to run two instances of the game for testing. Unfortunately, the IDE's run/debug buttons disable themselves after starting the first copy. Is there a way to configure the IDE to permit two instances to run concurrently?
Opening two complete copies of the IDE sort of works, but seems like a great way to break my game by saving things out of sync.
I'm currently exporting the game every time I make a tiny code change and only debugging on the host instance, which is less than ideal.
Is there a way to configure the IDE to allow multiple instances of the game to run via the run/debug buttons?
Allright, here's what I have;
When you compile a game from the IDE you'll see a line like this one somewhere in the compile log:
C:\Users\You\AppData\Roaming\GameMaker-Studio\Runner.exe -game "C:\Users\You\AppData\Local\gm_ttt_92729\gm_ttt_68071\GAME.win"
When you execute that script in a command line (START+R) you'll see the game runs just fine.
In order to automate this, I am using the working_directory variable (which returns C:\Users\You\AppData\Local\gm_ttt_92729\gm_ttt_68071.
As GM:S does not support executing shell scripts, I have added this free asset to my game:
https://marketplace.yoyogames.com/assets/575/execute-shell
In my game I have added a button which calls this code;
ExecuteShell('%appdata%\Roaming\GameMaker-Studio\Runner.exe -game ' + working_directory + "ShootMUp.win",0)
Please note that you'll have to manually edit the .win file name.
But, this works and lets me run multiple instances of the same game without exporting it to .exe or build it again.

How can I run a script after phpunit tests finished

Can I run a PHP script automatically after all PHPUnit tests are finished?
I'd like to report some non-fatal issues (i.e. correct but suboptimal test results) after all tests are finished.
Assuming you can detect such sub-optimal results, PHPUnit (v9 and before) has a 'TestListener' facility, that can be extended with custom code and enabled in the phpunit.xml file. It can run code before and after tests, and for each potential result (pass/fail/errors, etc, etc).
PHPUnit 10 replaces the TestListener with a new events system.

Exception occured while invoking remote Soa service by httpClient

My IDE is IDEA Intellij.
By this IDE i run the program directly and get the right response successfully.
Now i build this program to a jar file by IDEA,
and i run the jar file in windows command line by:
java -jar XXX.jar
then error occurred in a line which looks like impossible to see error.
eg:in the line which defines a parameter etc.
I don't know exactly what case this error,just the ways of run the program are different.By the way i can't update the source code which i invoke by jar file.
When you run your app in IDEA, look for the "Run" tab that opens.
The first line there tells you exactly how Intellij has launch the app (just click on the full line to see if it is truncated with "..." ):
Java executable used
(some parameters set by Intellij you don't need to worry about)
(tons of classpath items you don't need to worry about)
the main class used
the program parameters used.
I am pretty sure that if you use these information to build your command line, it will succeed. The main class may be different than the one used by running your app with "java -jar" or some arguments may differ or be missing.

Geb: Moving on from a failed test rather than stopping the run

I'm (learning how to) writing and running Geb tests in Intellij. How do I configure Geb so that it runs all my tests rather than stop at the first fail and leaving the rest not run?
When using Spock's #Stepwise all feature methods are run in the order of their declaration in the spec and if one feature method fails then all the following feature methods are being skipped.
I created a #StepThrough annotation by subclassing #Stepwise and taking out the line of code that fails the entire testsuite after a single failure. You can grab the code here

Resources