Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions tests/e2e/configs/reporters.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
const { REPORTER_CONSTANTS } = require('../constants/REPORTER_CONSTANTS');
const { BASE_TEST_CONSTANTS } = require('../constants/BASE_TEST_CONSTANTS');

module.exports = {
reporterEnabled: REPORTER_CONSTANTS.REPORTERS_ENABLED(),
Expand All @@ -18,42 +17,5 @@ module.exports = {

reporterOptions: {
mochaFile: `${REPORTER_CONSTANTS.TS_SELENIUM_REPORT_FOLDER}/junit/test-results.xml`
},

reportportalAgentJsMochaReporterOptions: {
apiKey: REPORTER_CONSTANTS.RP_API_KEY,
endpoint: REPORTER_CONSTANTS.RP_ENDPOINT(),
project: REPORTER_CONSTANTS.RP_PROJECT(),
launch: `${REPORTER_CONSTANTS.RP_LAUNCH_NAME}`,
attributes: [
{
key: 'build',
value: `${BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION}`
},
{
key: 'ocp version',
value: `${BASE_TEST_CONSTANTS.OCP_VERSION}`
},
{
key: 'ocp infra',
value: `${BASE_TEST_CONSTANTS.OCP_INFRA}`
},
{
key: 'application',
value: BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME()
},
{
key: 'url',
value: BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL
},
{
value: REPORTER_CONSTANTS.TEST_RUN_URL
}
],
rerun: REPORTER_CONSTANTS.RP_RERUN(),
rerunOf: REPORTER_CONSTANTS.RP_RERUN_UUID,
restClientConfig: {
timeout: 1200000
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ validateParameters(){

launchDynamicallyGeneratingAPITests() {
export MOCHA_SUITE="DynamicallyGeneratingAPITest"
export RP_LAUNCH_NAME="Devfile Acceptance tests suite"
echo "MOCHA_SUITE = ${MOCHA_SUITE}"
echo "suites/$MOCHA_DIRECTORY/$MOCHA_SUITE"
npm run delayed-test
Expand Down
3 changes: 0 additions & 3 deletions tests/e2e/configs/sh-scripts/runFunctionalTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,19 @@ validateParameters(){
launchAPITests() {
export MOCHA_SUITE="APITest"
echo "MOCHA_SUITE = ${MOCHA_SUITE}"
export RP_LAUNCH_NAME="API tests suite $TEST_ENVIRONMENT"
echo "suites/$MOCHA_DIRECTORY/$MOCHA_SUITE"
npm run driver-less-test
}

launchDynamicallyGeneratingAPITests() {
export MOCHA_SUITE="DynamicallyGeneratingAPITest"
export RP_LAUNCH_NAME="Application inbuilt DevWorkspaces API tests suite $TEST_ENVIRONMENT"
echo "MOCHA_SUITE = ${MOCHA_SUITE}"
echo "suites/$MOCHA_DIRECTORY/$MOCHA_SUITE"
npm run delayed-test
}

launchUITests() {
export MOCHA_SUITE="UITest"
export RP_LAUNCH_NAME="UI tests suite $TEST_ENVIRONMENT"
echo "MOCHA_SUITE = ${MOCHA_SUITE}"
echo "suites/$MOCHA_DIRECTORY/$MOCHA_SUITE"
npm run test
Expand Down
79 changes: 0 additions & 79 deletions tests/e2e/constants/REPORTER_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,10 @@
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
import { BASE_TEST_CONSTANTS } from './BASE_TEST_CONSTANTS';
import { MOCHA_CONSTANTS } from './MOCHA_CONSTANTS';

export const REPORTER_CONSTANTS: {
DELETE_SCREENCAST_IF_TEST_PASS: boolean;
RP_ENDPOINT(): string | undefined;
RP_IS_LOCAL_SERVER: boolean;
REPORTERS_ENABLED(): string;
RP_API_KEY: string;
RP_PROJECT(): string;
RP_RERUN(): boolean;
RP_RERUN_UUID: string | undefined;
RP_LAUNCH_NAME: string;
RP_USER: string;
RP_USE_PERSONAL: boolean;
SAVE_ALLURE_REPORT_DATA: boolean;
SAVE_RP_REPORT_DATA: boolean;
SAVE_JUNIT_DATA: boolean;
TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS: number;
TS_SELENIUM_REPORT_FOLDER: string;
Expand Down Expand Up @@ -73,11 +60,6 @@ export const REPORTER_CONSTANTS: {
*/
SAVE_ALLURE_REPORT_DATA: process.env.SAVE_ALLURE_REPORT_DATA === 'true',

/**
* use ReportPortal reporter, default to false
*/
SAVE_RP_REPORT_DATA: process.env.SAVE_RP_REPORT_DATA === 'true',

/**
* use MochaJunit reporter, default to false
*/
Expand All @@ -94,69 +76,8 @@ export const REPORTER_CONSTANTS: {
if (REPORTER_CONSTANTS.SAVE_ALLURE_REPORT_DATA) {
reporters += ',allure-mocha';
}
if (REPORTER_CONSTANTS.SAVE_RP_REPORT_DATA) {
reporters += ',@reportportal/agent-js-mocha';
}
return reporters;
},

/**
* reportPortal app key or user token
*/
RP_API_KEY: process.env.RP_API_KEY || '',

/**
* user name on ReportPortal
*/
RP_USER: process.env.RP_USER || process.env.USER || process.env.BUILD_USER_ID || '',

/**
* launch name to save report
*/
RP_LAUNCH_NAME: process.env.RP_LAUNCH_NAME || `Test run ${MOCHA_CONSTANTS.MOCHA_USERSTORY}`,

/**
* launch name to save report
*/
RP_RERUN_UUID: process.env.RP_RERUN_UUID || undefined,

/**
* is launch rerun
*/
RP_RERUN: (): boolean => !!REPORTER_CONSTANTS.RP_RERUN_UUID,

/**
* is local or online server to use
*/
RP_IS_LOCAL_SERVER: process.env.RP_IS_LOCAL_SERVER !== 'false',

/**
* url with endpoints where ReportPortal is
*/
RP_ENDPOINT: (): string | undefined => {
if (process.env.RP_ENDPOINTRP_IS_LOCAL_SERVER) {
return 'http://localhost:8080/api/v1';
}
if (process.env.RP_ENDPOINT !== '') {
return process.env.RP_ENDPOINT;
}
return 'https://reportportal-crw.apps.dno.ocp-hub.prod.psi.redhat.com/api/v1';
},

/**
* use personal project to save launch, if false launch will be sent to devspaces or che project, true by default
*/
RP_USE_PERSONAL: process.env.RP_USE_PERSONAL !== 'false',

/**
* project name to save launch
*/
RP_PROJECT: (): string => {
const project: string = REPORTER_CONSTANTS.RP_USE_PERSONAL
? `${REPORTER_CONSTANTS.RP_USER}_personal`
: BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME();
return process.env.RP_PROJECT || project;
},

TEST_RUN_URL: process.env.TEST_RUN_URL || 'Test run url not set'
};
Loading
Loading