Skip to content

Commit ba74e80

Browse files
authored
Add import allure report in TestIT (#6)
* Merge * fix gitignore * add optional flow * Merge branch 'main' into optional-flow * remove testit adapter * implement optional workflow into main
1 parent 8ba66f6 commit ba74e80

7 files changed

Lines changed: 40 additions & 26 deletions

File tree

.DS_Store

6 KB
Binary file not shown.

.github/workflows/main-workflow copy.yml renamed to .github/workflows/main-workflow-original.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
name: Playwright Tests Original
1+
name: main-workflow-original
22
on:
3-
workflow_dispatch:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
47
jobs:
58
test:
69
name: Playwright jobs

.github/workflows/main-workflow.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Playwright Tests
1+
name: Main workflow
22
on:
33
workflow_dispatch:
44
push:
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88
jobs:
99
test:
10-
name: Playwright jobs
10+
name: Prod job
1111
timeout-minutes: 60
1212
runs-on: ubuntu-latest
1313
steps:
@@ -16,22 +16,23 @@ jobs:
1616
with:
1717
node-version: lts/*
1818
- name: Install dependencies
19-
run: npm ci
19+
run: |
20+
npm ci
21+
pip install testit-importer-allure
22+
- name: TestIT configiration
23+
run: |
24+
testit --url ${{ secrets.TMS_URL }}
25+
testit --privatetoken ${{ secrets.TMS_PRIVATE_TOKEN }}
26+
testit --projectid ${{ secrets.TMS_PROJECT_ID }}
27+
testit --configurationid ${{ secrets.TMS_CONFIGURATION_ID }}
2028
- name: Install Playwright Browsers
2129
run: npx playwright install --with-deps
22-
- name: Install allure report
23-
run: npm install -D allure-playwright
2430
- name: Run Playwright tests
25-
env:
26-
TMS_PRIVATE_TOKEN: ${{ secrets.TMS_PRIVATE_TOKEN }}
27-
TMS_URL: ${{ secrets.TMS_URL }}
28-
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}
29-
TMS_CONFIGURATION_ID: ${{ secrets.TMS_CONFIGURATION_ID }}
30-
TMS_TEST_RUN_NAME: ${{ secrets.TMS_TEST_RUN_NAME }}
31-
TMS_ADAPTER_MODE: 2
32-
run: npx playwright test fast.spec.ts
33-
- name: Allure report
31+
run: npx playwright test main-page.spec.ts
32+
- name: Generate allure report
3433
run: npm run allure:generate
34+
- name: Import allure report in TestIT
35+
run: testit --resultsdir allure-results --testrunname allure-reports
3536
- uses: actions/upload-artifact@v4
3637
if: ${{ !cancelled() }}
3738
with:

.github/workflows/optional-flow.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Optional deploy flow
22
on:
33
workflow_dispatch:
4+
push:
5+
branches: [ optional-flow ]
6+
pull_request:
7+
branches: [ optional-flow ]
48
jobs:
59
test:
610
name: Prod job
@@ -13,13 +17,25 @@ jobs:
1317
node-version: lts/*
1418
- name: Install dependencies
1519
run: npm ci
20+
- name: Install testit-importer-allure
21+
run: pip install testit-importer-allure
22+
- name: testit configiration
23+
run: |
24+
testit --url ${{ secrets.TMS_URL }}
25+
testit --privatetoken ${{ secrets.TMS_PRIVATE_TOKEN }}
26+
testit --projectid ${{ secrets.TMS_PROJECT_ID }}
27+
testit --configurationid ${{ secrets.TMS_CONFIGURATION_ID }}
1628
- name: Install Playwright Browsers
1729
run: npx playwright install --with-deps
1830
- name: Run Playwright tests
1931
run: npx playwright test main-page.spec.ts
32+
- name: Allure report
33+
run: npm run allure:generate
34+
- name: allure-results
35+
run: testit --resultsdir allure-results --testrunname allure-reports
2036
- uses: actions/upload-artifact@v4
2137
if: ${{ !cancelled() }}
2238
with:
23-
name: playwright-report
24-
path: playwright-report/
39+
name: allure-report
40+
path: allure-report/
2541
retention-days: 30

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ node_modules/
88
/allure-results/
99

1010
.env
11+
.DS_Store

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default defineConfig({
2222
/* Opt out of parallel tests on CI. */
2323
workers: process.env.CI ? 1 : undefined,
2424
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
25-
reporter: [['list', { printSteps: true }],["testit-adapter-playwright"]],
25+
reporter: [['list', { printSteps: true }],["allure-playwright"]],
2626
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2727
use: {
2828
/* Base URL to use in actions like `await page.goto('/')`. */

tms.config.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)