testit-adapter-mocha 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/lib/reporter.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -104,6 +104,24 @@ $ testit testrun complete
|
|
|
104
104
|
--testrun-id $(cat tmp/output.txt)
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
#### Run with filter
|
|
108
|
+
To create filter by autotests you can use the Test IT CLI (use adapterMode 1 for run with filter):
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
$ export TMS_TOKEN=<YOUR_TOKEN>
|
|
112
|
+
$ testit autotests_filter
|
|
113
|
+
--url https://tms.testit.software \
|
|
114
|
+
--configuration-id 5236eb3f-7c05-46f9-a609-dc0278896464 \
|
|
115
|
+
--testrun-id 6d4ac4b7-dd67-4805-b879-18da0b89d4a8 \
|
|
116
|
+
--framework mocha \
|
|
117
|
+
--output tmp/filter.txt
|
|
118
|
+
|
|
119
|
+
$ export TMS_TEST_RUN_ID=6d4ac4b7-dd67-4805-b879-18da0b89d4a8
|
|
120
|
+
$ export TMS_ADAPTER_MODE=1
|
|
121
|
+
|
|
122
|
+
$ npx mocha --grep $(cat tmp/filter.txt)
|
|
123
|
+
```
|
|
124
|
+
|
|
107
125
|
## Usage
|
|
108
126
|
|
|
109
127
|
Methods and properties can be used to specify information about autotest.
|
package/lib/reporter.js
CHANGED
|
@@ -105,9 +105,8 @@ class TmsReporter extends Reporter {
|
|
|
105
105
|
this.currentStep = emptyStep();
|
|
106
106
|
};
|
|
107
107
|
const config = new testit_js_commons_1.ConfigComposer().compose(options === null || options === void 0 ? void 0 : options.tmsOptions);
|
|
108
|
-
|
|
109
|
-
this.
|
|
110
|
-
this.additions = new testit_js_commons_1.Additions(client);
|
|
108
|
+
this.strategy = testit_js_commons_1.StrategyFactory.create(config);
|
|
109
|
+
this.additions = new testit_js_commons_1.Additions(config);
|
|
111
110
|
if (options.parallel) {
|
|
112
111
|
options.require = [...((_a = options.require) !== null && _a !== void 0 ? _a : []), (0, utils_1.resolveParallelModeSetupFile)()];
|
|
113
112
|
}
|
|
@@ -169,6 +168,7 @@ class TmsReporter extends Reporter {
|
|
|
169
168
|
setup,
|
|
170
169
|
teardown,
|
|
171
170
|
workItemIds: (_p = test.ctx) === null || _p === void 0 ? void 0 : _p.workItemsIds,
|
|
171
|
+
externalKey: test.title,
|
|
172
172
|
};
|
|
173
173
|
const promise = this.strategy.loadAutotest(autotestPost, test.state == StateConstants.STATE_PASSED);
|
|
174
174
|
this.autotestsQueue.push(promise);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-adapter-mocha",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Mocha adapter for Test IT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/types.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"mocha": "^10.2.0",
|
|
29
29
|
"deasync-promise": "^1.0.1",
|
|
30
|
-
"testit-js-commons": "~
|
|
30
|
+
"testit-js-commons": "~3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"lib"
|