Closed andacata closed 10 years ago
Looks like I had a slight issue with the Exit Logic. Fixed and published 0.2.1 to npm. Thank you for catching that.
I'm still getting this on 0.2.1
Details for the 1 failed test:
In test/casperjs/test.js:9
Open left sidebar
assertUrlMatch: Current url matches the provided pattern
Result log stored in xunit/casper-results.xml
Casper Task 'casper:functional' took ~4562ms to run
Done, without errors.
Can you provide your config block please?
Sure!
casper: {
functional: {
options: {
test: true
},
files : {
'xunit/casper-results.xml' : ['test/casperjs/test.js']
}
}
}
hmm, thats odd... I have a test for that in the test suite. Running The test from the cloned/node_module folder
$ grunt casper:fail
Running "casper:fail" (casper) task
Test file: test/fixtures/testFail.js
# Basic Site Testing Fail Tests
PASS Page title is: "Test Title"
PASS Header Exists
PASS P Tag Exists
FAIL Should Fail - Span Tag Does Not Exist
# type: assertExists
# file: test/fixtures/testFail.js:8
# code: test.assertExists('span', 'Should Fail - Span Tag Does Not Exist');
# subject: false
# selector: "span"
FAIL 4 tests executed in 0.069s, 3 passed, 1 failed, 0 dubious, 0 skipped.
Details for the 1 failed test:
In test/fixtures/testFail.js:8
Basic Site Testing Fail Tests
assertExists: Should Fail - Span Tag Does Not Exist
Result log stored in tmp/casper/testFail-results.xml
>>
Casper Task 'casper:fail' took ~700ms to run
Warning: Task "casper:fail" failed. Use --force to continue.
Aborted due to warnings.
That's weird :(
I'm running
$ node -v
v0.10.24
$ grunt --version
grunt-cli v0.1.13
grunt v0.4.2
on Windows 7.
Okay. I will check on a virtual instance of Win7.
It will be a bit until I get an instance up and running.. I will have to look into it after work. My windows navigation is a bit rusty. Feel free the check it out. I am assuming it has something to do with the exit code as it works in OSX and Ubuntu.
Tested version 0.2.1 on Windows 7 with Cygwin, and running fine. Thanks.
Great. Thanks @andacata .. @rictorres does the issue still exist for you? I wasn't able to replicate it on a Virtualized instance of Windows7
Details for the 2 failed tests:
In test/casperjs/test.js:1355
Open left sidebar
uncaughtError: Cannot dispatch mousedown event on nonexistent selector: .exp
In test/casperjs/test.js:9
Open left sidebar
assertUrlMatch: Current url matches the provided pattern
Result log stored in xunit/casper-results.xml
Casper Task 'casper:functional' took ~5520ms to run
Done, without errors.
Still the same. Perhaps is something related to my setup. I'm going to get a new machine in a couple weeks, so I'm not going to worry about this right now :)
Thanks for taking the time to test it (again). @andacata @iamchrismiller
No Problem.. Let me know if you run into anything.
I have noticed the same issue on Windows (7 and 8.1). It seems to be an issue with casperjs always having an exit code of 0 on windows. I traced it down to here: https://github.com/bboyle/grunt-casper/blob/master/tasks/lib/casper.js#L30
This post suggests it could be a python behaviour? http://glandium.org/blog/?p=3051 Here's the related line in casperjs: https://github.com/n1k0/casperjs/blob/master/bin/casperjs#L137
I'm not 100% sure though.
ps: I am using windows cmd, not cygwin.
Good news. Using the latest casperjs from github (master branch) works. Here's the fix: https://github.com/n1k0/casperjs/commit/a67b35d0eb3f96d08476f5bd8b5764ef2246459c
casperjs 1.1 beta 3 (on the casperjs website) was 3 months ago, the above fix was commited 2 months ago.
Thanks for the plugin Chris!
I'm executing my tests with the version 0.2.0 and the result is:
Executing the same tests with 0.1.4 the result was: