-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from qase-tms/integration_docs
add an example for integration with Qase
- Loading branch information
Showing
7 changed files
with
339 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
name: Node package | ||
|
||
on: [push] | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'examples/**' | ||
|
||
jobs: | ||
test: | ||
|
46 changes: 46 additions & 0 deletions
46
examples/github-qase-integration/.github/workflows/github-actions-test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Run tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
qase_api_base_url: | ||
description: 'Qase API URL' | ||
required: true | ||
qase_report: | ||
description: 'Enabled/disabled reporting to Qase' | ||
required: true | ||
qase_project_code: | ||
description: 'Qase project code' | ||
required: true | ||
qase_run_id: | ||
description: 'Qase Run ID' | ||
required: true | ||
qase_run_complete: | ||
description: 'Complete Qase Run' | ||
required: true | ||
|
||
env: | ||
QASE_API_BASE_URL: ${{ inputs.qase_api_base_url }} | ||
QASE_REPORT: ${{ inputs.qase_report }} | ||
QASE_PROJECT_CODE: ${{ inputs.qase_project_code }} | ||
QASE_RUN_ID: ${{ inputs.qase_run_id }} | ||
QASE_RUN_COMPLETE: ${{ inputs.qase_run_complete }} | ||
QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }} | ||
|
||
jobs: | ||
build-js: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- uses: qase-tms/qase-link-run@main | ||
env: | ||
QASE_API_TOKEN: ${{ env.QASE_API_TOKEN }} | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "test-qase-gh-action", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"test": "npx playwright test" | ||
}, | ||
"author": "", | ||
"license": "Apache License 2.0", | ||
"dependencies": { | ||
"@playwright/test": "^1.31.1", | ||
"playwright-qase-reporter": "^1.2.0-alpha.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const config = { | ||
use: { | ||
screenshot: 'only-on-failure', | ||
video: 'retain-on-failure', | ||
}, | ||
reporter: [ | ||
['list'], | ||
[ | ||
'playwright-qase-reporter', | ||
{ | ||
logging: true, | ||
}, | ||
], | ||
], | ||
}; | ||
module.exports = config; |
18 changes: 18 additions & 0 deletions
18
examples/github-qase-integration/tests/playwright/test.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {test, expect} from '@playwright/test' | ||
import {qase} from 'playwright-qase-reporter/dist/playwright' | ||
|
||
test(qase(1, 'Several ids'), () => { | ||
expect(true).toBe(true); | ||
}) | ||
|
||
test(qase(2, 'Correct test'), () => { | ||
expect(true).toBe(true); | ||
}) | ||
|
||
test.skip(qase(3, 'Skipped test'), () => { | ||
expect(true).toBe(true); | ||
}) | ||
|
||
test(qase(4, 'Failed test'), () => { | ||
expect(true).toBe(false); | ||
}) |