Skip to content

Instantly share code, notes, and snippets.

@chmanie
Created September 23, 2013 22:21
Show Gist options
  • Save chmanie/6677783 to your computer and use it in GitHub Desktop.
Save chmanie/6677783 to your computer and use it in GitHub Desktop.
Test file: test/e2e/routes.js
# Google search retrieves 10 or more results
PASS google homepage title is the one expected
PASS main form is found
FAIL google title is ok
# type: assertTitle
# file: test/e2e/routes.js:13
# code: test.assertTitle("casperjs - Recherche Google", "google title is ok");
# subject: "casperjs - Google-Suche"
# expected: "casperjs - Recherche Google"
⚠  looks like you did not use begin(), which is mandatory since 1.1
FAIL AssertionError: google title is ok
# type: error
# file: test/e2e/routes.js
# subject: false
# error: {"message":"google title is ok","name":"AssertionError","result":{"success":false,"type":"assertTitle","standard":"Page title is: \"casperjs - Recherche Google\"","message":"google title is ok","file":"test/e2e/routes.js","doThrow":true,"values":{"subject":"casperjs - Google-Suche","expected":"casperjs - Recherche Google"},"line":13,"lineContents":"test.assertTitle(\"casperjs - Recherche Google\", \"google title is ok\");","suite":"Google search retrieves 10 or more results","time":349},"line":301,"sourceId":170304448,"sourceURL":"/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/tester.js","stack":"AssertionError: google title is ok\n at assert (/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/tester.js:301)\n at assertTitle (/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/tester.js:791)\n at test/e2e/routes.js:13\n at runStep (/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/casper.js:1518)\n at checkStep (/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/casper.js:368)","stackArray":[{"function":"assert","sourceURL":"/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/tester.js","line":301},{"function":"assertTitle","sourceURL":"/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/tester.js","line":791},{"sourceURL":"test/e2e/routes.js","line":13},{"function":"runStep","sourceURL":"/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/casper.js","line":1518},{"function":"checkStep","sourceURL":"/usr/local/Cellar/casperjs/1.1-beta2/libexec/modules/casper.js","line":368}]}
FAIL 4 tests executed in 0.909s, 2 passed, 2 failed, 0 dubious, 0 skipped.
Details for the 2 failed tests:
In test/e2e/routes.js:13
Google search retrieves 10 or more results
assertTitle: google title is ok
In test/e2e/routes.js
Google search retrieves 10 or more results
error: AssertionError: google title is ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment