diff --git a/cli/types/cypress-npm-api.d.ts b/cli/types/cypress-npm-api.d.ts index 21675a0e4b..2ccfbea666 100644 --- a/cli/types/cypress-npm-api.d.ts +++ b/cli/types/cypress-npm-api.d.ts @@ -8,6 +8,7 @@ declare namespace CypressCommandLine { type HookName = 'before' | 'beforeEach' | 'afterEach' | 'after' + interface TestError { name: string message: string @@ -225,7 +226,7 @@ declare namespace CypressCommandLine { startedAt: dateTimeISO endedAt: dateTimeISO duration: ms - }, + } /** * Reporter name like "spec" */ @@ -255,7 +256,7 @@ declare namespace CypressCommandLine { * resolved filename of the spec */ absolute: string - }, + } shouldUploadVideo: boolean } @@ -358,7 +359,7 @@ declare module 'cypress' { }) ``` */ - run(options?: Partial): Promise, + run(options?: Partial): Promise /** * Opens Cypress GUI. Resolves with void when the * GUI is closed. diff --git a/packages/server/__snapshots__/5_spec_isolation_spec.js b/packages/server/__snapshots__/5_spec_isolation_spec.js index eec49cf571..38975e5cf5 100644 --- a/packages/server/__snapshots__/5_spec_isolation_spec.js +++ b/packages/server/__snapshots__/5_spec_isolation_spec.js @@ -1,521 +1,3 @@ -exports['e2e spec isolation fails'] = { - "startedTestsAt": "2018-02-01T20:14:19.323Z", - "endedTestsAt": "2018-02-01T20:14:19.323Z", - "totalDuration": 5555, - "totalSuites": 8, - "totalTests": 12, - "totalFailed": 5, - "totalPassed": 5, - "totalPending": 1, - "totalSkipped": 1, - "runs": [ - { - "stats": { - "suites": 5, - "tests": 6, - "passes": 1, - "pending": 1, - "skipped": 1, - "failures": 3, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "endedAt": "2018-02-01T20:14:19.323Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 5, - "tests": 5, - "passes": 1, - "pending": 1, - "failures": 3, - "start": "2018-02-01T20:14:19.323Z", - "end": "2018-02-01T20:14:19.323Z", - "duration": 1234 - }, - "hooks": [ - { - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "function() {\n throw new Error(\"fail1\");\n }" - }, - { - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "function() {\n throw new Error(\"fail2\");\n }" - }, - { - "hookName": "after all", - "title": [ - "\"after all\" hook" - ], - "body": "function() {\n throw new Error(\"fail3\");\n }" - } - ], - "tests": [ - { - "title": [ - "simple failing hook spec", - "beforeEach hooks", - "never gets here" - ], - "state": "failed", - "body": "function() {}", - "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]", - "attempts": [ - { - "state": "failed", - "error": { - "name": "Error", - "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", - "stack": "[stack trace lines]" - }, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [ - { - "name": null, - "takenAt": "2018-02-01T20:14:19.323Z", - "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed).png", - "height": 720, - "width": 1280 - } - ] - } - ] - }, - { - "title": [ - "simple failing hook spec", - "pending", - "is pending" - ], - "state": "pending", - "body": "", - "displayError": null, - "attempts": [ - { - "state": "pending", - "error": null, - "videoTimestamp": null, - "duration": null, - "startedAt": null, - "screenshots": [] - } - ] - }, - { - "title": [ - "simple failing hook spec", - "afterEach hooks", - "runs this" - ], - "state": "failed", - "body": "function() {}", - "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]", - "attempts": [ - { - "state": "failed", - "error": { - "name": "Error", - "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", - "stack": "[stack trace lines]" - }, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [ - { - "name": null, - "takenAt": "2018-02-01T20:14:19.323Z", - "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png", - "height": 720, - "width": 1280 - } - ] - } - ] - }, - { - "title": [ - "simple failing hook spec", - "afterEach hooks", - "does not run this" - ], - "state": "skipped", - "body": "function() {}", - "displayError": null, - "attempts": [ - { - "state": "skipped", - "error": null, - "videoTimestamp": null, - "duration": null, - "startedAt": null, - "screenshots": [] - } - ] - }, - { - "title": [ - "simple failing hook spec", - "after hooks", - "runs this" - ], - "state": "passed", - "body": "function() {}", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [] - } - ] - }, - { - "title": [ - "simple failing hook spec", - "after hooks", - "fails on this" - ], - "state": "failed", - "body": "function() {}", - "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n [stack trace lines]", - "attempts": [ - { - "state": "failed", - "error": { - "name": "Error", - "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`", - "stack": "[stack trace lines]" - }, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [ - { - "name": null, - "takenAt": "2018-02-01T20:14:19.323Z", - "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png", - "height": 720, - "width": 1280 - } - ] - } - ] - } - ], - "error": null, - "video": "/foo/bar/.projects/e2e/cypress/videos/simple_failing_hook_spec.coffee.mp4", - "spec": { - "name": "simple_failing_hook_spec.coffee", - "relative": "cypress/integration/simple_failing_hook_spec.coffee", - "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", - "specType": "integration" - }, - "shouldUploadVideo": true - }, - { - "stats": { - "suites": 1, - "tests": 2, - "passes": 0, - "pending": 0, - "skipped": 0, - "failures": 2, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "endedAt": "2018-02-01T20:14:19.323Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 2, - "passes": 0, - "pending": 0, - "failures": 2, - "start": "2018-02-01T20:14:19.323Z", - "end": "2018-02-01T20:14:19.323Z", - "duration": 1234 - }, - "hooks": [], - "tests": [ - { - "title": [ - "simple failing spec", - "fails1" - ], - "state": "failed", - "body": "function() {\n return cy.wrap(true, {\n timeout: 100\n }).should(\"be.false\");\n }", - "displayError": "AssertionError: Timed out retrying: expected true to be false\n [stack trace lines]", - "attempts": [ - { - "state": "failed", - "error": { - "name": "AssertionError", - "message": "Timed out retrying: expected true to be false", - "stack": "[stack trace lines]" - }, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [ - { - "name": null, - "takenAt": "2018-02-01T20:14:19.323Z", - "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails1 (failed).png", - "height": 720, - "width": 1280 - } - ] - } - ] - }, - { - "title": [ - "simple failing spec", - "fails2" - ], - "state": "failed", - "body": "function() {\n throw new Error(\"fails2\");\n }", - "displayError": "Error: fails2\n [stack trace lines]", - "attempts": [ - { - "state": "failed", - "error": { - "name": "Error", - "message": "fails2", - "stack": "[stack trace lines]" - }, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [ - { - "name": null, - "takenAt": "2018-02-01T20:14:19.323Z", - "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails2 (failed).png", - "height": 720, - "width": 1280 - } - ] - } - ] - } - ], - "error": null, - "video": "/foo/bar/.projects/e2e/cypress/videos/simple_failing_spec.coffee.mp4", - "spec": { - "name": "simple_failing_spec.coffee", - "relative": "cypress/integration/simple_failing_spec.coffee", - "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", - "specType": "integration" - }, - "shouldUploadVideo": true - }, - { - "stats": { - "suites": 1, - "tests": 3, - "passes": 3, - "pending": 0, - "skipped": 0, - "failures": 0, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "endedAt": "2018-02-01T20:14:19.323Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 3, - "passes": 3, - "pending": 0, - "failures": 0, - "start": "2018-02-01T20:14:19.323Z", - "end": "2018-02-01T20:14:19.323Z", - "duration": 1234 - }, - "hooks": [ - { - "hookName": "before all", - "title": [ - "\"before all\" hook" - ], - "body": "function() {\n return cy.wait(100);\n }" - }, - { - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "function() {\n return cy.wait(200);\n }" - }, - { - "hookName": "after each", - "title": [ - "\"after each\" hook" - ], - "body": "function() {\n return cy.wait(200);\n }" - }, - { - "hookName": "after all", - "title": [ - "\"after all\" hook" - ], - "body": "function() {\n return cy.wait(100);\n }" - } - ], - "tests": [ - { - "title": [ - "simple hooks spec", - "t1" - ], - "state": "passed", - "body": "function() {\n return cy.wrap(\"t1\").should(\"eq\", \"t1\");\n }", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [] - } - ] - }, - { - "title": [ - "simple hooks spec", - "t2" - ], - "state": "passed", - "body": "function() {\n return cy.wrap(\"t2\").should(\"eq\", \"t2\");\n }", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [] - } - ] - }, - { - "title": [ - "simple hooks spec", - "t3" - ], - "state": "passed", - "body": "function() {\n return cy.wrap(\"t3\").should(\"eq\", \"t3\");\n }", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [] - } - ] - } - ], - "error": null, - "video": "/foo/bar/.projects/e2e/cypress/videos/simple_hooks_spec.coffee.mp4", - "spec": { - "name": "simple_hooks_spec.coffee", - "relative": "cypress/integration/simple_hooks_spec.coffee", - "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_hooks_spec.coffee", - "specType": "integration" - }, - "shouldUploadVideo": true - }, - { - "stats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "skipped": 0, - "failures": 0, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "endedAt": "2018-02-01T20:14:19.323Z" - }, - "reporter": "spec", - "reporterStats": { - "suites": 1, - "tests": 1, - "passes": 1, - "pending": 0, - "failures": 0, - "start": "2018-02-01T20:14:19.323Z", - "end": "2018-02-01T20:14:19.323Z", - "duration": 1234 - }, - "hooks": [ - { - "hookName": "before each", - "title": [ - "\"before each\" hook" - ], - "body": "function() {\n return cy.wait(1000);\n }" - } - ], - "tests": [ - { - "title": [ - "simple passing spec", - "passes" - ], - "state": "passed", - "body": "function() {\n return cy.wrap(true).should(\"be.true\");\n }", - "displayError": null, - "attempts": [ - { - "state": "passed", - "error": null, - "videoTimestamp": 9999, - "duration": 1234, - "startedAt": "2018-02-01T20:14:19.323Z", - "screenshots": [] - } - ] - } - ], - "error": null, - "video": "/foo/bar/.projects/e2e/cypress/videos/simple_passing_spec.coffee.mp4", - "spec": { - "name": "simple_passing_spec.coffee", - "relative": "cypress/integration/simple_passing_spec.coffee", - "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_passing_spec.coffee", - "specType": "integration" - }, - "shouldUploadVideo": true - } - ], - "browserPath": "path/to/browser", - "browserName": "FooBrowser", - "browserVersion": "88", - "osName": "FooOS", - "osVersion": "1234", - "cypressVersion": "9.9.9", - "config": {} -} - exports['e2e spec_isolation / failing with retries enabled'] = ` ==================================================================================================== @@ -592,7 +74,7 @@ Although you have test retries enabled, we do not retry tests when \`before all\ │ Pending: 1 │ │ Skipped: 1 │ │ Screenshots: 5 │ - │ Video: true │ + │ Video: false │ │ Duration: X seconds │ │ Spec Ran: simple_failing_hook_spec.coffee │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ @@ -614,13 +96,6 @@ Although you have test retries enabled, we do not retry tests when \`before all\ hook spec -- after hooks -- fails on this -- after all hook (failed).png - (Video) - - - Started processing: Compressing to 32 CRF - - Finished processing: /XXX/XXX/XXX/cypress/videos/simple_failing_hook_spec.coffee (X second) - .mp4 - - ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: simple_retrying_spec.js (2 of 2) @@ -652,7 +127,7 @@ Although you have test retries enabled, we do not retry tests when \`before all\ │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 2 │ - │ Video: true │ + │ Video: false │ │ Duration: X seconds │ │ Spec Ran: simple_retrying_spec.js │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ @@ -666,12 +141,6 @@ Although you have test retries enabled, we do not retry tests when \`before all\ t1 (failed) (attempt 2).png - (Video) - - - Started processing: Compressing to 32 CRF - - Finished processing: /XXX/XXX/XXX/cypress/videos/simple_retrying_spec.js.mp4 (X second) - - ==================================================================================================== (Run Finished) @@ -688,7 +157,1696 @@ Although you have test retries enabled, we do not retry tests when \`before all\ ` -exports['failing with retries enabled'] = { +exports['e2e spec_isolation fails [electron] 1'] = { + "startedTestsAt": "2018-02-01T20:14:19.323Z", + "endedTestsAt": "2018-02-01T20:14:19.323Z", + "totalDuration": 5555, + "totalSuites": 8, + "totalTests": 12, + "totalFailed": 5, + "totalPassed": 5, + "totalPending": 1, + "totalSkipped": 1, + "runs": [ + { + "stats": { + "suites": 5, + "tests": 6, + "passes": 1, + "pending": 1, + "skipped": 1, + "failures": 3, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 5, + "tests": 5, + "passes": 1, + "pending": 1, + "failures": 3, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n throw new Error(\"fail1\");\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n throw new Error(\"fail2\");\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n throw new Error(\"fail3\");\n }" + } + ], + "tests": [ + { + "title": [ + "simple failing hook spec", + "beforeEach hooks", + "never gets here" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "pending", + "is pending" + ], + "state": "pending", + "body": "", + "displayError": null, + "attempts": [ + { + "state": "pending", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "runs this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "does not run this" + ], + "state": "skipped", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "skipped", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "runs this" + ], + "state": "passed", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "fails on this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 21, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 19 | context \"after hooks\", ->\n 20 | after ->\n> 21 | throw new Error(\"fail3\")\n | ^\n 22 | \n 23 | it \"runs this\", ->\n 24 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_hook_spec.coffee", + "relative": "cypress/integration/simple_failing_hook_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 2, + "passes": 0, + "pending": 0, + "skipped": 0, + "failures": 2, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 2, + "passes": 0, + "pending": 0, + "failures": 2, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [], + "tests": [ + { + "title": [ + "simple failing spec", + "fails1" + ], + "state": "failed", + "body": "function() {\n return cy.wrap(true, {\n timeout: 100\n }).should(\"be.false\");\n }", + "displayError": "AssertionError: Timed out retrying: expected true to be false\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "AssertionError", + "message": "Timed out retrying: expected true to be false", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 3, + "column": 35, + "originalFile": "cypress/integration/simple_failing_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "frame": " 1 | describe \"simple failing spec\", ->\n 2 | it \"fails1\", ->\n> 3 | cy.wrap(true, {timeout: 100}).should(\"be.false\")\n | ^\n 4 | \n 5 | it \"fails2\", ->\n 6 | throw new Error(\"fails2\")", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails1 (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing spec", + "fails2" + ], + "state": "failed", + "body": "function() {\n throw new Error(\"fails2\");\n }", + "displayError": "Error: fails2\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fails2", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 6, + "column": 11, + "originalFile": "cypress/integration/simple_failing_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "frame": " 4 | \n 5 | it \"fails2\", ->\n> 6 | throw new Error(\"fails2\")\n | ^", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails2 (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_spec.coffee", + "relative": "cypress/integration/simple_failing_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 3, + "passes": 3, + "pending": 0, + "skipped": 0, + "failures": 0, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 3, + "passes": 3, + "pending": 0, + "failures": 0, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before all", + "title": [ + "\"before all\" hook" + ], + "body": "function() {\n return cy.wait(100);\n }" + }, + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n return cy.wait(200);\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n return cy.wait(200);\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n return cy.wait(100);\n }" + } + ], + "tests": [ + { + "title": [ + "simple hooks spec", + "t1" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t1\").should(\"eq\", \"t1\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple hooks spec", + "t2" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t2\").should(\"eq\", \"t2\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple hooks spec", + "t3" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t3\").should(\"eq\", \"t3\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_hooks_spec.coffee", + "relative": "cypress/integration/simple_hooks_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_hooks_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 1, + "passes": 1, + "pending": 0, + "skipped": 0, + "failures": 0, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 1, + "passes": 1, + "pending": 0, + "failures": 0, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n return cy.wait(1000);\n }" + } + ], + "tests": [ + { + "title": [ + "simple passing spec", + "passes" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(true).should(\"be.true\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_passing_spec.coffee", + "relative": "cypress/integration/simple_passing_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_passing_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + } + ], + "browserPath": "path/to/browser", + "browserName": "FooBrowser", + "browserVersion": "88", + "osName": "FooOS", + "osVersion": "1234", + "cypressVersion": "9.9.9", + "config": {} +} + +exports['e2e spec_isolation fails [chrome] 1'] = { + "startedTestsAt": "2018-02-01T20:14:19.323Z", + "endedTestsAt": "2018-02-01T20:14:19.323Z", + "totalDuration": 5555, + "totalSuites": 8, + "totalTests": 12, + "totalFailed": 5, + "totalPassed": 5, + "totalPending": 1, + "totalSkipped": 1, + "runs": [ + { + "stats": { + "suites": 5, + "tests": 6, + "passes": 1, + "pending": 1, + "skipped": 1, + "failures": 3, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 5, + "tests": 5, + "passes": 1, + "pending": 1, + "failures": 3, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n throw new Error(\"fail1\");\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n throw new Error(\"fail2\");\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n throw new Error(\"fail3\");\n }" + } + ], + "tests": [ + { + "title": [ + "simple failing hook spec", + "beforeEach hooks", + "never gets here" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "pending", + "is pending" + ], + "state": "pending", + "body": "", + "displayError": null, + "attempts": [ + { + "state": "pending", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "runs this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "does not run this" + ], + "state": "skipped", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "skipped", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "runs this" + ], + "state": "passed", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "fails on this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 21, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 19 | context \"after hooks\", ->\n 20 | after ->\n> 21 | throw new Error(\"fail3\")\n | ^\n 22 | \n 23 | it \"runs this\", ->\n 24 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_hook_spec.coffee", + "relative": "cypress/integration/simple_failing_hook_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 2, + "passes": 0, + "pending": 0, + "skipped": 0, + "failures": 2, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 2, + "passes": 0, + "pending": 0, + "failures": 2, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [], + "tests": [ + { + "title": [ + "simple failing spec", + "fails1" + ], + "state": "failed", + "body": "function() {\n return cy.wrap(true, {\n timeout: 100\n }).should(\"be.false\");\n }", + "displayError": "AssertionError: Timed out retrying: expected true to be false\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "AssertionError", + "message": "Timed out retrying: expected true to be false", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 3, + "column": 35, + "originalFile": "cypress/integration/simple_failing_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "frame": " 1 | describe \"simple failing spec\", ->\n 2 | it \"fails1\", ->\n> 3 | cy.wrap(true, {timeout: 100}).should(\"be.false\")\n | ^\n 4 | \n 5 | it \"fails2\", ->\n 6 | throw new Error(\"fails2\")", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails1 (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing spec", + "fails2" + ], + "state": "failed", + "body": "function() {\n throw new Error(\"fails2\");\n }", + "displayError": "Error: fails2\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fails2", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 6, + "column": 11, + "originalFile": "cypress/integration/simple_failing_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "frame": " 4 | \n 5 | it \"fails2\", ->\n> 6 | throw new Error(\"fails2\")\n | ^", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails2 (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_spec.coffee", + "relative": "cypress/integration/simple_failing_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 3, + "passes": 3, + "pending": 0, + "skipped": 0, + "failures": 0, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 3, + "passes": 3, + "pending": 0, + "failures": 0, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before all", + "title": [ + "\"before all\" hook" + ], + "body": "function() {\n return cy.wait(100);\n }" + }, + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n return cy.wait(200);\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n return cy.wait(200);\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n return cy.wait(100);\n }" + } + ], + "tests": [ + { + "title": [ + "simple hooks spec", + "t1" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t1\").should(\"eq\", \"t1\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple hooks spec", + "t2" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t2\").should(\"eq\", \"t2\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple hooks spec", + "t3" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t3\").should(\"eq\", \"t3\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_hooks_spec.coffee", + "relative": "cypress/integration/simple_hooks_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_hooks_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 1, + "passes": 1, + "pending": 0, + "skipped": 0, + "failures": 0, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 1, + "passes": 1, + "pending": 0, + "failures": 0, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n return cy.wait(1000);\n }" + } + ], + "tests": [ + { + "title": [ + "simple passing spec", + "passes" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(true).should(\"be.true\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_passing_spec.coffee", + "relative": "cypress/integration/simple_passing_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_passing_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + } + ], + "browserPath": "path/to/browser", + "browserName": "FooBrowser", + "browserVersion": "88", + "osName": "FooOS", + "osVersion": "1234", + "cypressVersion": "9.9.9", + "config": {} +} + +exports['e2e spec_isolation fails [firefox] 1'] = { + "startedTestsAt": "2018-02-01T20:14:19.323Z", + "endedTestsAt": "2018-02-01T20:14:19.323Z", + "totalDuration": 5555, + "totalSuites": 8, + "totalTests": 12, + "totalFailed": 5, + "totalPassed": 5, + "totalPending": 1, + "totalSkipped": 1, + "runs": [ + { + "stats": { + "suites": 5, + "tests": 6, + "passes": 1, + "pending": 1, + "skipped": 1, + "failures": 3, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 5, + "tests": 5, + "passes": 1, + "pending": 1, + "failures": 3, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n throw new Error(\"fail1\");\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n throw new Error(\"fail2\");\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n throw new Error(\"fail3\");\n }" + } + ], + "tests": [ + { + "title": [ + "simple failing hook spec", + "beforeEach hooks", + "never gets here" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "pending", + "is pending" + ], + "state": "pending", + "body": "", + "displayError": null, + "attempts": [ + { + "state": "pending", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "runs this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "does not run this" + ], + "state": "skipped", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "skipped", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "runs this" + ], + "state": "passed", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "fails on this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 21, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 19 | context \"after hooks\", ->\n 20 | after ->\n> 21 | throw new Error(\"fail3\")\n | ^\n 22 | \n 23 | it \"runs this\", ->\n 24 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_hook_spec.coffee", + "relative": "cypress/integration/simple_failing_hook_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 2, + "passes": 0, + "pending": 0, + "skipped": 0, + "failures": 2, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 2, + "passes": 0, + "pending": 0, + "failures": 2, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [], + "tests": [ + { + "title": [ + "simple failing spec", + "fails1" + ], + "state": "failed", + "body": "function() {\n return cy.wrap(true, {\n timeout: 100\n }).should(\"be.false\");\n }", + "displayError": "AssertionError: Timed out retrying: expected true to be false\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "AssertionError", + "message": "Timed out retrying: expected true to be false", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 3, + "column": 35, + "originalFile": "cypress/integration/simple_failing_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "frame": " 1 | describe \"simple failing spec\", ->\n 2 | it \"fails1\", ->\n> 3 | cy.wrap(true, {timeout: 100}).should(\"be.false\")\n | ^\n 4 | \n 5 | it \"fails2\", ->\n 6 | throw new Error(\"fails2\")", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails1 (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing spec", + "fails2" + ], + "state": "failed", + "body": "function() {\n throw new Error(\"fails2\");\n }", + "displayError": "Error: fails2\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fails2", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 6, + "column": 11, + "originalFile": "cypress/integration/simple_failing_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "frame": " 4 | \n 5 | it \"fails2\", ->\n> 6 | throw new Error(\"fails2\")\n | ^", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails2 (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_spec.coffee", + "relative": "cypress/integration/simple_failing_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 3, + "passes": 3, + "pending": 0, + "skipped": 0, + "failures": 0, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 3, + "passes": 3, + "pending": 0, + "failures": 0, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before all", + "title": [ + "\"before all\" hook" + ], + "body": "function() {\n return cy.wait(100);\n }" + }, + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n return cy.wait(200);\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n return cy.wait(200);\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n return cy.wait(100);\n }" + } + ], + "tests": [ + { + "title": [ + "simple hooks spec", + "t1" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t1\").should(\"eq\", \"t1\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple hooks spec", + "t2" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t2\").should(\"eq\", \"t2\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple hooks spec", + "t3" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(\"t3\").should(\"eq\", \"t3\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_hooks_spec.coffee", + "relative": "cypress/integration/simple_hooks_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_hooks_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 1, + "passes": 1, + "pending": 0, + "skipped": 0, + "failures": 0, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 1, + "passes": 1, + "pending": 0, + "failures": 0, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n return cy.wait(1000);\n }" + } + ], + "tests": [ + { + "title": [ + "simple passing spec", + "passes" + ], + "state": "passed", + "body": "function() {\n return cy.wrap(true).should(\"be.true\");\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_passing_spec.coffee", + "relative": "cypress/integration/simple_passing_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_passing_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + } + ], + "browserPath": "path/to/browser", + "browserName": "FooBrowser", + "browserVersion": "88", + "osName": "FooOS", + "osVersion": "1234", + "cypressVersion": "9.9.9", + "config": {} +} + +exports['e2e spec_isolation failing with retries enabled [electron] 1'] = { "startedTestsAt": "2018-02-01T20:14:19.323Z", "endedTestsAt": "2018-02-01T20:14:19.323Z", "totalDuration": 5555, @@ -761,9 +1919,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "fail1", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -781,9 +1948,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -833,9 +2009,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "fail2", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -853,9 +2038,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -903,7 +2097,7 @@ exports['failing with retries enabled'] = { { "state": "passed", "error": null, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [] @@ -925,9 +2119,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 21, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 19 | context \"after hooks\", ->\n 20 | after ->\n> 21 | throw new Error(\"fail3\")\n | ^\n 22 | \n 23 | it \"runs this\", ->\n 24 | ", + "language": "coffee" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -944,7 +2147,7 @@ exports['failing with retries enabled'] = { } ], "error": null, - "video": "/foo/bar/.projects/e2e/cypress/videos/simple_failing_hook_spec.coffee.mp4", + "video": null, "spec": { "name": "simple_failing_hook_spec.coffee", "relative": "cypress/integration/simple_failing_hook_spec.coffee", @@ -992,9 +2195,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "t1 attempt #0", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 5, + "column": 11, + "originalFile": "cypress/integration/simple_retrying_spec.js", + "relativeFile": "cypress/integration/simple_retrying_spec.js", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "frame": " 3 | const test = cy.state('test')\n 4 | \n> 5 | throw new Error(`${test.title} attempt #${cy.state('test').currentRetry()}`)\n | ^\n 6 | })\n 7 | \n 8 | it('t2', () => {", + "language": "js" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -1012,9 +2224,18 @@ exports['failing with retries enabled'] = { "error": { "name": "Error", "message": "t1 attempt #1", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 5, + "column": 11, + "originalFile": "cypress/integration/simple_retrying_spec.js", + "relativeFile": "cypress/integration/simple_retrying_spec.js", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "frame": " 3 | const test = cy.state('test')\n 4 | \n> 5 | throw new Error(`${test.title} attempt #${cy.state('test').currentRetry()}`)\n | ^\n 6 | })\n 7 | \n 8 | it('t2', () => {", + "language": "js" + } }, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [ @@ -1041,7 +2262,7 @@ exports['failing with retries enabled'] = { { "state": "passed", "error": null, - "videoTimestamp": 9999, + "videoTimestamp": null, "duration": 1234, "startedAt": "2018-02-01T20:14:19.323Z", "screenshots": [] @@ -1050,7 +2271,895 @@ exports['failing with retries enabled'] = { } ], "error": null, - "video": "/foo/bar/.projects/e2e/cypress/videos/simple_retrying_spec.js.mp4", + "video": null, + "spec": { + "name": "simple_retrying_spec.js", + "relative": "cypress/integration/simple_retrying_spec.js", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "specType": "integration" + }, + "shouldUploadVideo": true + } + ], + "browserPath": "path/to/browser", + "browserName": "FooBrowser", + "browserVersion": "88", + "osName": "FooOS", + "osVersion": "1234", + "cypressVersion": "9.9.9", + "config": {} +} + +exports['e2e spec_isolation failing with retries enabled [chrome] 1'] = { + "startedTestsAt": "2018-02-01T20:14:19.323Z", + "endedTestsAt": "2018-02-01T20:14:19.323Z", + "totalDuration": 5555, + "totalSuites": 6, + "totalTests": 8, + "totalFailed": 4, + "totalPassed": 2, + "totalPending": 1, + "totalSkipped": 1, + "runs": [ + { + "stats": { + "suites": 5, + "tests": 6, + "passes": 1, + "pending": 1, + "skipped": 1, + "failures": 3, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 5, + "tests": 5, + "passes": 1, + "pending": 1, + "failures": 3, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n throw new Error(\"fail1\");\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n throw new Error(\"fail2\");\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n throw new Error(\"fail3\");\n }" + } + ], + "tests": [ + { + "title": [ + "simple failing hook spec", + "beforeEach hooks", + "never gets here" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here (failed).png", + "height": 720, + "width": 1280 + } + ] + }, + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed) (attempt 2).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "pending", + "is pending" + ], + "state": "pending", + "body": "", + "displayError": null, + "attempts": [ + { + "state": "pending", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "runs this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + }, + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed) (attempt 2).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "does not run this" + ], + "state": "skipped", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "skipped", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "runs this" + ], + "state": "passed", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "fails on this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 21, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 19 | context \"after hooks\", ->\n 20 | after ->\n> 21 | throw new Error(\"fail3\")\n | ^\n 22 | \n 23 | it \"runs this\", ->\n 24 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_hook_spec.coffee", + "relative": "cypress/integration/simple_failing_hook_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 2, + "passes": 1, + "pending": 0, + "skipped": 0, + "failures": 1, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 2, + "passes": 1, + "pending": 0, + "failures": 1, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [], + "tests": [ + { + "title": [ + "simple retrying spec", + "t1" + ], + "state": "failed", + "body": "function () {\n var test = cy.state('test');\n throw new Error(\"\".concat(test.title, \" attempt #\").concat(cy.state('test').currentRetry()));\n }", + "displayError": "Error: t1 attempt #1\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "t1 attempt #0", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 5, + "column": 11, + "originalFile": "cypress/integration/simple_retrying_spec.js", + "relativeFile": "cypress/integration/simple_retrying_spec.js", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "frame": " 3 | const test = cy.state('test')\n 4 | \n> 5 | throw new Error(`${test.title} attempt #${cy.state('test').currentRetry()}`)\n | ^\n 6 | })\n 7 | \n 8 | it('t2', () => {", + "language": "js" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_retrying_spec.js/simple retrying spec -- t1 (failed).png", + "height": 720, + "width": 1280 + } + ] + }, + { + "state": "failed", + "error": { + "name": "Error", + "message": "t1 attempt #1", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 5, + "column": 11, + "originalFile": "cypress/integration/simple_retrying_spec.js", + "relativeFile": "cypress/integration/simple_retrying_spec.js", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "frame": " 3 | const test = cy.state('test')\n 4 | \n> 5 | throw new Error(`${test.title} attempt #${cy.state('test').currentRetry()}`)\n | ^\n 6 | })\n 7 | \n 8 | it('t2', () => {", + "language": "js" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_retrying_spec.js/simple retrying spec -- t1 (failed) (attempt 2).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple retrying spec", + "t2" + ], + "state": "passed", + "body": "function () {// pass\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_retrying_spec.js", + "relative": "cypress/integration/simple_retrying_spec.js", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "specType": "integration" + }, + "shouldUploadVideo": true + } + ], + "browserPath": "path/to/browser", + "browserName": "FooBrowser", + "browserVersion": "88", + "osName": "FooOS", + "osVersion": "1234", + "cypressVersion": "9.9.9", + "config": {} +} + +exports['e2e spec_isolation failing with retries enabled [firefox] 1'] = { + "startedTestsAt": "2018-02-01T20:14:19.323Z", + "endedTestsAt": "2018-02-01T20:14:19.323Z", + "totalDuration": 5555, + "totalSuites": 6, + "totalTests": 8, + "totalFailed": 4, + "totalPassed": 2, + "totalPending": 1, + "totalSkipped": 1, + "runs": [ + { + "stats": { + "suites": 5, + "tests": 6, + "passes": 1, + "pending": 1, + "skipped": 1, + "failures": 3, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 5, + "tests": 5, + "passes": 1, + "pending": 1, + "failures": 3, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [ + { + "hookName": "before each", + "title": [ + "\"before each\" hook" + ], + "body": "function() {\n throw new Error(\"fail1\");\n }" + }, + { + "hookName": "after each", + "title": [ + "\"after each\" hook" + ], + "body": "function() {\n throw new Error(\"fail2\");\n }" + }, + { + "hookName": "after all", + "title": [ + "\"after all\" hook" + ], + "body": "function() {\n throw new Error(\"fail3\");\n }" + } + ], + "tests": [ + { + "title": [ + "simple failing hook spec", + "beforeEach hooks", + "never gets here" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here (failed).png", + "height": 720, + "width": 1280 + } + ] + }, + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 4, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 2 | context \"beforeEach hooks\", ->\n 3 | beforeEach ->\n> 4 | throw new Error(\"fail1\")\n | ^\n 5 | \n 6 | it \"never gets here\", ->\n 7 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed) (attempt 2).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "pending", + "is pending" + ], + "state": "pending", + "body": "", + "displayError": null, + "attempts": [ + { + "state": "pending", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "runs this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png", + "height": 720, + "width": 1280 + } + ] + }, + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 13, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 11 | context \"afterEach hooks\", ->\n 12 | afterEach ->\n> 13 | throw new Error(\"fail2\")\n | ^\n 14 | \n 15 | it \"runs this\", ->\n 16 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed) (attempt 2).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "afterEach hooks", + "does not run this" + ], + "state": "skipped", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "skipped", + "error": null, + "videoTimestamp": null, + "duration": null, + "startedAt": null, + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "runs this" + ], + "state": "passed", + "body": "function() {}", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + }, + { + "title": [ + "simple failing hook spec", + "after hooks", + "fails on this" + ], + "state": "failed", + "body": "function() {}", + "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 21, + "column": 13, + "originalFile": "cypress/integration/simple_failing_hook_spec.coffee", + "relativeFile": "cypress/integration/simple_failing_hook_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "frame": " 19 | context \"after hooks\", ->\n 20 | after ->\n> 21 | throw new Error(\"fail3\")\n | ^\n 22 | \n 23 | it \"runs this\", ->\n 24 | ", + "language": "coffee" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png", + "height": 720, + "width": 1280 + } + ] + } + ] + } + ], + "error": null, + "video": null, + "spec": { + "name": "simple_failing_hook_spec.coffee", + "relative": "cypress/integration/simple_failing_hook_spec.coffee", + "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee", + "specType": "integration" + }, + "shouldUploadVideo": true + }, + { + "stats": { + "suites": 1, + "tests": 2, + "passes": 1, + "pending": 0, + "skipped": 0, + "failures": 1, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "endedAt": "2018-02-01T20:14:19.323Z" + }, + "reporter": "spec", + "reporterStats": { + "suites": 1, + "tests": 2, + "passes": 1, + "pending": 0, + "failures": 1, + "start": "2018-02-01T20:14:19.323Z", + "end": "2018-02-01T20:14:19.323Z", + "duration": 1234 + }, + "hooks": [], + "tests": [ + { + "title": [ + "simple retrying spec", + "t1" + ], + "state": "failed", + "body": "function () {\n var test = cy.state('test');\n throw new Error(\"\".concat(test.title, \" attempt #\").concat(cy.state('test').currentRetry()));\n }", + "displayError": "Error: t1 attempt #1\n [stack trace lines]", + "attempts": [ + { + "state": "failed", + "error": { + "name": "Error", + "message": "t1 attempt #0", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 5, + "column": 11, + "originalFile": "cypress/integration/simple_retrying_spec.js", + "relativeFile": "cypress/integration/simple_retrying_spec.js", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "frame": " 3 | const test = cy.state('test')\n 4 | \n> 5 | throw new Error(`${test.title} attempt #${cy.state('test').currentRetry()}`)\n | ^\n 6 | })\n 7 | \n 8 | it('t2', () => {", + "language": "js" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_retrying_spec.js/simple retrying spec -- t1 (failed).png", + "height": 720, + "width": 1280 + } + ] + }, + { + "state": "failed", + "error": { + "name": "Error", + "message": "t1 attempt #1", + "stack": "[stack trace lines]", + "codeFrame": { + "line": 5, + "column": 11, + "originalFile": "cypress/integration/simple_retrying_spec.js", + "relativeFile": "cypress/integration/simple_retrying_spec.js", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/simple_retrying_spec.js", + "frame": " 3 | const test = cy.state('test')\n 4 | \n> 5 | throw new Error(`${test.title} attempt #${cy.state('test').currentRetry()}`)\n | ^\n 6 | })\n 7 | \n 8 | it('t2', () => {", + "language": "js" + } + }, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [ + { + "name": null, + "takenAt": "2018-02-01T20:14:19.323Z", + "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_retrying_spec.js/simple retrying spec -- t1 (failed) (attempt 2).png", + "height": 720, + "width": 1280 + } + ] + } + ] + }, + { + "title": [ + "simple retrying spec", + "t2" + ], + "state": "passed", + "body": "function () {// pass\n }", + "displayError": null, + "attempts": [ + { + "state": "passed", + "error": null, + "videoTimestamp": null, + "duration": 1234, + "startedAt": "2018-02-01T20:14:19.323Z", + "screenshots": [] + } + ] + } + ], + "error": null, + "video": null, "spec": { "name": "simple_retrying_spec.js", "relative": "cypress/integration/simple_retrying_spec.js", diff --git a/packages/server/__snapshots__/7_record_spec.js b/packages/server/__snapshots__/7_record_spec.js index f554cc5151..3fd794245b 100644 --- a/packages/server/__snapshots__/7_record_spec.js +++ b/packages/server/__snapshots__/7_record_spec.js @@ -2191,7 +2191,16 @@ exports['e2e record passing passes 2'] = [ "error": { "name": "Error", "message": "foo\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `record fails`", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 3, + "column": 11, + "originalFile": "cypress/integration/record_fail_spec.coffee", + "relativeFile": "cypress/integration/record_fail_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/record_fail_spec.coffee", + "frame": " 1 | describe \"record fails\", ->\n 2 | beforeEach ->\n> 3 | throw new Error(\"foo\")\n | ^\n 4 | \n 5 | it \"fails 1\", ->\n 6 | ", + "language": "coffee" + } }, "timings": { "lifecycle": 100, @@ -2382,7 +2391,16 @@ exports['e2e record passing passes 2'] = [ "error": { "name": "Error", "message": "The following error originated from your test code, not from Cypress.\n\n > instantly fails\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", - "stack": "[stack trace lines]" + "stack": "[stack trace lines]", + "codeFrame": { + "line": 1, + "column": 7, + "originalFile": "cypress/integration/record_uncaught_spec.coffee", + "relativeFile": "cypress/integration/record_uncaught_spec.coffee", + "absoluteFile": "/foo/bar/.projects/e2e/cypress/integration/record_uncaught_spec.coffee", + "frame": "> 1 | throw new Error('instantly fails')\n | ^\n 2 | ", + "language": "coffee" + } }, "timings": { "lifecycle": 100, diff --git a/packages/server/__snapshots__/reporter_spec.js b/packages/server/__snapshots__/reporter_spec.js index 6678e29bf0..4f96805ce3 100644 --- a/packages/server/__snapshots__/reporter_spec.js +++ b/packages/server/__snapshots__/reporter_spec.js @@ -33,7 +33,16 @@ exports['lib/reporter #stats has reporterName stats, reporterStats, etc 1'] = { "state": "failed", "error": { "message": "foo", - "stack": "at foo:1:1\nat bar:1:1\nat baz:1:1" + "stack": "at foo:1:1\nat bar:1:1\nat baz:1:1", + "codeFrame": { + "line": 7, + "column": 8, + "originalFile": "cypress/integration/spec.js", + "relativeFile": "cypress/integration/spec.js", + "absoluteFile": "/path/to/cypress/integration/spec.js", + "frame": " 5 | \n 6 | it('fails', () => {\n> 7 | cy.get('nope', { timeout: 1 })\n | ^\n 8 | })\n 9 | })\n 10 | ", + "language": "js" + } }, "timings": null, "failedFromHookId": null, diff --git a/packages/server/lib/reporter.js b/packages/server/lib/reporter.js index 0924829139..ac147b224f 100644 --- a/packages/server/lib/reporter.js +++ b/packages/server/lib/reporter.js @@ -362,6 +362,7 @@ class Reporter { name: attempt.err.name, message: attempt.err.message, stack: stackUtils.stackWithoutMessage(attempt.err.stack), + codeFrame: attempt.err.codeFrame, } return { diff --git a/packages/server/test/e2e/5_spec_isolation_spec.js b/packages/server/test/e2e/5_spec_isolation_spec.js index e0621718ea..c5bdb4fc6b 100644 --- a/packages/server/test/e2e/5_spec_isolation_spec.js +++ b/packages/server/test/e2e/5_spec_isolation_spec.js @@ -27,6 +27,9 @@ describe('e2e spec_isolation', () => { outputPath, snapshot: false, expectedExitCode: 5, + config: { + video: false, + }, async onRun (execFn) { const { stdout } = await execFn() @@ -36,14 +39,16 @@ describe('e2e spec_isolation', () => { // now what we want to do is read in the outputPath // and snapshot it so its what we expect after normalizing it - const json = await fs.readJsonAsync(outputPath) + let json = await fs.readJsonAsync(outputPath) + + json.runs = e2e.normalizeRuns(json.runs) // also mutates into normalized obj ready for snapshot expectCorrectModuleApiResult(json, { - e2ePath, runs: 4, + e2ePath, runs: 4, video: false, }) - snapshot('e2e spec isolation fails', json, { allowSharedSnapshot: true }) + snapshot(json, { allowSharedSnapshot: true }) }, }) @@ -54,15 +59,20 @@ describe('e2e spec_isolation', () => { expectedExitCode: 4, config: { retries: 1, + video: false, }, async onRun (execFn) { await execFn() - const json = await fs.readJsonAsync(outputPath) + let json = await fs.readJsonAsync(outputPath) + + json.runs = e2e.normalizeRuns(json.runs) // also mutates into normalized obj ready for snapshot - expectCorrectModuleApiResult(json, { e2ePath, runs: 2 }) + expectCorrectModuleApiResult(json, { + e2ePath, runs: 2, video: false, + }) - snapshot('failing with retries enabled', json) + snapshot(json) }, }) }) diff --git a/packages/server/test/e2e/7_record_spec.js b/packages/server/test/e2e/7_record_spec.js index 5f629079bd..0b74095960 100644 --- a/packages/server/test/e2e/7_record_spec.js +++ b/packages/server/test/e2e/7_record_spec.js @@ -402,10 +402,12 @@ describe('e2e record', () => { expect(forthInstanceStdout.body.stdout).not.to.include('record_fail_spec.coffee') expect(forthInstanceStdout.body.stdout).not.to.include('record_pass_spec.coffee') - const runs = requests.filter((v) => v.body.tests).map((v) => v.body) + let runs = requests.filter((v) => v.body.tests).map((v) => v.body) expectRunsToHaveCorrectTimings(runs) + runs = e2e.normalizeRuns(runs) + snapshot(runs) const results = await fs.readJsonAsync(outputPath) diff --git a/packages/server/test/support/helpers/e2e.ts b/packages/server/test/support/helpers/e2e.ts index 4691d0d384..3a55ad7727 100644 --- a/packages/server/test/support/helpers/e2e.ts +++ b/packages/server/test/support/helpers/e2e.ts @@ -781,6 +781,22 @@ const e2e = { .replace(/using description file: .* \(relative/g, 'using description file: [..] (relative') .replace(/Module build failed \(from .*\)/g, 'Module build failed (from [..])') }, + + normalizeRuns (runs) { + runs.forEach((run) => { + run.tests.forEach((test) => { + test.attempts.forEach((attempt) => { + const codeFrame = attempt.error && attempt.error.codeFrame + + if (codeFrame) { + codeFrame.absoluteFile = codeFrame.absoluteFile.split(pathUpToProjectName).join('/foo/bar/.projects') + } + }) + }) + }) + + return runs + }, } export { diff --git a/packages/server/test/support/helpers/resultsUtils.ts b/packages/server/test/support/helpers/resultsUtils.ts index a370c7f488..84ee142cd7 100644 --- a/packages/server/test/support/helpers/resultsUtils.ts +++ b/packages/server/test/support/helpers/resultsUtils.ts @@ -185,7 +185,12 @@ export const expectRunsToHaveCorrectTimings = (runs = []) => { export const expectCorrectModuleApiResult = (json, opts: { e2ePath: string runs: number + video: boolean }) => { + if (opts.video == null) { + opts.video = true + } + // should be n runs expect(json.runs).to.have.length(opts.runs) @@ -281,8 +286,10 @@ export const expectCorrectModuleApiResult = (json, opts: { expect(d.toJSON()).to.eq(attempt.startedAt) attempt.startedAt = STATIC_DATE - expect(attempt.videoTimestamp).to.be.a('number') - attempt.videoTimestamp = 9999 + if (opts.video) { + expect(attempt.videoTimestamp).to.be.a('number') + attempt.videoTimestamp = 9999 + } } attempt.screenshots.forEach((screenshot) => { @@ -303,7 +310,9 @@ export const expectCorrectModuleApiResult = (json, opts: { } }) - // normalize video path - run.video = e2e.normalizeStdout(run.video) + if (opts.video) { + // normalize video path + run.video = e2e.normalizeStdout(run.video) + } }) } diff --git a/packages/server/test/unit/reporter_spec.js b/packages/server/test/unit/reporter_spec.js index a8a75a1080..8f80ebaa17 100644 --- a/packages/server/test/unit/reporter_spec.js +++ b/packages/server/test/unit/reporter_spec.js @@ -33,6 +33,15 @@ describe('lib/reporter', () => { err: { message: 'foo', stack: 'at foo:1:1\nat bar:1:1\nat baz:1:1', + codeFrame: { + line: 7, + column: 8, + originalFile: 'cypress/integration/spec.js', + relativeFile: 'cypress/integration/spec.js', + absoluteFile: '/path/to/cypress/integration/spec.js', + frame: ' 5 | \n 6 | it(\'fails\', () => {\n> 7 | cy.get(\'nope\', { timeout: 1 })\n | ^\n 8 | })\n 9 | })\n 10 | ', + language: 'js', + }, }, }, {