You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use a coverage test on my Codeceptjs tests. Unfortunately, the Coverage plugin is not available with the Webdriver helper.
I found an “old” plugin that allowed you to have a coverage test: codeceptjs-monocart-coverage. Recently this plugin is directly integrated into Codeceptjs (monocart-coverage-reports - npm).
Here is the configuration that I integrated into my codecept.conf.js.
monocart: {
require: ‘codeceptjs-monocart-coverage’,
enabled: true,
coverageOptions: {
name: ‘My CodeceptJS Coverage Report’,
outputDir: ‘coverage-report’,
}
},
Test id
test something:
[Wrapped Error] {}
at C:\Users****\node_modules\codeceptjs\lib\recorder.js:262:15
at processTicksAndRejections (node:internal/process/task_queues:96:5)
What are you trying to achieve?
Hi,
I want to use a coverage test on my Codeceptjs tests. Unfortunately, the Coverage plugin is not available with the Webdriver helper.
I found an “old” plugin that allowed you to have a coverage test: codeceptjs-monocart-coverage. Recently this plugin is directly integrated into Codeceptjs (monocart-coverage-reports - npm).
Here is the configuration that I integrated into my codecept.conf.js.
monocart: {
require: ‘codeceptjs-monocart-coverage’,
enabled: true,
coverageOptions: {
name: ‘My CodeceptJS Coverage Report’,
outputDir: ‘coverage-report’,
}
},
What do you get instead?
But when I run my code I get this error:
Test des data-testid sur la page ordonnance Abilis --
[1] Starting recording promises
Timeouts:
test something
[1] Error (Non-Terminated) | [object Object] | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error (Non-Terminated) | Error: [Wrapped Error] {} | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: [Wrapped Error] {} undefined...
[1] Stopping recording promises
» Test failed, try to save a screenshot
» Screenshot has been saved to C:\Users***\output\test_something.failed.png
× FAILED in 2647ms
Starting recording promises
-- FAILURES:
test something:
[Wrapped Error] {}
at C:\Users****\node_modules\codeceptjs\lib\recorder.js:262:15
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Artifacts:
FAIL | 0 passed, 1 failed // 6s
[MCR] Not found coverage data in dir(s):
# paste output here
// paste test
Details
This is the config file codecept.conf.js :
/** @type {CodeceptJS.MainConfig} /
exports.config = {
tests: './_test.js',
output: './output',
helpers: {
WebDriver: {
url: 'https:///',
host: 'hub-selenium.',
path: '/',
protocol: 'https',
port: 443,
browser: 'chrome',
capabilities: {
alwaysMatch: {
browserName: 'chrome',
acceptInsecureCerts: true
}
}
}
},
include: {
I: './steps_file.js'
},
name: 'codeceptjs-data-testid',
plugins: {
monocart: {
require: 'codeceptjs-monocart-coverage',
enabled: true,
coverageOptions: {
name: 'My CodeceptJS Coverage Report',
outputDir: 'coverage-report',
}
},
customLocator: {
enabled: true,
attribute: 'data-testid',
startegy: 'css'
},
allure: {
enabled: true,
require: "allure-codeceptjs",
outputDir: "output/allure-results",
enableScreenshotDiffPlugin: true,
addConsoleLogs: true,
reportedEnvironmentVars: {
browser: 'firefox'
},
addConsoleLogs: true
}
}
}
The text was updated successfully, but these errors were encountered: