From dcb49d8b8a8792f53cdc1aa15b504fc16f5c7691 Mon Sep 17 00:00:00 2001 From: Vaibhav Singh Date: Tue, 28 Mar 2023 20:19:30 +0530 Subject: [PATCH] fix: incorrect build duration in HTML Report --- lib/reporter/reporters/html.js | 2 +- test/extra/reportObject.js | 597 +++++++++++++++++++++++- test/src/runner/testRunnerHtmlOutput.js | 14 +- 3 files changed, 604 insertions(+), 9 deletions(-) diff --git a/lib/reporter/reporters/html.js b/lib/reporter/reporters/html.js index 609b6d53f9..acd070c60a 100644 --- a/lib/reporter/reporters/html.js +++ b/lib/reporter/reporters/html.js @@ -97,7 +97,7 @@ class HtmlReporter extends BaseReporter { this.environments[testEnv].stats.failed += failedCount; this.environments[testEnv].stats.skipped += module.skippedCount; this.environments[testEnv].stats.total += passedCount + failedCount + module.skippedCount; - this.environments[testEnv].stats.time = this.environments[testEnv].stats.time || module.timeMs; + this.environments[testEnv].stats.time += this.environments[testEnv].stats.time || module.timeMs; this.environments[testEnv].metadata.platformName = this.environments[testEnv].metadata.platformName || sessionCapabilities.platformName; this.environments[testEnv].metadata.browserName = this.environments[testEnv].metadata.browserName || sessionCapabilities.browserName; this.environments[testEnv].metadata.browserVersion = this.environments[testEnv].metadata.browserVersion || sessionCapabilities.browserVersion; diff --git a/test/extra/reportObject.js b/test/extra/reportObject.js index 83f4b44987..bbb73fc791 100644 --- a/test/extra/reportObject.js +++ b/test/extra/reportObject.js @@ -1220,6 +1220,601 @@ module.exports = { ['2022-12-22T08:13:11.636Z', ' Request DELETE /session/b798ac620a723364eefa550fe820baef ', '\'\''], ['2022-12-22T08:13:11.688Z', ' Response 200 DELETE /session/b798ac620a723364eefa550fe820baef (52ms)', '{ value: null }'] ] + }, + 'ecosia (duplicate)': { + 'reportPrefix': 'CHROME_108.0.5359.124__', + 'assertionsCount': 7, + 'lastError': { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'showDiff': false, + 'abortOnFailure': true, + 'stack': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)' + }, + 'skipped': [], + 'time': '13.74', + 'timeMs': 13738, + 'completed': { + 'Demo test ecosia.org': { + 'time': '8.146', + 'assertions': [{ + 'name': 'NightwatchAssertError', + 'message': 'Element was visible after 24 milliseconds.', + 'stackTrace': '', + 'fullMsg': 'Element was visible after 24 milliseconds.', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'Ecosia\'\u001b[0m \u001b[0;90m(4ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if the page title contains \u001b[0;33m\'Ecosia\'\u001b[0m \u001b[0;90m(4ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(20ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(20ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(13ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(13ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m<.layout__content>\u001b[0m contains text \u001b[0;33m\'Nightwatch.js\'\u001b[0m \u001b[0;90m(90ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m<.layout__content>\u001b[0m contains text \u001b[0;33m\'Nightwatch.js\'\u001b[0m \u001b[0;90m(90ms)\u001b[0m', + 'failure': false + }], + 'commands': [], + 'passed': 5, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 5, + 'status': 'pass', + 'steps': [], + 'stackTrace': '', + 'testcases': { + 'Demo test ecosia.org': { + 'time': '8.146', + 'assertions': [{ + 'name': 'NightwatchAssertError', + 'message': 'Element was visible after 24 milliseconds.', + 'stackTrace': '', + 'fullMsg': 'Element was visible after 24 milliseconds.', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'Ecosia\'\u001b[0m \u001b[0;90m(4ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if the page title contains \u001b[0;33m\'Ecosia\'\u001b[0m \u001b[0;90m(4ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(20ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(20ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(13ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(13ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m<.layout__content>\u001b[0m contains text \u001b[0;33m\'Nightwatch.js\'\u001b[0m \u001b[0;90m(90ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m<.layout__content>\u001b[0m contains text \u001b[0;33m\'Nightwatch.js\'\u001b[0m \u001b[0;90m(90ms)\u001b[0m', + 'failure': false + }], + 'tests': 5, + 'commands': [], + 'passed': 5, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'status': 'pass', + 'steps': [], + 'stackTrace': '', + 'timeMs': 8146, + 'startTimestamp': 'Thu, 22 Dec 2022 08:12:57 GMT', + 'endTimestamp': 'Thu, 22 Dec 2022 08:13:06 GMT' + } + }, + 'timeMs': 8146, + 'startTimestamp': 'Thu, 22 Dec 2022 08:12:57 GMT', + 'endTimestamp': 'Thu, 22 Dec 2022 08:13:06 GMT' + }, + 'Demo test ecosia.org fail': { + 'time': '5.592', + 'assertions': [{ + 'name': 'NightwatchAssertError', + 'message': 'Element was visible after 9 milliseconds.', + 'stackTrace': '', + 'fullMsg': 'Element was visible after 9 milliseconds.', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'stackTrace': ' at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)', + 'fullMsg': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'failure': 'Expected "contains \'foo\'" but got: "nightwatch - Ecosia - Web"', + 'screenshots': ['/Users/binayakghosh/projects/nightwatch-copy/tests_output/screens/ecosia/Demo-test-ecosia.org-fail_FAILED_Dec-22-2022-134311-GMT+0530.png'] + }], + 'commands': [], + 'passed': 1, + 'errors': 0, + 'failed': 1, + 'skipped': 0, + 'tests': 2, + 'status': 'fail', + 'steps': [], + 'stackTrace': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)', + 'testcases': { + 'Demo test ecosia.org': { + 'time': '8.146', + 'assertions': [{ + 'name': 'NightwatchAssertError', + 'message': 'Element was visible after 24 milliseconds.', + 'stackTrace': '', + 'fullMsg': 'Element was visible after 24 milliseconds.', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'Ecosia\'\u001b[0m \u001b[0;90m(4ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if the page title contains \u001b[0;33m\'Ecosia\'\u001b[0m \u001b[0;90m(4ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(20ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(20ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(13ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m\u001b[0m is visible \u001b[0;90m(13ms)\u001b[0m', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if element \u001b[0;33m<.layout__content>\u001b[0m contains text \u001b[0;33m\'Nightwatch.js\'\u001b[0m \u001b[0;90m(90ms)\u001b[0m', + 'stackTrace': '', + 'fullMsg': 'Testing if element \u001b[0;33m<.layout__content>\u001b[0m contains text \u001b[0;33m\'Nightwatch.js\'\u001b[0m \u001b[0;90m(90ms)\u001b[0m', + 'failure': false + }], + 'tests': 5, + 'commands': [], + 'passed': 5, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'status': 'pass', + 'steps': [], + 'stackTrace': '', + 'timeMs': 8146, + 'startTimestamp': 'Thu, 22 Dec 2022 08:12:57 GMT', + 'endTimestamp': 'Thu, 22 Dec 2022 08:13:06 GMT' + }, + 'Demo test ecosia.org fail': { + 'time': '5.592', + 'assertions': [{ + 'name': 'NightwatchAssertError', + 'message': 'Element was visible after 9 milliseconds.', + 'stackTrace': '', + 'fullMsg': 'Element was visible after 9 milliseconds.', + 'failure': false + }, { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'stackTrace': ' at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)', + 'fullMsg': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'failure': 'Expected "contains \'foo\'" but got: "nightwatch - Ecosia - Web"', + 'screenshots': ['/Users/binayakghosh/projects/nightwatch-copy/tests_output/screens/ecosia/Demo-test-ecosia.org-fail_FAILED_Dec-22-2022-134311-GMT+0530.png'] + }], + 'tests': 2, + 'commands': [], + 'passed': 1, + 'errors': 0, + 'failed': 1, + 'skipped': 0, + 'status': 'fail', + 'steps': [], + 'stackTrace': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)', + 'lastError': { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'showDiff': false, + 'abortOnFailure': true, + 'stack': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)' + }, + 'timeMs': 5592, + 'startTimestamp': 'Thu, 22 Dec 2022 08:13:06 GMT', + 'endTimestamp': 'Thu, 22 Dec 2022 08:13:11 GMT' + } + }, + 'lastError': { + 'name': 'NightwatchAssertError', + 'message': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'showDiff': false, + 'abortOnFailure': true, + 'stack': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)' + }, + 'timeMs': 5592, + 'startTimestamp': 'Thu, 22 Dec 2022 08:13:06 GMT', + 'endTimestamp': 'Thu, 22 Dec 2022 08:13:11 GMT' + } + }, + 'completedSections': { + '__global_beforeEach_hook': { + 'time': 0, + 'assertions': [], + 'commands': [], + 'passed': 0, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 0, + 'status': 'pass' + }, + '__before_hook': { + 'time': 0, + 'assertions': [], + 'commands': [{ + 'name': 'navigateTo', + 'args': ['https://www.ecosia.org/'], + 'startTime': 1671696761632, + 'endTime': 1671696777891, + 'elapsedTime': 16259, + 'status': 'pass', + 'result': { + 'status': 0 + } + }], + 'passed': 0, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 0, + 'status': 'pass' + }, + 'Demo test ecosia.org': { + 'time': 0, + 'assertions': [], + 'commands': [{ + 'name': 'waitForElementVisible', + 'args': ['body'], + 'startTime': 1671696777895, + 'endTime': 1671696777921, + 'elapsedTime': 26, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'assert.titleContains', + 'args': ['Ecosia'], + 'startTime': 1671696777921, + 'endTime': 1671696777928, + 'elapsedTime': 7, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'assert.visible', + 'args': ['input[type=search]'], + 'startTime': 1671696777928, + 'endTime': 1671696777949, + 'elapsedTime': 21, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'setValue', + 'args': ['input[type=search]', 'nightwatch'], + 'startTime': 1671696777949, + 'endTime': 1671696778059, + 'elapsedTime': 110, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'assert.visible', + 'args': ['button[type=submit]'], + 'startTime': 1671696778059, + 'endTime': 1671696778074, + 'elapsedTime': 15, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'click', + 'args': ['button[type=submit]'], + 'startTime': 1671696778074, + 'endTime': 1671696785948, + 'elapsedTime': 7874, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'assert.textContains', + 'args': ['.layout__content', 'Nightwatch.js'], + 'startTime': 1671696785949, + 'endTime': 1671696786039, + 'elapsedTime': 90, + 'status': 'pass', + 'result': { + 'status': 0 + } + }], + 'passed': 0, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 0, + 'status': 'pass' + }, + 'Demo test ecosia.org fail': { + 'time': 0, + 'assertions': [], + 'commands': [{ + 'name': 'waitForElementVisible', + 'args': ['body'], + 'startTime': 1671696786041, + 'endTime': 1671696786050, + 'elapsedTime': 9, + 'status': 'pass', + 'result': { + 'status': 0 + } + }, { + 'name': 'assert.titleContains', + 'args': ['foo'], + 'startTime': 1671696786050, + 'endTime': 1671696791152, + 'elapsedTime': 5102, + 'status': 'fail', + 'result': { + 'message': 'Testing if the page title contains \u001b[0;33m\'foo\'\u001b[0m in 5000ms - expected \u001b[0;32m"contains \'foo\'"\u001b[0m but got: \u001b[0;31m"nightwatch - Ecosia - Web"\u001b[0m \u001b[0;90m(5095ms)\u001b[0m', + 'showDiff': false, + 'name': 'NightwatchAssertError', + 'abortOnFailure': true, + 'stack': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)' + }, + 'screenshot': '/Users/binayakghosh/projects/nightwatch-copy/tests_output/screens/ecosia/Demo-test-ecosia.org-fail_FAILED_Dec-22-2022-134311-GMT+0530.png' + }, { + 'name': 'saveScreenshot', + 'args': ['/Users/binayakghosh/projects/nightwatch-copy/tests_output/screens/ecosia/Demo-test-ecosia.org-fail_FAILED_Dec-22-2022-134311-GMT+0530.png', 'function () { [native code] }'], + 'startTime': 1671696791215, + 'endTime': 1671696791632, + 'elapsedTime': 417, + 'status': 'pass', + 'result': { + 'status': 0 + } + }], + 'passed': 0, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 0, + 'status': 'fail' + }, + '__after_hook': { + 'time': 0, + 'assertions': [], + 'commands': [{ + 'name': 'end', + 'args': [], + 'startTime': 1671696791634, + 'endTime': 1671696791688, + 'elapsedTime': 54, + 'status': 'pass' + }], + 'passed': 0, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 0, + 'status': 'pass' + }, + '__global_afterEach_hook': { + 'time': 0, + 'assertions': [], + 'commands': [], + 'passed': 0, + 'errors': 0, + 'failed': 0, + 'skipped': 0, + 'tests': 0, + 'status': 'pass' + } + }, + 'errmessages': [], + 'testsCount': 2, + 'skippedCount': 0, + 'failedCount': 1, + 'errorsCount': 0, + 'passedCount': 6, + 'group': '', + 'modulePath': '/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js', + 'startTimestamp': 'Thu, 22 Dec 2022 08:12:40 GMT', + 'endTimestamp': 'Thu, 22 Dec 2022 08:13:11 GMT', + 'sessionCapabilities': { + 'acceptInsecureCerts': false, + 'browserName': 'chrome', + 'browserVersion': '108.0.5359.124', + 'chrome': { + 'chromedriverVersion': '108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016})', + 'userDataDir': '/var/folders/c4/v7pl5j0s34qg1yb4b34_lg300000gq/T/.com.google.Chrome.I4lvi3' + }, + 'goog:chromeOptions': { + 'debuggerAddress': 'localhost:59791' + }, + 'networkConnectionEnabled': false, + 'pageLoadStrategy': 'normal', + 'platformName': 'mac os x', + 'proxy': {}, + 'setWindowRect': true, + 'strictFileInteractability': false, + 'timeouts': { + 'implicit': 0, + 'pageLoad': 300000, + 'script': 30000 + }, + 'unhandledPromptBehavior': 'dismiss and notify', + 'webauthn:extension:credBlob': true, + 'webauthn:extension:largeBlob': true, + 'webauthn:virtualAuthenticators': true + }, + 'sessionId': 'b798ac620a723364eefa550fe820baef', + 'projectName': '', + 'buildName': '', + 'testEnv': 'chrome', + 'isMobile': false, + 'status': 'fail', + 'seleniumLog': '/Users/binayakghosh/projects/nightwatch-copy/logs/ecosia_chromedriver.log', + 'tests': 2, + 'failures': 1, + 'errors': 0, + 'httpOutput': [ + ['2022-12-22T08:12:40.323Z', ' Request POST /session ', '{\n capabilities: {\n firstMatch: [ {} ],\n alwaysMatch: {\n browserName: 'chrome',\n 'goog:chromeOptions': { w3c: true, args: [] }\n }\n }\n }'], + ['2022-12-22T08:12:41.627Z', ' Response 200 POST /session (1305ms)', '{\n value: {\n capabilities: {\n acceptInsecureCerts: false,\n browserName: 'chrome',\n browserVersion: '108.0.5359.124',\n chrome: {\n chromedriverVersion: '108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016})',\n userDataDir: '/var/folders/c4/v7pl5j0s34qg1yb4b34_lg300000gq/T/.com.google.Chrome.I4lvi3'\n },\n 'goog:chromeOptions': { debuggerAddress: 'localhost:59791' },\n networkConnectionEnabled: false,\n pageLoadStrategy: 'normal',\n platformName: 'mac os x',\n proxy: {},\n setWindowRect: true,\n strictFileInteractability: false,\n timeouts: { implicit: 0, pageLoad: 300000, script: 30000 },\n unhandledPromptBehavior: 'dismiss and notify',\n 'webauthn:extension:credBlob': true,\n 'webauthn:extension:largeBlob': true,\n 'webauthn:virtualAuthenticators': true\n },\n sessionId: 'b798ac620a723364eefa550fe820baef'\n }\n }'], + ['2022-12-22T08:12:41.635Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/url ', '{ url: 'https://www.ecosia.org/' }'], + ['2022-12-22T08:12:57.890Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/url (16256ms)', '{ value: null }'], + ['2022-12-22T08:12:57.898Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: 'body' }'], + ['2022-12-22T08:12:57.908Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (11ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': '608b7fc9-e6cd-42c3-87c0-cb8d80dd1451'\n }\n ]\n }'], + ['2022-12-22T08:12:57.910Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: 'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)',\n args: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': '608b7fc9-e6cd-42c3-87c0-cb8d80dd1451',\n ELEMENT: '608b7fc9-e6cd-42c3-87c0-cb8d80dd1451'\n }\n ]\n }'], + ['2022-12-22T08:12:57.920Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (10ms)', '{ value: true }'], + ['2022-12-22T08:12:57.922Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:12:57.926Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (4ms)', '{ value: 'Ecosia - the search engine that plants trees' }'], + ['2022-12-22T08:12:57.930Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: 'input[type=search]' }'], + ['2022-12-22T08:12:57.938Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (8ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b'\n }\n ]\n }'], + ['2022-12-22T08:12:57.939Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: 'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)',\n args: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b',\n ELEMENT: 'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b'\n }\n ]\n }'], + ['2022-12-22T08:12:57.947Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (9ms)', '{ value: true }'], + ['2022-12-22T08:12:57.950Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: 'input[type=search]' }'], + ['2022-12-22T08:12:57.954Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (4ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b'\n }\n ]\n }'], + ['2022-12-22T08:12:57.955Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/clear ', '{}'], + ['2022-12-22T08:12:57.971Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/clear (16ms)', '{ value: null }'], + ['2022-12-22T08:12:57.971Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/value ', '{\n text: 'nightwatch',\n value: [\n 'n', 'i', 'g', 'h',\n 't', 'w', 'a', 't',\n 'c', 'h'\n ]\n }'], + ['2022-12-22T08:12:58.059Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/value (88ms)', '{ value: null }'], + ['2022-12-22T08:12:58.061Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: 'button[type=submit]' }'], + ['2022-12-22T08:12:58.066Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (5ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'b97d3e55-78a3-45e4-944d-2c467dbd0b7e'\n }\n ]\n }'], + ['2022-12-22T08:12:58.067Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: 'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)',\n args: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'b97d3e55-78a3-45e4-944d-2c467dbd0b7e',\n ELEMENT: 'b97d3e55-78a3-45e4-944d-2c467dbd0b7e'\n }\n ]\n }'], + ['2022-12-22T08:12:58.072Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (5ms)', '{ value: true }'], + ['2022-12-22T08:12:58.074Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: 'button[type=submit]' }'], + ['2022-12-22T08:12:58.077Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (3ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'b97d3e55-78a3-45e4-944d-2c467dbd0b7e'\n }\n ]\n }'], + ['2022-12-22T08:12:58.077Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/element/b97d3e55-78a3-45e4-944d-2c467dbd0b7e/click ', '{}'], + ['2022-12-22T08:13:05.948Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/element/b97d3e55-78a3-45e4-944d-2c467dbd0b7e/click (7871ms)', '{ value: null }'], + ['2022-12-22T08:13:05.951Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: '.layout__content' }'], + ['2022-12-22T08:13:05.959Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (8ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': '54648a7a-b47c-4ff8-996d-270526697f01'\n }\n ]\n }'], + ['2022-12-22T08:13:05.960Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/element/54648a7a-b47c-4ff8-996d-270526697f01/text ', ''''], + ['2022-12-22T08:13:06.038Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/element/54648a7a-b47c-4ff8-996d-270526697f01/text (79ms)', '{\n value: 'Search\\n' +\n 'https://nightwatchjs.org\\n' +\n 'Nightwatch.js | Node.js powered End-to-End testing framework\\n' +\n 'Nightwa...',\n suppressBase64Data: true\n }'], + ['2022-12-22T08:13:06.042Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: 'css selector', value: 'body' }'], + ['2022-12-22T08:13:06.045Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (4ms)', '{\n value: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'b238a104-4c12-4f2c-94d9-95df4bd24ddf'\n }\n ]\n }'], + ['2022-12-22T08:13:06.045Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: 'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)',\n args: [\n {\n 'element-6066-11e4-a52e-4f735466cecf': 'b238a104-4c12-4f2c-94d9-95df4bd24ddf',\n ELEMENT: 'b238a104-4c12-4f2c-94d9-95df4bd24ddf'\n }\n ]\n }'], + ['2022-12-22T08:13:06.050Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (5ms)', '{ value: true }'], + ['2022-12-22T08:13:06.052Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:06.054Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (2ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:06.561Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:06.569Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (8ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:07.075Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:07.081Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (7ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:07.585Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:07.587Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (3ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:08.092Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:08.098Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (7ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:08.603Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:08.608Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (6ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:09.111Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:09.113Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (2ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:09.617Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:09.619Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (3ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:10.121Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:10.124Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (3ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:10.629Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:10.635Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (7ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:11.140Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', ''''], + ['2022-12-22T08:13:11.145Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (6ms)', '{ value: 'nightwatch - Ecosia - Web' }'], + ['2022-12-22T08:13:11.217Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/screenshot ', ''''], + ['2022-12-22T08:13:11.622Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/screenshot (336ms)', '{\n value: 'iVBORw0KGgoAAAANSUhEUgAACWAAAAY6CAYAAABXEFcWAAABKWlDQ1BTa2lhAAAokX2QsUvDUBCHP0sXtYuo6OCQsYuaVExb1MFW...',\n suppressBase64Data: true\n }'], + ['2022-12-22T08:13:11.636Z', ' Request DELETE /session/b798ac620a723364eefa550fe820baef ', ''''], + ['2022-12-22T08:13:11.688Z', ' Response 200 DELETE /session/b798ac620a723364eefa550fe820baef (52ms)', '{ value: null }'] + ], + 'rawHttpOutput': [ + ['2022-12-22T08:12:40.323Z', ' Request POST /session ', '{\n capabilities: {\n firstMatch: [ {} ],\n alwaysMatch: {\n browserName: \'chrome\',\n \'goog:chromeOptions\': { w3c: true, args: [] }\n }\n }\n }'], + ['2022-12-22T08:12:41.627Z', ' Response 200 POST /session (1305ms)', '{\n value: {\n capabilities: {\n acceptInsecureCerts: false,\n browserName: \'chrome\',\n browserVersion: \'108.0.5359.124\',\n chrome: {\n chromedriverVersion: \'108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016})\',\n userDataDir: \'/var/folders/c4/v7pl5j0s34qg1yb4b34_lg300000gq/T/.com.google.Chrome.I4lvi3\'\n },\n \'goog:chromeOptions\': { debuggerAddress: \'localhost:59791\' },\n networkConnectionEnabled: false,\n pageLoadStrategy: \'normal\',\n platformName: \'mac os x\',\n proxy: {},\n setWindowRect: true,\n strictFileInteractability: false,\n timeouts: { implicit: 0, pageLoad: 300000, script: 30000 },\n unhandledPromptBehavior: \'dismiss and notify\',\n \'webauthn:extension:credBlob\': true,\n \'webauthn:extension:largeBlob\': true,\n \'webauthn:virtualAuthenticators\': true\n },\n sessionId: \'b798ac620a723364eefa550fe820baef\'\n }\n }'], + ['2022-12-22T08:12:41.635Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/url ', '{ url: \'https://www.ecosia.org/\' }'], + ['2022-12-22T08:12:57.890Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/url (16256ms)', '{ value: null }'], + ['2022-12-22T08:12:57.898Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'body\' }'], + ['2022-12-22T08:12:57.908Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (11ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'608b7fc9-e6cd-42c3-87c0-cb8d80dd1451\'\n }\n ]\n }'], + ['2022-12-22T08:12:57.910Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: \'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)\',\n args: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'608b7fc9-e6cd-42c3-87c0-cb8d80dd1451\',\n ELEMENT: \'608b7fc9-e6cd-42c3-87c0-cb8d80dd1451\'\n }\n ]\n }'], + ['2022-12-22T08:12:57.920Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (10ms)', '{ value: true }'], + ['2022-12-22T08:12:57.922Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:12:57.926Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (4ms)', '{ value: \'Ecosia - the search engine that plants trees\' }'], + ['2022-12-22T08:12:57.930Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'input[type=search]\' }'], + ['2022-12-22T08:12:57.938Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (8ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b\'\n }\n ]\n }'], + ['2022-12-22T08:12:57.939Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: \'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)\',\n args: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b\',\n ELEMENT: \'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b\'\n }\n ]\n }'], + ['2022-12-22T08:12:57.947Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (9ms)', '{ value: true }'], + ['2022-12-22T08:12:57.950Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'input[type=search]\' }'], + ['2022-12-22T08:12:57.954Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (4ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b\'\n }\n ]\n }'], + ['2022-12-22T08:12:57.955Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/clear ', '{}'], + ['2022-12-22T08:12:57.971Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/clear (16ms)', '{ value: null }'], + ['2022-12-22T08:12:57.971Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/value ', '{\n text: \'nightwatch\',\n value: [\n \'n\', \'i\', \'g\', \'h\',\n \'t\', \'w\', \'a\', \'t\',\n \'c\', \'h\'\n ]\n }'], + ['2022-12-22T08:12:58.059Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/element/ba89a8cd-5bf4-4666-85d1-01e1e7b3d97b/value (88ms)', '{ value: null }'], + ['2022-12-22T08:12:58.061Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'button[type=submit]\' }'], + ['2022-12-22T08:12:58.066Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (5ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'b97d3e55-78a3-45e4-944d-2c467dbd0b7e\'\n }\n ]\n }'], + ['2022-12-22T08:12:58.067Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: \'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)\',\n args: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'b97d3e55-78a3-45e4-944d-2c467dbd0b7e\',\n ELEMENT: \'b97d3e55-78a3-45e4-944d-2c467dbd0b7e\'\n }\n ]\n }'], + ['2022-12-22T08:12:58.072Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (5ms)', '{ value: true }'], + ['2022-12-22T08:12:58.074Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'button[type=submit]\' }'], + ['2022-12-22T08:12:58.077Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (3ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'b97d3e55-78a3-45e4-944d-2c467dbd0b7e\'\n }\n ]\n }'], + ['2022-12-22T08:12:58.077Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/element/b97d3e55-78a3-45e4-944d-2c467dbd0b7e/click ', '{}'], + ['2022-12-22T08:13:05.948Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/element/b97d3e55-78a3-45e4-944d-2c467dbd0b7e/click (7871ms)', '{ value: null }'], + ['2022-12-22T08:13:05.951Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'.layout__content\' }'], + ['2022-12-22T08:13:05.959Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (8ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'54648a7a-b47c-4ff8-996d-270526697f01\'\n }\n ]\n }'], + ['2022-12-22T08:13:05.960Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/element/54648a7a-b47c-4ff8-996d-270526697f01/text ', '\'\''], + ['2022-12-22T08:13:06.038Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/element/54648a7a-b47c-4ff8-996d-270526697f01/text (79ms)', '{\n value: \'Search\\n\' +\n \'https://nightwatchjs.org\\n\' +\n \'Nightwatch.js | Node.js powered End-to-End testing framework\\n\' +\n \'Nightwa...\',\n suppressBase64Data: true\n }'], + ['2022-12-22T08:13:06.042Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/elements ', '{ using: \'css selector\', value: \'body\' }'], + ['2022-12-22T08:13:06.045Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/elements (4ms)', '{\n value: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'b238a104-4c12-4f2c-94d9-95df4bd24ddf\'\n }\n ]\n }'], + ['2022-12-22T08:13:06.045Z', ' Request POST /session/b798ac620a723364eefa550fe820baef/execute/sync ', '{\n script: \'return (function(){return (function(){var k=this||self;function aa(a){return"string"==typeof a}function ba(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a... (44027 characters)\',\n args: [\n {\n \'element-6066-11e4-a52e-4f735466cecf\': \'b238a104-4c12-4f2c-94d9-95df4bd24ddf\',\n ELEMENT: \'b238a104-4c12-4f2c-94d9-95df4bd24ddf\'\n }\n ]\n }'], + ['2022-12-22T08:13:06.050Z', ' Response 200 POST /session/b798ac620a723364eefa550fe820baef/execute/sync (5ms)', '{ value: true }'], + ['2022-12-22T08:13:06.052Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:06.054Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (2ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:06.561Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:06.569Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (8ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:07.075Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:07.081Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (7ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:07.585Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:07.587Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (3ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:08.092Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:08.098Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (7ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:08.603Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:08.608Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (6ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:09.111Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:09.113Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (2ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:09.617Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:09.619Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (3ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:10.121Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:10.124Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (3ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:10.629Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:10.635Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (7ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:11.140Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/title ', '\'\''], + ['2022-12-22T08:13:11.145Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/title (6ms)', '{ value: \'nightwatch - Ecosia - Web\' }'], + ['2022-12-22T08:13:11.217Z', ' Request GET /session/b798ac620a723364eefa550fe820baef/screenshot ', '\'\''], + ['2022-12-22T08:13:11.622Z', ' Response 200 GET /session/b798ac620a723364eefa550fe820baef/screenshot (336ms)', '{\n value: \'iVBORw0KGgoAAAANSUhEUgAACWAAAAY6CAYAAABXEFcWAAABKWlDQ1BTa2lhAAAokX2QsUvDUBCHP0sXtYuo6OCQsYuaVExb1MFW...\',\n suppressBase64Data: true\n }'], + ['2022-12-22T08:13:11.636Z', ' Request DELETE /session/b798ac620a723364eefa550fe820baef ', '\'\''], + ['2022-12-22T08:13:11.688Z', ' Response 200 DELETE /session/b798ac620a723364eefa550fe820baef (52ms)', '{ value: null }'] + ] } }, 'firefox': { @@ -1848,4 +2443,4 @@ module.exports = { 'abortOnFailure': true, 'stack': 'Error\n at Proxy. (/Users/binayakghosh/projects/nightwatch-copy/lib/api/index.js:149:30)\n at DescribeInstance. (/Users/binayakghosh/projects/nightwatch-copy/examples/tests/ecosia.js:22:15)\n at Context.call (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/context.js:476:35)\n at TestCase.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/testcase.js:58:31)\n at Runnable.__runFn (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:80)\n at Runnable.run (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/runnable.js:126:21)\n at TestSuite.executeRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:893:49)\n at TestSuite.handleRunnable (/Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:908:33)\n at /Users/binayakghosh/projects/nightwatch-copy/lib/testsuite/index.js:743:21\n at async DefaultRunner.runTestSuite (/Users/binayakghosh/projects/nightwatch-copy/lib/runner/test-runners/default.js:76:7)' } -}; \ No newline at end of file +}; diff --git a/test/src/runner/testRunnerHtmlOutput.js b/test/src/runner/testRunnerHtmlOutput.js index 043813a577..513ca1e458 100644 --- a/test/src/runner/testRunnerHtmlOutput.js +++ b/test/src/runner/testRunnerHtmlOutput.js @@ -50,18 +50,18 @@ describe('testRunnerHTMLOutput', function() { assert.strictEqual(Object.keys(environments).length, 2); assert.ok(metadata.date); - assert.strictEqual(stats.total, 4); - assert.strictEqual(stats.failed, 2); - assert.strictEqual(stats.passed, 2); + assert.strictEqual(stats.total, 6); + assert.strictEqual(stats.failed, 3); + assert.strictEqual(stats.passed, 3); const chromeEnv = environments['chrome']; const firefoxEnv = environments['firefox']; assert.ok(chromeEnv); - assert.strictEqual(chromeEnv.stats.passed, 1); - assert.strictEqual(chromeEnv.stats.failed, 1); + assert.strictEqual(chromeEnv.stats.passed, 2); + assert.strictEqual(chromeEnv.stats.failed, 2); assert.strictEqual(chromeEnv.stats.skipped, 0); - assert.strictEqual(chromeEnv.stats.time, 13738); + assert.strictEqual(chromeEnv.stats.time, 27476); assert.strictEqual(chromeEnv.metadata.platformName, 'mac os x'); assert.strictEqual(chromeEnv.metadata.browserName, 'chrome'); assert.strictEqual(chromeEnv.metadata.browserVersion, '108.0.5359.124'); @@ -81,7 +81,7 @@ describe('testRunnerHTMLOutput', function() { assert.strictEqual(stats.time, chromeEnv.stats.time + firefoxEnv.stats.time); - assert.strictEqual(Object.keys(chromeEnv.modules).length, 1); + assert.strictEqual(Object.keys(chromeEnv.modules).length, 2); assert.strictEqual(Object.keys(chromeEnv.modules['ecosia'].completedSections).length, 6); assert.strictEqual(chromeEnv.modules['ecosia'].seleniumLog, '/Users/binayakghosh/projects/nightwatch-copy/logs/ecosia_chromedriver.log');