1

I have a strange situation on which I cannot get phantom tests to run from intellij.

java.io.IOException: The phantomjs executable cannot be launched from the path or from the value of the org.codehaus.jstestrunner.commandPattern property.See http://js-testrunner.codehaus.org/usage.html for instructions. Original exception: java.io.IOException: Cannot run program "phantomjs": error=2, No such file or directory

Now, I have no idea why this is because:

  • I can access phantom from the command line, as 'mvn test' works, runs and passes the tests
  • I have added it as a path variable
  • I have added it as a path variable that is accessible by a GUI program
  • I've check the permissions on the phantomjs file and they're as permissive as I can make them - they are permissive than the actual IntelliJ application, and 'owned' by the same owner / group
  • I have restarted my Mac / IntelliJ numerous times.
  • I have tried adding it as a 'VM' option for a 'mvn install' task:

    mvn test -Dorg.codehaus.jstestrunner.commandPattern="/usr/local/bin/phantomjs '%1$s' %2$s"

Can anyone think why the jstestrunner action that occurs as part of the mvn test target does not seem able to access / see my phantom installation

Community
  • 1
  • 1
Caroline
  • 1,582
  • 3
  • 16
  • 30

1 Answers1

1

First thing to check: did you try to hardcode in your pom.xml the full path to the PhantomJS executable?

I know it's not the "final" solution, but it's to make sure it works if you pass it the full-qualified-path.

Detro
  • 341
  • 1
  • 6
  • Also, it would be very useful if I can see the pom.xml, or part of it (the one where you invoke phantomjs). – Detro Sep 22 '12 at 11:14