@testomatio/reporter 1.6.13 → 2.0.1-beta-esm

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.
Files changed (142) hide show
  1. package/lib/adapter/codecept.d.ts +2 -0
  2. package/lib/adapter/codecept.js +295 -335
  3. package/lib/adapter/cucumber/current.d.ts +14 -0
  4. package/lib/adapter/cucumber/current.js +195 -203
  5. package/lib/adapter/cucumber/legacy.d.ts +0 -0
  6. package/lib/adapter/cucumber/legacy.js +130 -155
  7. package/lib/adapter/cucumber.d.ts +2 -0
  8. package/lib/adapter/cucumber.js +5 -16
  9. package/lib/adapter/cypress-plugin/index.d.ts +2 -0
  10. package/lib/adapter/cypress-plugin/index.js +93 -105
  11. package/lib/adapter/jasmine.d.ts +11 -0
  12. package/lib/adapter/jasmine.js +54 -53
  13. package/lib/adapter/jest.d.ts +13 -0
  14. package/lib/adapter/jest.js +97 -99
  15. package/lib/adapter/mocha.d.ts +2 -0
  16. package/lib/adapter/mocha.js +112 -140
  17. package/lib/adapter/playwright.d.ts +14 -0
  18. package/lib/adapter/playwright.js +195 -231
  19. package/lib/adapter/vitest.d.ts +35 -0
  20. package/lib/adapter/vitest.js +150 -149
  21. package/lib/adapter/webdriver.d.ts +24 -0
  22. package/lib/adapter/webdriver.js +134 -119
  23. package/lib/bin/cli.d.ts +2 -0
  24. package/lib/bin/cli.js +164 -211
  25. package/lib/bin/reportXml.d.ts +2 -0
  26. package/lib/bin/reportXml.js +49 -52
  27. package/lib/bin/startTest.d.ts +2 -0
  28. package/lib/bin/startTest.js +82 -95
  29. package/lib/bin/uploadArtifacts.d.ts +2 -0
  30. package/lib/bin/uploadArtifacts.js +55 -61
  31. package/lib/client.d.ts +76 -0
  32. package/lib/client.js +411 -465
  33. package/lib/config.d.ts +1 -0
  34. package/lib/config.js +16 -21
  35. package/lib/constants.d.ts +25 -0
  36. package/lib/constants.js +50 -44
  37. package/lib/data-storage.d.ts +34 -0
  38. package/lib/data-storage.js +206 -188
  39. package/lib/junit-adapter/adapter.d.ts +9 -0
  40. package/lib/junit-adapter/adapter.js +17 -20
  41. package/lib/junit-adapter/csharp.d.ts +4 -0
  42. package/lib/junit-adapter/csharp.js +18 -14
  43. package/lib/junit-adapter/index.d.ts +3 -0
  44. package/lib/junit-adapter/index.js +27 -25
  45. package/lib/junit-adapter/java.d.ts +5 -0
  46. package/lib/junit-adapter/java.js +41 -53
  47. package/lib/junit-adapter/javascript.d.ts +4 -0
  48. package/lib/junit-adapter/javascript.js +30 -27
  49. package/lib/junit-adapter/python.d.ts +5 -0
  50. package/lib/junit-adapter/python.js +38 -37
  51. package/lib/junit-adapter/ruby.d.ts +4 -0
  52. package/lib/junit-adapter/ruby.js +11 -8
  53. package/lib/output.d.ts +11 -0
  54. package/lib/output.js +44 -52
  55. package/lib/package.json +3 -0
  56. package/lib/pipe/bitbucket.d.ts +23 -0
  57. package/lib/pipe/bitbucket.js +210 -229
  58. package/lib/pipe/csv.d.ts +47 -0
  59. package/lib/pipe/csv.js +113 -126
  60. package/lib/pipe/debug.d.ts +29 -0
  61. package/lib/pipe/debug.js +104 -99
  62. package/lib/pipe/github.d.ts +30 -0
  63. package/lib/pipe/github.js +186 -213
  64. package/lib/pipe/gitlab.d.ts +23 -0
  65. package/lib/pipe/gitlab.js +166 -207
  66. package/lib/pipe/html.d.ts +34 -0
  67. package/lib/pipe/html.js +260 -319
  68. package/lib/pipe/index.d.ts +1 -0
  69. package/lib/pipe/index.js +84 -66
  70. package/lib/pipe/testomatio.d.ts +70 -0
  71. package/lib/pipe/testomatio.js +413 -462
  72. package/lib/reporter-functions.d.ts +34 -0
  73. package/lib/reporter-functions.js +28 -26
  74. package/lib/reporter.d.ts +232 -0
  75. package/lib/reporter.js +34 -29
  76. package/lib/services/artifacts.d.ts +33 -0
  77. package/lib/services/artifacts.js +55 -51
  78. package/lib/services/index.d.ts +9 -0
  79. package/lib/services/index.js +14 -12
  80. package/lib/services/key-values.d.ts +27 -0
  81. package/lib/services/key-values.js +56 -53
  82. package/lib/services/logger.d.ts +64 -0
  83. package/lib/services/logger.js +227 -245
  84. package/lib/template/testomatio.hbs +651 -1366
  85. package/lib/uploader.d.ts +60 -0
  86. package/lib/uploader.js +291 -360
  87. package/lib/utils/pipe_utils.d.ts +41 -0
  88. package/lib/utils/pipe_utils.js +89 -85
  89. package/lib/utils/utils.d.ts +45 -0
  90. package/lib/utils/utils.js +347 -307
  91. package/lib/xmlReader.d.ts +92 -0
  92. package/lib/xmlReader.js +490 -529
  93. package/package.json +57 -15
  94. package/src/adapter/codecept.js +375 -0
  95. package/src/adapter/cucumber/current.js +228 -0
  96. package/src/adapter/cucumber/legacy.js +158 -0
  97. package/src/adapter/cucumber.js +4 -0
  98. package/src/adapter/cypress-plugin/index.js +112 -0
  99. package/src/adapter/jasmine.js +60 -0
  100. package/src/adapter/jest.js +107 -0
  101. package/src/adapter/mocha.cjs +2 -0
  102. package/src/adapter/mocha.js +157 -0
  103. package/src/adapter/playwright.js +250 -0
  104. package/src/adapter/vitest.js +183 -0
  105. package/src/adapter/webdriver.js +142 -0
  106. package/src/bin/cli.js +280 -0
  107. package/src/bin/reportXml.js +74 -0
  108. package/src/bin/startTest.js +123 -0
  109. package/src/bin/uploadArtifacts.js +90 -0
  110. package/src/client.js +504 -0
  111. package/src/config.js +30 -0
  112. package/src/constants.js +53 -0
  113. package/src/data-storage.js +204 -0
  114. package/src/junit-adapter/adapter.js +23 -0
  115. package/src/junit-adapter/csharp.js +16 -0
  116. package/src/junit-adapter/index.js +28 -0
  117. package/src/junit-adapter/java.js +58 -0
  118. package/src/junit-adapter/javascript.js +31 -0
  119. package/src/junit-adapter/python.js +42 -0
  120. package/src/junit-adapter/ruby.js +10 -0
  121. package/src/output.js +57 -0
  122. package/src/pipe/bitbucket.js +254 -0
  123. package/src/pipe/csv.js +140 -0
  124. package/src/pipe/debug.js +104 -0
  125. package/src/pipe/github.js +233 -0
  126. package/src/pipe/gitlab.js +229 -0
  127. package/src/pipe/html.js +374 -0
  128. package/src/pipe/index.js +71 -0
  129. package/src/pipe/testomatio.js +503 -0
  130. package/src/reporter-functions.js +55 -0
  131. package/src/reporter.cjs_decprecated +21 -0
  132. package/src/reporter.js +33 -0
  133. package/src/services/artifacts.js +59 -0
  134. package/src/services/index.js +13 -0
  135. package/src/services/key-values.js +59 -0
  136. package/src/services/logger.js +316 -0
  137. package/src/template/emptyData.svg +23 -0
  138. package/src/template/testomatio.hbs +706 -0
  139. package/src/uploader.js +371 -0
  140. package/src/utils/pipe_utils.js +119 -0
  141. package/src/utils/utils.js +383 -0
  142. package/src/xmlReader.js +562 -0
