Skip to content

Commit

Permalink
ui-tests issue #1552
Browse files Browse the repository at this point in the history
  • Loading branch information
sgauruseu committed Nov 23, 2023
1 parent 4297d99 commit 087384b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
15 changes: 13 additions & 2 deletions testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,27 @@ task stopServer {
}
}

task cleanup(type: Delete) {
delete './build/reports/allure'
}

task generateReportAndStopServer( type: NpmTask ) {
args = ['run-script', 'allure-report']
finalizedBy cleanup
finalizedBy stopServer
}


task testAppFirefox( type: NpmTask,
dependsOn: [npmInstall, unpackDistro, copyConfig, copyApps, deployApp, startServer] ) {
args = ['run-script', 'test:firefox']
finalizedBy stopServer
finalizedBy generateReportAndStopServer
}

task w_testAppChrome( type: NpmTask,
dependsOn: [npmInstall, unpackDistro, copyConfig, copyApps, deployApp, startServer] ) {
args = ['run-script', 'test_apps:wdio_chrome']
finalizedBy stopServer
finalizedBy generateReportAndStopServer
}
task w_testAppChromeLocal( type: NpmTask, dependsOn: [npmInstall] ) {
args = ['run-script', 'test_apps:wdio_chrome']
Expand Down
12 changes: 7 additions & 5 deletions testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
"license": "ISC",
"scripts": {
"test_apps:wdio_chrome": "npx wdio ./wdio.chrome.conf.js",
"test:firefox": "npx wdio ./wdio.conf.js"
"test:firefox": "npx wdio ./wdio.conf.js",
"allure-report": "allure generate ./build/reports/allure --output ./build/reports/allure-report --clean --single-file"
},
"devDependencies": {
"assert": "^2.1.0",
"chai": "^4.3.10",
"properties-reader": "^2.3.0",
"webdriverio": "8.23.1",
"@wdio/local-runner": "^8.23.1",
"webdriverio": "8.23.3",
"@wdio/local-runner": "^8.23.3",
"@wdio/spec-reporter": "^8.23.1",
"@wdio/cli": "^8.23.1",
"@wdio/cli": "^8.23.3",
"@wdio/mocha-framework": "^8.23.1",
"wdio-timeline-reporter": "^5.1.4"
"allure-commandline": "^2.24.1",
"@wdio/allure-reporter": "8.21.0"
},
"engines": {
"node": ">= 18.12.1",
Expand Down
7 changes: 2 additions & 5 deletions testing/wdio.chrome.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const path = require('path');
const {TimelineService} = require('wdio-timeline-reporter/timeline-service');
const PropertiesReader = require('properties-reader');
const file = path.join(__dirname, '/browser.properties');
const properties = PropertiesReader(file);
Expand Down Expand Up @@ -41,9 +40,6 @@ exports.config = {
// Default request retries count
connectionRetryCount: 3,

//services: ['chromedriver'],
services: [[TimelineService]],

framework: 'mocha',
mochaOpts: {
ui: 'bdd',
Expand All @@ -52,7 +48,8 @@ exports.config = {
// Set directory to store all logs into
outputDir: "./build/reports/logs/",

reporters: ['spec', ['timeline', { outputDir: './build/reports/timeline' }]
reporters: ['concise',
['allure', {outputDir: './build/reports/allure', disableWebdriverStepsReporting: true, disableWebdriverScreenshotsReporting: true,}],
],

// Hook that gets executed before the suite starts
Expand Down

0 comments on commit 087384b

Please sign in to comment.