-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: implement mochawesome reporter
- Loading branch information
1 parent
c3f4661
commit 6babbd7
Showing
6 changed files
with
187 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,122 @@ | ||
{ | ||
"android19": { | ||
"platformName": "Android", | ||
"platformVersion": "4.4", | ||
"deviceName": "Emulator-Api19-Default", | ||
"avd": "Emulator-Api19-Default", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android21": { | ||
"platformName": "Android", | ||
"platformVersion": "5.0", | ||
"deviceName": "Emulator-Api21-Default", | ||
"avd": "Emulator-Api21-Default", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android23": { | ||
"platformName": "Android", | ||
"platformVersion": "6.0", | ||
"deviceName": "Emulator-Api23-Default", | ||
"avd": "Emulator-Api23-Default", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android24": { | ||
"platformName": "Android", | ||
"platformVersion": "7.0", | ||
"deviceName": "Emulator-Api24-Default", | ||
"avd": "Emulator-Api24-Default", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android25": { | ||
"platformName": "Android", | ||
"platformVersion": "7.1", | ||
"deviceName": "Emulator-Api25-Google", | ||
"avd": "Emulator-Api25-Google", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android26": { | ||
"platformName": "Android", | ||
"platformVersion": "8.0", | ||
"deviceName": "Emulator-Api26-Google", | ||
"avd": "Emulator-Api26-Google", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android27": { | ||
"platformName": "Android", | ||
"platformVersion": "27", | ||
"deviceName": "Emulator-Api27-Google", | ||
"avd": "Emulator-Api27-Google", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"android28": { | ||
"platformName": "Android", | ||
"platformVersion": "28", | ||
"deviceName": "Emulator-Api28-Google", | ||
"avd": "Emulator-Api28-Google", | ||
"lt": 60000, | ||
"newCommandTimeout": 720, | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"sim.iPhoneXS": { | ||
"sim.iPhone7": { | ||
"platformName": "iOS", | ||
"platformVersion": "/12.*/", | ||
"deviceName": "iPhone 7", | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"sim.iPhone8": { | ||
"platformName": "iOS", | ||
"platformVersion": "/12*/", | ||
"deviceName": "iPhone 8", | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"sim.iPhoneX": { | ||
"platformName": "iOS", | ||
"platformVersion": "12.0", | ||
"platformVersion": "/12*/", | ||
"deviceName": "iPhone X", | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
}, | ||
"sim.iPhoneXS": { | ||
"platformName": "ios", | ||
"platformVersion": "/12*/", | ||
"deviceName": "iPhone XS", | ||
"noReset": false, | ||
"fullReset": false, | ||
"app": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--timeout 999999 | ||
--recursive e2e | ||
--reporter mocha-multi | ||
--reporter-options spec=-,mocha-junit-reporter=test-results.xml | ||
--reporter mochawesome | ||
--reporter-options quiet=true,html=true,inline=true,autoOpen=true | ||
--exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import { startServer, stopServer } from "nativescript-dev-appium"; | ||
import { startServer, stopServer, ITestReporter, nsCapabilities, LogImageType } from "nativescript-dev-appium"; | ||
const addContext = require('mochawesome/addContext'); | ||
|
||
before("start server", async () => { | ||
const testReporterContext = <ITestReporter>{}; | ||
testReporterContext.name = "mochawesome"; | ||
testReporterContext.reportDir = "mochawesome-report"; | ||
testReporterContext.log = addContext; | ||
testReporterContext.logImageTypes = [LogImageType.screenshots]; | ||
nsCapabilities.testReporter = testReporterContext; | ||
|
||
before("start server", async function () { | ||
nsCapabilities.testReporter.context = this; | ||
await startServer(); | ||
}); | ||
|
||
after("stop server", async () => { | ||
after("stop server", async function () { | ||
await stopServer(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,56 @@ | ||
{ | ||
"description": "NativeScript Application", | ||
"license": "SEE LICENSE IN <your-license-filename>", | ||
"readme": "NativeScript Application", | ||
"repository": "<fill-your-repository-here>", | ||
"nativescript": { | ||
"id": "org.nativescript.curiosity" | ||
}, | ||
"dependencies": { | ||
"@angular/animations": "~7.2.0", | ||
"@angular/common": "~7.2.0", | ||
"@angular/compiler": "~7.2.0", | ||
"@angular/core": "~7.2.0", | ||
"@angular/forms": "~7.2.0", | ||
"@angular/http": "~7.2.0", | ||
"@angular/platform-browser": "~7.2.0", | ||
"@angular/platform-browser-dynamic": "~7.2.0", | ||
"@angular/router": "~7.2.0", | ||
"nativescript-angular": "next", | ||
"nativescript-app-center": "^1.0.3", | ||
"nativescript-cardview": "^3.1.1", | ||
"nativescript-permissions": "^1.3.5", | ||
"nativescript-plugin-firebase": "^8.2.0", | ||
"nativescript-social-share": "^1.5.1", | ||
"nativescript-theme-core": "^1.0.4", | ||
"nativescript-ui-sidedrawer": "^6.0.0", | ||
"reflect-metadata": "~0.1.13", | ||
"rxjs": "^6.3.3", | ||
"tns-core-modules": "next", | ||
"zone.js": "^0.8.4" | ||
}, | ||
"devDependencies": { | ||
"@angular/compiler-cli": "~7.2.0", | ||
"@ngtools/webpack": "~7.2.0", | ||
"@types/chai": "~4.1.3", | ||
"@types/mocha": "~5.2.1", | ||
"@types/node": "10.11.4", | ||
"codelyzer": "^4.4.4", | ||
"mocha": "~5.1.0", | ||
"mocha-junit-reporter": "~1.17.0", | ||
"mocha-multi": "~1.0.0", | ||
"nativescript-dev-appium": "^5.1.0", | ||
"nativescript-dev-typescript": "next", | ||
"nativescript-dev-webpack": "next", | ||
"tns-platform-declarations": "~5.3.1", | ||
"tslint": "^5.11.0", | ||
"typescript": "~3.1.1" | ||
}, | ||
"scripts": { | ||
"tslint": "tslint -p tsconfig.json", | ||
"e2e": "node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts ", | ||
"e2e-watch": "tsc -p e2e --watch", | ||
"update-app-ng-deps": "update-app-ng-deps", | ||
"ns-verify-bundle": "ns-verify-bundle", | ||
"update-ns-webpack": "update-ns-webpack" | ||
} | ||
"description": "NativeScript Application", | ||
"license": "SEE LICENSE IN <your-license-filename>", | ||
"readme": "NativeScript Application", | ||
"repository": "<fill-your-repository-here>", | ||
"nativescript": { | ||
"id": "org.nativescript.curiosity" | ||
}, | ||
"dependencies": { | ||
"@angular/animations": "~7.2.0", | ||
"@angular/common": "~7.2.0", | ||
"@angular/compiler": "~7.2.0", | ||
"@angular/core": "~7.2.0", | ||
"@angular/forms": "~7.2.0", | ||
"@angular/http": "~7.2.0", | ||
"@angular/platform-browser": "~7.2.0", | ||
"@angular/platform-browser-dynamic": "~7.2.0", | ||
"@angular/router": "~7.2.0", | ||
"nativescript-angular": "next", | ||
"nativescript-app-center": "^1.0.3", | ||
"nativescript-cardview": "^3.1.1", | ||
"nativescript-permissions": "^1.3.5", | ||
"nativescript-plugin-firebase": "^8.2.0", | ||
"nativescript-social-share": "^1.5.1", | ||
"nativescript-theme-core": "^1.0.4", | ||
"nativescript-ui-sidedrawer": "^6.0.0", | ||
"reflect-metadata": "~0.1.13", | ||
"rxjs": "^6.3.3", | ||
"tns-core-modules": "next", | ||
"zone.js": "^0.8.4" | ||
}, | ||
"devDependencies": { | ||
"@angular/compiler-cli": "~7.2.0", | ||
"@ngtools/webpack": "~7.2.0", | ||
"@types/chai": "~4.1.7", | ||
"@types/mocha": "~5.2.5", | ||
"@types/node": "~10.12.18", | ||
"codelyzer": "^4.4.4", | ||
"mocha": "~5.2.0", | ||
"mochawesome": "~3.1.2", | ||
"nativescript-dev-appium": "^next", | ||
"nativescript-dev-typescript": "next", | ||
"nativescript-dev-webpack": "next", | ||
"tns-platform-declarations": "~5.3.1", | ||
"tslint": "^5.11.0", | ||
"typescript": "~3.1.1" | ||
}, | ||
"scripts": { | ||
"tslint": "tslint -p tsconfig.json", | ||
"e2e": "node ./node_modules/nativescript-dev-appium/check-dev-deps.js && tsc -p e2e && mocha --opts ./e2e/config/mocha.opts ", | ||
"e2e-watch": "tsc -p e2e --watch", | ||
"update-app-ng-deps": "update-app-ng-deps", | ||
"ns-verify-bundle": "ns-verify-bundle", | ||
"update-ns-webpack": "update-ns-webpack" | ||
} | ||
} |