Skip to content
Snippets Groups Projects
Commit de917f64 authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-3934-Cypress12ParrallelRun' (#313) from...

Merge pull request 'OZG-3934-Cypress12ParrallelRun' (#313) from OZG-3934-Cypress12ParrallelRun into master

Reviewed-on: https://git.ozg-sh.de/mgm/goofy/pulls/313
parents 3747cb5e 5f62d786
No related branches found
No related tags found
No related merge requests found
Showing
with 84 additions and 51 deletions
......@@ -16,6 +16,8 @@ target/
# Client
goofy-client/.vscode/
goofy-client/apps/coverage/
goofy-client/node/*
goofy-client/temp/*
.attach**
.factorypath
......@@ -452,9 +452,10 @@
"e2e": {
"builder": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/goofy-e2e/cypress.json",
"cypressConfig": "apps/goofy-e2e/cypress.config.ts",
"tsConfig": "apps/goofy-e2e/tsconfig.e2e.json",
"devServerTarget": "goofy:serve"
"devServerTarget": "goofy:serve",
"testingType": "e2e"
},
"configurations": {
"production": {
......
......@@ -190,15 +190,6 @@ pipeline {
}
}
// stage('Pausing to wait for ozg-operator') {
// when {
// expression { !SKIP_RUN }
// }
// steps {
// sleep(time: 3, unit: 'MINUTES')
// }
// }
stage('Run E2E-Tests') {
when {
expression { !SKIP_RUN }
......@@ -614,12 +605,13 @@ Void publishE2ETestResult(String reportFolder, String reportName) {
}
String runTests(String bezeichner, String reportFolder, Integer dbPort, String stageName) {
def configFile = generateCypressConfig(bezeichner, reportFolder, dbPort)
def config = generateCypressConfig(bezeichner, reportFolder, dbPort)
def spec = "apps/goofy-e2e/src/e2e/${reportFolder}"
try {
dir("goofy-client") {
dir('goofy-client'){
sh "npm run cypress:version"
sh "npm run cypress:ci-run --CONFIG_FILE=${configFile} --REPORT_FOLDER=${reportFolder}"
sh "npm run cypress:ci-run --CONFIG=./${config} --REPORT_FOLDER=${reportFolder}"
}
} catch (Exception e) {
printNpmDebugLog()
......@@ -671,13 +663,13 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
config.env.dbUrl = "mongodb://${decodeString(plutoDatabaseSecret.username)}:${parsablePassword}@localhost:${dbPort}/admin?ssl=false&directConnection=true" as String
config.env.keycloakUrl = "https://${env.SSO_URL}/" as String
config.env.keycloakRealm = namespace as String
config.env.keycloakClient = "alfa" as String
config.env.sabineUuid = getKeycloakUuid(namespace, "sabine") as String
config.integrationFolder = "./src/integration/${testFolder}" as String
config.videosFolder = "./reports/${testFolder}/videos" as String
config.screenshotsFolder = "./reports/${testFolder}/screenshots" as String
config.reporterOptions.reportDir = "./reports/${testFolder}/mochawesome-report" as String
config.specPattern = "src/e2e/${testFolder}/**/*.cy.{js,jsx,ts,tsx}" as String
config.env.put("search", getElasticsearchEnv(namespace))
config.env.put("userManager", getUserManagerEnv(namespace, dbPort))
......@@ -686,7 +678,7 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
sh "cat ${configName}"
}
return configName
return "cypress-ci-"+testFolder+".config.ts"
}
String makePasswordUrlConform(String password) {
......
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';
//Cypress config is generated by JenkinsFile
const cypressConfig = require('./cypress-ci-einheitlicher-ansprechpartner.json');
const cypressEvents = require('./src/support/cypress-tasks.ts');
export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
...cypressConfig,
setupNodeEvents(on, config) {
return cypressEvents(on, config);
}
},
});
\ No newline at end of file
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';
//Cypress config is generated by JenkinsFile
const cypressConfig = require('./cypress-ci-main-tests.json');
const cypressEvents = require('./src/support/cypress-tasks.ts');
export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
...cypressConfig,
setupNodeEvents(on, config) {
return cypressEvents(on, config);
}
},
});
\ No newline at end of file
{
"baseUrl": "https://e2e.dev.by.ozg-cloud.de",
"env": {
"dbUrl": "mongodb+srv://pluto-database-user:XnHhfznNWg65NNd@pluto-database-svc.sh-e2e-dev.svc.cluster.local/admin?ssl=false",
"database": "pluto-database",
"keycloakRealm": "by-e2e-local-dev",
"keycloakUrl": "https://sso.dev.by.ozg-cloud.de/",
"keycloakClient": "alfa"
},
"fileServerFolder": ".",
"fixturesFolder": "./src/fixtures",
"integrationFolder": "./src/integration",
"modifyObstructiveCode": false,
"pluginsFile": "./src/plugins/index",
"supportFile": "./src/support/index.ts",
"video": true,
"videosFolder": "./reports/videos",
"screenshotsFolder": "./reports/screenshots",
"chromeWebSecurity": false,
"reporter": "../../node_modules/cypress-mochawesome-reporter",
"defaultCommandTimeout": 10000,
"supportFile": "./src/support/e2e.ts",
"testIsolation": false,
"reporterOptions": {
"html": false,
"json": true,
"quite": true,
"reportDir": "./reports/mochawesome-report",
"reportFilename": "report",
"overwrite": false
}
......
......@@ -20,16 +20,15 @@
},
"fileServerFolder": ".",
"fixturesFolder": "./src/fixtures",
"integrationFolder": "./src/integration",
"modifyObstructiveCode": false,
"pluginsFile": "./src/plugins/index",
"supportFile": "./src/support/index.ts",
"video": true,
"video": false,
"videosFolder": "./reports/videos",
"screenshotsFolder": "./reports/screenshots",
"chromeWebSecurity": false,
"reporter": "../../node_modules/cypress-mochawesome-reporter",
"defaultCommandTimeout": 10000,
"specPattern": "src/e2e/**/*.cy.{js,jsx,ts,tsx}",
"supportFile": "src/support/e2e.ts",
"testIsolation": false,
"reporterOptions": {
"html": false,
"json": true,
......
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';
const cypressConfig = require('./cypress.config.json');
const cypressEvents = require('./src/support/cypress-tasks.ts');
export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
...cypressConfig,
setupNodeEvents(on, config) {
return cypressEvents(on, config);
}
},
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment