Skip to content

Commit bf284d9

Browse files
committed
feat(e2e): Added currents reporter to Suite lite e2e tests
1 parent ad061ad commit bf284d9

File tree

4 files changed

+6727
-4961
lines changed

4 files changed

+6727
-4961
lines changed

.github/workflows/test-suite-native-e2e-android.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,35 @@ jobs:
248248
avd-name: ${{ steps.device.outputs.AVD_NAME }}
249249
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -grpc 8554
250250
script: yarn test:e2e android.emu.release --headless --take-screenshots failing --record-videos failing
251+
252+
- name: Upload results to Currents.dev
253+
if: ${{ ! cancelled() }}
254+
env:
255+
CURRENTS_PROJECT_ID: 4ytF0E
256+
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
257+
working-directory: ./suite-native/app
258+
run: |
259+
npx currents convert \
260+
--input-format=junit \
261+
--input-file=./reports/junit-report.xml \
262+
--output-dir=./currents \
263+
--framework=postman \
264+
--framework-version=v11.2.0
265+
npx currents upload --project-id=${CURRENTS_PROJECT_ID} --key=${CURRENTS_RECORD_KEY} --report-dir ./currents
266+
267+
- name: "Store junit reports"
268+
if: ${{failure()}}
269+
uses: actions/upload-artifact@v4
270+
with:
271+
name: junit-report
272+
path: suite-native/app/reports
273+
274+
- name: "Store currents reports"
275+
if: ${{failure()}}
276+
uses: actions/upload-artifact@v4
277+
with:
278+
name: currents-report
279+
path: suite-native/app/currents
251280

252281
- name: "Store failed test screenshot artifacts"
253282
if: ${{failure()}}

suite-native/app/e2e/jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ module.exports = {
77
testTimeout: 120000,
88
globalSetup: 'detox/runners/jest/globalSetup',
99
globalTeardown: 'detox/runners/jest/globalTeardown',
10-
reporters: ['detox/runners/jest/reporter'],
10+
reporters: [
11+
'detox/runners/jest/reporter',
12+
["jest-junit", { outputDirectory: "./reports", outputName: "junit-report.xml" }]
13+
],
1114
testEnvironment: 'detox/runners/jest/testEnvironment',
1215
verbose: true,
1316
maxWorkers: 1,

suite-native/app/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
"@babel/core": "^7.20.0",
127127
"@babel/plugin-transform-export-namespace-from": "^7.23.4",
128128
"@config-plugins/detox": "^8.0.0",
129+
"@currents/cmd": "^1.6.0",
129130
"@react-native-community/cli": "^15.1.2",
130131
"@react-native/babel-preset": "^0.75.2",
131132
"@suite-common/test-utils": "workspace:^",
@@ -137,6 +138,7 @@
137138
"detox": "^20.25.6",
138139
"expo-atlas": "0.3.27",
139140
"jest": "^29.7.0",
141+
"jest-junit": "^16.0.0",
140142
"metro": "0.81.0",
141143
"ts-jest": "^29.1.2",
142144
"typescript": "^5.3.3"

0 commit comments

Comments
 (0)