@@ -1,118 +1,105 @@
1
1
  #!/usr/bin/env node
2
- const spawn = require('cross-spawn');
3
- const { program } = require('commander');
4
- const chalk = require('chalk');
5
- const TestomatClient = require('../client');
6
- const { APP_PREFIX, STATUS } = require('../constants');
7
- const { version } = require('../../package.json');
8
- const config = require('../config');
9
-
10
- console.log(chalk.cyan.bold(` 🤩 Testomat.io Reporter v${version}`));
11
-
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const cross_spawn_1 = require("cross-spawn");
8
+ const commander_1 = require("commander");
9
+ const picocolors_1 = __importDefault(require("picocolors"));
10
+ const client_js_1 = __importDefault(require("../client.js"));
11
+ const constants_js_1 = require("../constants.js");
12
+ const package_json_1 = require("../../package.json");
13
+ const config_js_1 = require("../config.js");
14
+ const dotenv_1 = __importDefault(require("dotenv"));
15
+ console.log(picocolors_1.default.cyan(picocolors_1.default.bold(` 🤩 Testomat.io Reporter v${package_json_1.version}`)));
16
+ const program = new commander_1.Command();
12
17
  program
13
- .option('-c, --command <cmd>', 'Test runner command')
14
- .option('--launch', 'Start a new run and return its ID')
15
- .option('--finish', 'Finish Run by its ID')
16
- .option('--env-file <envfile>', 'Load environment variables from env file')
17
- .option('--filter <filter>', 'Additional execution filter')
18
- .action(async opts => {
18
+ .option('-c, --command <cmd>', 'Test runner command')
19
+ .option('--launch', 'Start a new run and return its ID')
20
+ .option('--finish', 'Finish Run by its ID')
21
+ .option('--env-file <envfile>', 'Load environment variables from env file')
22
+ .option('--filter <filter>', 'Additional execution filter')
23
+ .action(async (opts) => {
19
24
  const { launch, finish, filter } = opts;
20
25
  let { command } = opts;
21
-
22
- if (opts.envFile) require('dotenv').config(opts.envFile); // eslint-disable-line
23
-
24
- const apiKey = process.env['INPUT_TESTOMATIO-KEY'] || config.TESTOMATIO;
26
+ if (opts.envFile)
27
+ dotenv_1.default.config({ path: opts.envFile });
28
+ const apiKey = process.env['INPUT_TESTOMATIO-KEY'] || config_js_1.config.TESTOMATIO;
25
29
  const title = process.env.TESTOMATIO_TITLE;
26
-
27
30
  if (launch) {
28
- console.log('Starting a new Run on Testomat.io...');
29
- const client = new TestomatClient({ apiKey });
30
-
31
- client.createRun().then(() => {
32
- console.log(process.env.runId);
33
- process.exit(0);
34
- });
35
- return;
31
+ console.log('Starting a new Run on Testomat.io...');
32
+ const client = new client_js_1.default({ apiKey });
33
+ client.createRun().then(() => {
34
+ console.log(process.env.runId);
35
+ process.exit(0);
36
+ });
37
+ return;
36
38
  }
37
-
38
39
  if (finish) {
39
- if (!process.env.TESTOMATIO_RUN) {
40
- console.log('TESTOMATIO_RUN environment variable must be set.');
41
- return process.exit(1);
42
- }
43
-
44
- console.log('Finishing Run on Testomat.io...');
45
-
46
- const client = new TestomatClient({ apiKey });
47
-
48
- client.updateRunStatus(STATUS.FINISHED).then(() => {
49
- console.log(chalk.yellow(`Run ${process.env.TESTOMATIO_RUN} was finished`));
50
- process.exit(0);
51
- });
52
- return;
40
+ // TODO: add error in case of TESTOMATIO environment variable is not set
41
+ // because command is fine in console, but actually (on testomat.io) run is not finished
42
+ if (!process.env.TESTOMATIO_RUN) {
43
+ console.log('TESTOMATIO_RUN environment variable must be set.');
44
+ return process.exit(1);
45
+ }
46
+ console.log('Finishing Run on Testomat.io...');
47
+ const client = new client_js_1.default({ apiKey });
48
+ // @ts-ignore
49
+ client.updateRunStatus(constants_js_1.STATUS.FINISHED).then(() => {
50
+ console.log(picocolors_1.default.yellow(`Run ${process.env.TESTOMATIO_RUN} was finished`));
51
+ process.exit(0);
52
+ });
53
+ return;
53
54
  }
54
-
55
55
  let exitCode = 0;
56
-
57
56
  if (!command.split) {
58
- process.exitCode = 255;
59
- console.log(APP_PREFIX, `No command provided. Use -c option to launch a test runner.`);
60
- return;
57
+ process.exitCode = 255;
58
+ console.log(constants_js_1.APP_PREFIX, `No command provided. Use -c option to launch a test runner.`);
59
+ return;
61
60
  }
62
-
63
- const client = new TestomatClient({ apiKey, title, parallel: true });
64
-
61
+ const client = new client_js_1.default({ apiKey, title, parallel: true });
65
62
  if (filter) {
66
- const [pipe, ...optsArray] = filter.split(':');
67
- const pipeOptions = optsArray.join(':');
68
-
69
- try {
70
- const tests = await client.prepareRun({ pipe, pipeOptions });
71
-
72
- if (!tests || tests.length === 0) {
73
- return;
63
+ const [pipe, ...optsArray] = filter.split(':');
64
+ const pipeOptions = optsArray.join(':');
65
+ try {
66
+ const tests = await client.prepareRun({ pipe, pipeOptions });
67
+ if (!tests || tests.length === 0) {
68
+ return;
69
+ }
70
+ const grep = ` --grep (${tests.join('|')})`;
71
+ command += grep;
72
+ }
73
+ catch (err) {
74
+ console.log(constants_js_1.APP_PREFIX, err);
74
75
  }
75
-
76
- const grep = ` --grep (${tests.join('|')})`;
77
- command += grep;
78
- } catch (err) {
79
- console.log(APP_PREFIX, err);
80
- }
81
76
  }
82
-
83
77
  const testCmds = command.split(' ');
84
- console.log(APP_PREFIX, `🚀 Running`, chalk.green(command));
85
-
78
+ console.log(constants_js_1.APP_PREFIX, `🚀 Running`, picocolors_1.default.green(command));
86
79
  if (!apiKey) {
87
- const cmd = spawn(testCmds[0], testCmds.slice(1), { stdio: 'inherit' });
88
-
89
- cmd.on('close', code => {
90
- console.log(APP_PREFIX, '⚠️ ', `Runner exited with ${chalk.bold(code)}, report is ignored`);
91
-
92
- if (code > exitCode) exitCode = code;
93
- process.exitCode = exitCode;
94
- });
95
-
96
- return;
80
+ const cmd = (0, cross_spawn_1.spawn)(testCmds[0], testCmds.slice(1), { stdio: 'inherit' });
81
+ cmd.on('close', code => {
82
+ console.log(constants_js_1.APP_PREFIX, '⚠️ ', `Runner exited with ${picocolors_1.default.bold(code)}, report is ignored`);
83
+ if (code > exitCode)
84
+ exitCode = code;
85
+ process.exitCode = exitCode;
86
+ });
87
+ return;
97
88
  }
98
-
99
89
  client.createRun().then(() => {
100
- const cmd = spawn(testCmds[0], testCmds.slice(1), { stdio: 'inherit' });
101
-
102
- cmd.on('close', code => {
103
- const emoji = code === 0 ? '🟢' : '🔴';
104
- console.log(APP_PREFIX, emoji, `Runner exited with ${chalk.bold(code)}`);
105
- const status = code === 0 ? 'passed' : 'failed';
106
- client.updateRunStatus(status, true);
107
-
108
- if (code > exitCode) exitCode = code;
109
- process.exitCode = exitCode;
110
- });
90
+ const cmd = (0, cross_spawn_1.spawn)(testCmds[0], testCmds.slice(1), { stdio: 'inherit' });
91
+ cmd.on('close', code => {
92
+ const emoji = code === 0 ? '🟢' : '🔴';
93
+ console.log(constants_js_1.APP_PREFIX, emoji, `Runner exited with ${picocolors_1.default.bold(code)}`);
94
+ const status = code === 0 ? 'passed' : 'failed';
95
+ client.updateRunStatus(status, true);
96
+ if (code > exitCode)
97
+ exitCode = code;
98
+ process.exitCode = exitCode;
99
+ });
111
100
  });
112
- });
113
-
101
+ });
114
102
  if (process.argv.length <= 2) {
115
- program.outputHelp();
103
+ program.outputHelp();
116
104
  }
117
-
118
105
  program.parse(process.argv);
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -1,87 +1,81 @@
1
1
  #!/usr/bin/env node
2
- const { program } = require('commander');
3
- const chalk = require('chalk');
4
- const debug = require('debug')('@testomatio/reporter:upload-cli');
5
- const TestomatClient = require('../client');
6
- const { APP_PREFIX } = require('../constants');
7
- const { version } = require('../../package.json');
8
- const config = require('../config');
9
- const { readLatestRunId } = require('../utils/utils');
10
-
11
- console.log(chalk.cyan.bold(` 🤩 Testomat.io Reporter v${version}`));
12
-
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const commander_1 = require("commander");
8
+ const picocolors_1 = __importDefault(require("picocolors"));
9
+ const debug_1 = __importDefault(require("debug"));
10
+ const client_js_1 = __importDefault(require("../client.js"));
11
+ const constants_js_1 = require("../constants.js");
12
+ const package_json_1 = require("../../package.json");
13
+ const config_js_1 = require("../config.js");
14
+ const utils_js_1 = require("../utils/utils.js");
15
+ const dotenv_1 = __importDefault(require("dotenv"));
16
+ const debug = (0, debug_1.default)('@testomatio/reporter:upload-cli');
17
+ console.log(picocolors_1.default.cyan(picocolors_1.default.bold(` 🤩 Testomat.io Reporter v${package_json_1.version}`)));
18
+ const program = new commander_1.Command();
13
19
  program
14
- .option('--env-file <envfile>', 'Load environment variables from env file')
15
- .option('--force', 'Re-upload artifacts even if they were uploaded before')
16
- .action(async opts => {
20
+ .option('--env-file <envfile>', 'Load environment variables from env file')
21
+ .option('--force', 'Re-upload artifacts even if they were uploaded before')
22
+ .action(async (opts) => {
17
23
  if (opts.envFile) {
18
- require('dotenv').config(opts.envFile); // eslint-disable-line
19
- } else {
20
- // try to load from env file
21
- require('dotenv').config(); // eslint-disable-line
24
+ dotenv_1.default.config({ path: opts.envFile });
22
25
  }
23
-
24
- const apiKey = config.TESTOMATIO;
26
+ else {
27
+ dotenv_1.default.config();
28
+ }
29
+ const apiKey = config_js_1.config.TESTOMATIO;
25
30
  process.env.TESTOMATIO_DISABLE_ARTIFACTS = '';
26
- const runId = process.env.TESTOMATIO_RUN || process.env.runId || readLatestRunId();
27
-
31
+ const runId = process.env.TESTOMATIO_RUN || process.env.runId || (0, utils_js_1.readLatestRunId)();
28
32
  if (!runId) {
29
- console.log('TESTOMATIO_RUN environment variable must be set or restored from a previous run.');
30
- return process.exit(1);
33
+ console.log('TESTOMATIO_RUN environment variable must be set or restored from a previous run.');
34
+ return process.exit(1);
31
35
  }
32
-
33
- const client = new TestomatClient({
34
- apiKey,
35
- runId,
36
- isBatchEnabled: false,
36
+ const client = new client_js_1.default({
37
+ apiKey,
38
+ runId,
39
+ isBatchEnabled: false,
37
40
  });
38
41
  let testruns = client.uploader.readUploadedFiles(process.env.TESTOMATIO_RUN);
39
-
40
42
  const numTotalArtifacts = testruns.length;
41
-
42
43
  debug('Found testruns:', testruns);
43
-
44
- if (!opts.force) testruns = testruns.filter(tr => !tr.uploaded);
45
-
44
+ if (!opts.force)
45
+ testruns = testruns.filter(tr => !tr.uploaded);
46
46
  if (!testruns.length) {
47
- console.log(APP_PREFIX, 'Total artifacts:', numTotalArtifacts);
48
- if (numTotalArtifacts) {
49
- console.log(APP_PREFIX, 'No new artifacts to upload');
50
- console.log(APP_PREFIX, 'To re-upload artifacts run this command with --force flag');
51
- }
52
- process.exit(0);
47
+ console.log(constants_js_1.APP_PREFIX, 'Total artifacts:', numTotalArtifacts);
48
+ if (numTotalArtifacts) {
49
+ console.log(constants_js_1.APP_PREFIX, 'No new artifacts to upload');
50
+ console.log(constants_js_1.APP_PREFIX, 'To re-upload artifacts run this command with --force flag');
51
+ }
52
+ process.exit(0);
53
53
  }
54
-
55
54
  const testrunsByRid = testruns.reduce((acc, { rid, file }) => {
56
- if (!acc[rid]) {
57
- acc[rid] = [];
58
- }
59
- if (!acc[rid].includes(file)) acc[rid].push(file);
60
- return acc;
55
+ if (!acc[rid]) {
56
+ acc[rid] = [];
57
+ }
58
+ if (!acc[rid].includes(file))
59
+ acc[rid].push(file);
60
+ return acc;
61
61
  }, {});
62
-
63
62
  // we need to obtain S3 credentials
64
63
  await client.createRun();
65
-
66
64
  client.uploader.checkEnabled();
67
65
  client.uploader.disableLogStorage();
68
-
69
66
  for (const rid in testrunsByRid) {
70
- const files = testrunsByRid[rid];
71
- await client.addTestRun(undefined, {
72
- rid,
73
- files,
74
- });
67
+ const files = testrunsByRid[rid];
68
+ await client.addTestRun(undefined, {
69
+ rid,
70
+ files,
71
+ });
75
72
  }
76
-
77
- console.log(APP_PREFIX, client.uploader.successfulUploads.length, 'artifacts uploaded');
73
+ console.log(constants_js_1.APP_PREFIX, client.uploader.successfulUploads.length, 'artifacts uploaded');
78
74
  if (client.uploader.failedUploads.length) {
79
- console.log(APP_PREFIX, client.uploader.failedUploads.length, 'artifacts failed to upload');
75
+ console.log(constants_js_1.APP_PREFIX, client.uploader.failedUploads.length, 'artifacts failed to upload');
80
76
  }
81
- });
82
-
77
+ });
83
78
  if (process.argv.length <= 1) {
84
- program.outputHelp();
79
+ program.outputHelp();
85
80
  }
86
-
87
81
  program.parse(process.argv);
@@ -0,0 +1,76 @@
1
+ export default Client;
2
+ export type TestData = import("../types/types.js").TestData;
3
+ export type PipeResult = import("../types/types.js").PipeResult;
4
+ /**
5
+ * @typedef {import('../types/types.js').TestData} TestData
6
+ * @typedef {import('../types/types.js').PipeResult} PipeResult
7
+ */
8
+ export class Client {
9
+ /**
10
+ * Create a Testomat client instance
11
+ * @returns
12
+ */
13
+ constructor(params?: {});
14
+ paramsForPipesFactory: {};
15
+ pipeStore: {};
16
+ runId: `${string}-${string}-${string}-${string}-${string}`;
17
+ queue: Promise<void>;
18
+ version: any;
19
+ executionList: Promise<void>;
20
+ uploader: S3Uploader;
21
+ /**
22
+ * Asynchronously prepares the execution list for running tests through various pipes.
23
+ * Each pipe in the client is checked for enablement,
24
+ * and if all pipes are disabled, the function returns a resolved Promise.
25
+ * Otherwise, it executes the `prepareRun` method for each enabled pipe and collects the results.
26
+ * The results are then filtered to remove any undefined values.
27
+ * If no valid results are found, the function returns undefined.
28
+ * Otherwise, it returns the first non-empty array from the filtered results.
29
+ *
30
+ * @param {Object} params - The options for preparing the test execution list.
31
+ * @param {string} params.pipe - Name of the executed pipe.
32
+ * @param {string} params.pipeOptions - Filter option.
33
+ * @returns {Promise<any>} - A Promise that resolves to an
34
+ * array containing the prepared execution list,
35
+ * or resolves to undefined if no valid results are found or if all pipes are disabled.
36
+ */
37
+ prepareRun(params: {
38
+ pipe: string;
39
+ pipeOptions: string;
40
+ }): Promise<any>;
41
+ pipes: any[];
42
+ /**
43
+ * Used to create a new Test run
44
+ *
45
+ * @returns {Promise<any>} - resolves to Run id which should be used to update / add test
46
+ */
47
+ createRun(params: any): Promise<any>;
48
+ /**
49
+ * Updates test status and its data
50
+ *
51
+ * @param {string|undefined} status
52
+ * @param {TestData} [testData]
53
+ * @returns {Promise<PipeResult[]>}
54
+ */
55
+ addTestRun(status: string | undefined, testData?: TestData): Promise<PipeResult[]>;
56
+ /**
57
+ *
58
+ * Updates the status of the current test run and finishes the run.
59
+ * @param {'passed' | 'failed' | 'skipped' | 'finished'} status - The status of the current test run.
60
+ * Must be one of "passed", "failed", or "finished"
61
+ * @param {boolean} [isParallel] - Whether the current test run was executed in parallel with other tests.
62
+ * @returns {Promise<any>} - A Promise that resolves when finishes the run.
63
+ */
64
+ updateRunStatus(status: "passed" | "failed" | "skipped" | "finished", isParallel?: boolean): Promise<any>;
65
+ /**
66
+ * Returns the formatted stack including the stack trace, steps, and logs.
67
+ * @returns {string}
68
+ */
69
+ formatLogs({ error, steps, logs }: {
70
+ error: any;
71
+ steps: any;
72
+ logs: any;
73
+ }): string;
74
+ formatError(error: any, message: any): string;
75
+ }
76
+ import { S3Uploader } from './uploader.js';