ulrich / grails-casper-plugin

Plugin Grails permettant de lancer des tests CasperJS
3 stars 3 forks source link

FileNotFoundException runing simple CasperJS script #4

Open genuinefafa opened 10 years ago

genuinefafa commented 10 years ago

I did the update of the plugin #3 but I'm unable to run any test. The first thing I trid was to use the example from the CasperJS site, something like this:

var casper = require('casper').create();

casper.start('http://casperjs.org/', function() {
  this.echo(this.getTitle());
});

casper.thenOpen('http://phantomjs.org', function() {
  this.echo(this.getTitle());
});

casper.run(function() {
  console.log("this is a test");
  // it fails no matter if I do this or not
  this.test.renderResults(true, 0, this.cli.get('newQuote'));
});

But, I get the error

| Running 1 casper test....
| Tests FAILED  - view reports in /Users/fafa/Develop/loki-project/loki/target/test-reports
| Executing following CasperJS test(s) file(s): [newQuote.js]
| Running 1 casper test...
| Error Error running casper tests: target/TESTS-casperjs-newQuote.js.xml (No such file or directory) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.io.FileNotFoundException: target/TESTS-casperjs-newQuote.js.xml (No such file or directory)
    at net.reservoircode.grails.plugin.casperjs.CasperGrailsTestType$_doRun_closure3.doCall(CasperGrailsTestType.groovy:106)
    at net.reservoircode.grails.plugin.casperjs.CasperGrailsTestType.doRun(CasperGrailsTestType.groovy:95)
    at _GrailsTest$_run_closure1.doCall(_GrailsTest.groovy:102)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at TestApp$_run_closure1.doCall(TestApp.groovy:32)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:591)
    at gant.Gant.executeTargets(Gant.groovy:590)
| Error Error running casper tests: target/TESTS-casperjs-newQuote.js.xml (No such file or directory)
| Running 1 casper test....
| Tests FAILED  - view reports in /Users/fafa/Develop/loki-project/loki/target/test-reports

I do have CasperJS and PhantomJS installed on the computer. I don't think its a problem with the test itself. I'm runing grails test-app casper: -echoOut -echoErr --stacktrace so almost all the information is returned here.

ulrich commented 10 years ago

Hello,

Thank you for your feedback, I'll see this compatibility issue asap.

Regards,