What is the cause of error code 255 in PhantomJS and how to fix it? - phantomjs

While executing PhantomJS from a Jenkins job, I get regularly error codes 255 as follows :
20140804 18:43:55.362,10,SEVERE,"Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (PhantomJS Unit Test) on project XXXXXX: Command execution failed. Process exited with an error: 255 (Exit value: 255) -> [Help 1]",hudson.maven.Maven3Builder$MavenExecutionListener,
I ran Maven in debug mode, but I could not get more information. The issue appears after all tests have been run. There is one single failure, but the build is not supposed to fail.
Have you experienced this behavior ? What might be the cause for error code 255 and how to fix it ?
Thank you in advance !

I've finally found the problem and the solution.
One of our teams wrote a custom jasmin test runner for phantom.js which was calling phantom.exit(-1) with no log message under specific circumstances. As values not within [0-255] range are illegal from the point of view of phantomjs, it was exiting with an error code 255. We added log messages and changed the return code and now everything's fine.
Hope this helps.

Related

Intellij/Scalatest failing to start tests

I am running my Playspec tests but I keep getting error that 60 of the tests failed to start. What is surprising is the nesting of test cases.
Sorry, I don't have more information at the moment. What does the nested testcase list (lower left corner) in the picture mean? Are these test running in parallel?
The issue was that each test was starting its own instance of database. After a point in time, the system gets overwhelmed.

Is there a command to continue tests on failure in PHPUnit?

Is there a way to continue the the execution of PHPUnit tests when an assertion fails in the command line?
Is there for an example a flag for the PHPUnit Command like:
phpunit --continueonfailure
or something during an execution of a series of tests
I think PHPUnit by default continues to run tests upon failure. So you have probably defined stopOnFailure="true" in your phpunit.xml. Either remove that entirely or try setting it to true.
There are a couple of flags that you can append to your command that makes PHPUnit stop on error / failure:
--stop-on-defect Stop execution upon first not-passed test
--stop-on-error Stop execution upon first error
--stop-on-failure Stop execution upon first error or failure
--stop-on-warning Stop execution upon first warning
--stop-on-risky Stop execution upon first risky test
--stop-on-skipped Stop execution upon first skipped test
--stop-on-incomplete Stop execution upon first incomplete test
You can read more about phpunit.xml here.

Cuccumber + Capybara, When running a scenario in my feature file only the background steps are running whilst the scenario steps are ignored

After quite a few hours of searching for answers to this to no avail, along with trying to source the issue myself within rubymine, I am now resigning to asking a question for it...
When I run one of my scenario's in my feature file, or all scenario's, it only processes the background steps and then ignores all the others that are within my scenario.
The stats at the end then report:
1 Scenario (1 Failed)
4 Steps (3 Skipped, 1 Passed)
So no steps failed! I have verified that the scenario works on another machine and passes successfully. Does anyone have an idea why it would just be ignoring my scenario steps?
Thank you in advance
I have actually managed to fix this problem myself!!! :)
In the javascript_emulation.rb file there is a known issue around capybara and racktest, the workaround and easy fix for that is to remove ::Driver after :Capybara for the java emulation bits.
If none of the ::Driver entries are removed the following error is returned:
undefined method 'click' for class 'Capybara::Driver:RackTest:Node' (NameError)
then a list of the problem areas in different files.
If the ::Driver entry is removed from the class Capybara::Driver:RackTest::Node
then the test will run but only process the background tests.
All instances of ::Driver must be removed in this file. For me there were 4 in total.
Hope this helps others :)

Compiler internal error. Process terminated with exit code 3

I am using Intellij 9.0.4 I checked out a project from SVN, set up tomcat (its running locally), and now I am trying to Make (or Compile) but it keeps giving me Error:Compiler internal error. Process terminated with exit code 3. I have searched the internet and couldn't get this type exit code 3.
Do you have any idea? Or which log file should I have to check to see details of the problem?
Thanks
SOLVED: I got it. Just increase the maximum heap size of the compiler(Setting->Compiler->Java Compiler)
SOLVED: I got it. Just increase the maximum heap size of the compiler(Setting->Compiler->Java Compiler)

Making WSGI debug framework?

I'm trying to learn about using mod-wsgi, and I thought the best way would be for me to write my own simple 'debug' framework. I am NOT looking to use someone else's debug framework at this time.
The problem is, I'm not sure how to get started.
Specifically, I have a script working now where there is a WSGIAlias to my python script:
/testscript -> /home/bill/testscript.py [this works ok]
There are several annoying problems here, namely that if there is any syntax error of any kind, apache returns a 500 server error, and I have to check the server logs, which is annoying.
What I would like to do is to have some kind of framework called, that then encapsulates my script, this way when an error occurs (like a syntax error in testscript.py or any other type of exception), I can catch the exception, and return a nicely formatted HTML file with debugging information.
My question is, how do I 'pass' the script I want to run as an argument to my debug script?
From the command line, it would be easy, I would do something like this:
$ python debug.py myscript.py
How can I do this using WSGI though? Any ideas?