From fa2adcc87e65fe675d9eb94cea4874b56052b248 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Tue, 3 Dec 2024 17:21:08 +0530 Subject: [PATCH] Add fixes to properly store the test results through junit --- .circleci/config_continue.yml | 7 +++++++ .circleci/setupAndTestBackendSDKWithFreeCore.sh | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config_continue.yml b/.circleci/config_continue.yml index 31c1c9f9c..d9920f833 100644 --- a/.circleci/config_continue.yml +++ b/.circleci/config_continue.yml @@ -47,6 +47,10 @@ jobs: parameters: cdi-version: type: string + fdi-version: + type: string + environment: + MOCHA_FILE: ~/test_report/report_node-<< parameters.fdi-version >>.xml parallelism: 4 steps: - checkout @@ -56,6 +60,8 @@ jobs: - run: update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-15.0.1/bin/java" 2 - run: update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-15.0.1/bin/javac" 2 - run: (cd .circleci/ && ./doUnitTests.sh << parameters.cdi-version >>) + - store_test_results: + path: ~/test_report/report_node-<< parameters.fdi-version >>.xml - slack/status test-backend-sdk-testing: docker: @@ -173,6 +179,7 @@ workflows: matrix: parameters: cdi-version: placeholder + fdi-version: placeholder - test-backend-sdk-testing: requires: - test-dev-tag-as-not-passed diff --git a/.circleci/setupAndTestBackendSDKWithFreeCore.sh b/.circleci/setupAndTestBackendSDKWithFreeCore.sh index 60f2ee7c5..126d04334 100755 --- a/.circleci/setupAndTestBackendSDKWithFreeCore.sh +++ b/.circleci/setupAndTestBackendSDKWithFreeCore.sh @@ -107,6 +107,7 @@ git clone git@github.com:supertokens/backend-sdk-testing.git cd backend-sdk-testing git checkout $frontendDriverVersion npm install +npm i mocha-multi npm run build export API_PORT=$API_PORT @@ -116,7 +117,7 @@ export NODE_PORT=8081 export INSTALL_PATH=../supertokens-root TEST_FILES=$(circleci tests glob "test/**/*.test.js") -echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --timeout 500000 --no-config" --verbose --split-by=timings +multi="spec=- mocha-junit-reporter=/dev/null" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --timeout 500000 --no-config" --verbose --split-by=timings # kill test-server kill $(lsof -t -i:$API_PORT)