testit-adapter-playwright 2.2.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/converter.js +1 -0
- package/dist/labels.d.ts +1 -0
- package/dist/reporter.js +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -77,6 +77,24 @@ $ testit testrun complete
|
|
|
77
77
|
--testrun-id $(cat tmp/output.txt)
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
#### Run with filter
|
|
81
|
+
To create filter by autotests you can use the Test IT CLI (use adapterMode 1 for run with filter):
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
$ export TMS_TOKEN=<YOUR_TOKEN>
|
|
85
|
+
$ testit autotests_filter
|
|
86
|
+
--url https://tms.testit.software \
|
|
87
|
+
--configuration-id 5236eb3f-7c05-46f9-a609-dc0278896464 \
|
|
88
|
+
--testrun-id 6d4ac4b7-dd67-4805-b879-18da0b89d4a8 \
|
|
89
|
+
--framework playwright \
|
|
90
|
+
--output tmp/filter.txt
|
|
91
|
+
|
|
92
|
+
$ export TMS_TEST_RUN_ID=6d4ac4b7-dd67-4805-b879-18da0b89d4a8
|
|
93
|
+
$ export TMS_ADAPTER_MODE=1
|
|
94
|
+
|
|
95
|
+
$ npx playwright test --grep "$(cat tmp/filter.txt)"
|
|
96
|
+
```
|
|
97
|
+
|
|
80
98
|
#### Launch using GitLab repository
|
|
81
99
|
To run your Playwright test's from GitLab to TestIT or in reverse order using "testit-adapter-playwright", you can take this .gitlab-ci.yml file example:
|
|
82
100
|
|
package/dist/converter.js
CHANGED
|
@@ -20,6 +20,7 @@ class Converter {
|
|
|
20
20
|
namespace: autotestData.namespace,
|
|
21
21
|
classname: autotestData.classname,
|
|
22
22
|
workItemIds: autotestData.workItemIds,
|
|
23
|
+
externalKey: autotestData.externalKey,
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
static convertAutotestPostToAutotestResult(autotestData, test, result) {
|
package/dist/labels.d.ts
CHANGED
package/dist/reporter.js
CHANGED
|
@@ -27,9 +27,8 @@ class TmsReporter {
|
|
|
27
27
|
this.loadTestPromises = new Array();
|
|
28
28
|
this.options = { suiteTitle: true, detail: true, ...options };
|
|
29
29
|
const config = new testit_js_commons_1.ConfigComposer().compose();
|
|
30
|
-
|
|
31
|
-
this.
|
|
32
|
-
this.additions = new testit_js_commons_1.Additions(client);
|
|
30
|
+
this.strategy = testit_js_commons_1.StrategyFactory.create(config);
|
|
31
|
+
this.additions = new testit_js_commons_1.Additions(config);
|
|
33
32
|
}
|
|
34
33
|
onBegin(config, suite) {
|
|
35
34
|
this.config = config;
|
|
@@ -91,7 +90,8 @@ class TmsReporter {
|
|
|
91
90
|
const autotestData = {
|
|
92
91
|
externalId: testit_js_commons_1.Utils.getHash(test.title),
|
|
93
92
|
displayName: test.title,
|
|
94
|
-
addAttachments: []
|
|
93
|
+
addAttachments: [],
|
|
94
|
+
externalKey: test.title,
|
|
95
95
|
};
|
|
96
96
|
for (const attachment of result.attachments) {
|
|
97
97
|
if (!attachment.body) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-adapter-playwright",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Playwright adapter for Test IT",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"prettier": "^3.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"testit-js-commons": "~
|
|
43
|
+
"testit-js-commons": "~3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist"
|