i am using this framework https://github.com/labs42io/web-automation and i want to run my tests locally. In order to do so, i have created a wdio.local.conf.js under the config folder and assigned below value to test:local to package json. "test:local": "node ./node_modules/@wdio/cli/bin/wdio.js ./config/wdio.local.conf.js --spec".
Below is my package JSON
Below is mine wdio.local.conf.js
//import { ENGINE_METHOD_DIGESTS } from "constants";
//const { TimelineService } = require('wdio-timeline-reporter/timeline-service'); exports.config = { runner: 'local', hostname: 'localhost', port: 4444, path: '/wd/hub', specs: ['./src/UI/features/*.feature'], maxInstances: 1, capabilities: [ { maxInstances: 1, browserName: 'chrome', },
// {
// maxInstances: 1,
// browserName: 'firefox',
// }
//{
//maxInstances: 1,
//browserName: 'MicrosoftEdge',
// },//
//{
//maxInstances: 1,
//browserName: 'safari',
//},//
],
logLevel: 'trace',
outputDir: './test-report/output',
bail: 0,
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'cucumber',
reporters: ['spec', [
'cucumberjs-json', {
jsonFolder: './report/cucumber/',
}],
],
cucumberOpts: {
requireModule: [
() => {
require('ts-node').register({ transpileOnly: true });
},
],
require: ['./src/UI/steps/*.ts'],
backtrace: false,
compiler: [],
dryRun: false,
failFast: true,
format: ['pretty'],
colors: true,
snippets: true,
source: true,
profile: [],
strict: false,
tags: [],
timeout: 300000,
ignoreUndefinedDefinitions: false,
tagExpression: 'not @skip',
},
services: ['chromedriver'],
//services:['selenium-standalone'],
beforeSession() {
require('expect-webdriverio').setOptions({ wait: 5000 });
},
before() {
browser.maximizeWindow();
},
//afterStep(
//uri: undefined,
//feature: undefined,
// scenario: { error: boolean },
//) {
//if (scenario.error) {
// browser.takeScreenshot();
//}
//},//
};
but i am unable to run the test as shown below:
Aucun commentaire:
Enregistrer un commentaire