testit-adapter-codecept 4.0.5 → 4.1.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 CHANGED
@@ -12,6 +12,11 @@ npm install testit-adapter-codecept
12
12
 
13
13
  ### Configuration
14
14
 
15
+ #### Log level
16
+
17
+ The adapter includes a custom logger; the default level is `warn`. Set another level at runtime with the `LOG_LEVEL` environment variable: `error`, `warn`, `info`, or `debug`.
18
+
19
+
15
20
  | Description | File property | Environment variable |
16
21
  |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|--------------------------------------------|
17
22
  | Location of the TMS instance | url | TMS_URL |
@@ -24,6 +29,7 @@ npm install testit-adapter-codecept
24
29
  | It enables/disables certificate validation (**It's optional**). Default value - true | certValidation | TMS_CERT_VALIDATION |
25
30
  | Mode of automatic creation test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES |
26
31
  | Mode of automatic updation links to test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will update links to test cases<br/>false - in this mode, the adapter will not update link to test cases | automaticUpdationLinksToTestCases | TMS_AUTOMATIC_UPDATION_LINKS_TO_TEST_CASES |
32
+ | Logger level, default value is `warn`, available values: [`error`, `warn`, `info`, `debug`] | | LOG_LEVEL |
27
33
 
28
34
  Add TestITHelper and TestITPlugin to Codecept file configuration
29
35
 
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ResultBuilder = void 0;
4
4
  const testit_js_commons_1 = require("testit-js-commons");
5
5
  const utils_1 = require("../common/utils");
6
+ const testit_js_commons_2 = require("testit-js-commons");
6
7
  class ResultBuilder {
7
8
  constructor(config) {
8
9
  this.config = config;
@@ -27,11 +28,11 @@ class ResultBuilder {
27
28
  // If TMS_IS_CI env is true, trim traces and message to 20 chars and log this
28
29
  if (process.env.TMS_IS_CI === "true") {
29
30
  if (typeof traces === "string" && traces.length > 20) {
30
- console.log("TMS_IS_CI is true: trimming traces to 20 chars");
31
+ testit_js_commons_2.logger.log("TMS_IS_CI is true: trimming traces to 20 chars");
31
32
  traces = traces.slice(0, 20);
32
33
  }
33
34
  if (typeof message === "string" && message.length > 20) {
34
- console.log("TMS_IS_CI is true: trimming message to 20 chars");
35
+ testit_js_commons_2.logger.log("TMS_IS_CI is true: trimming message to 20 chars");
35
36
  message = message.slice(0, 20);
36
37
  }
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-adapter-codecept",
3
- "version": "4.0.5",
3
+ "version": "4.1.0",
4
4
  "description": "Codecept adapter for Test IT",
5
5
  "keywords": [],
6
6
  "author": {
@@ -15,7 +15,7 @@
15
15
  "watch": "tsc -p tsconfig.json -w"
16
16
  },
17
17
  "dependencies": {
18
- "testit-js-commons": "4.0.5"
18
+ "testit-js-commons": "4.1.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@codeceptjs/configure": "^0.10.0",