@testomatio/reporter 2.0.1-beta.5-timestamp → 2.0.1-beta.6

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 (149) hide show
  1. package/README.md +1 -0
  2. package/lib/adapter/codecept.d.ts +2 -0
  3. package/lib/adapter/codecept.js +293 -335
  4. package/lib/adapter/cucumber/current.d.ts +14 -0
  5. package/lib/adapter/cucumber/current.js +195 -203
  6. package/lib/adapter/cucumber/legacy.d.ts +0 -0
  7. package/lib/adapter/cucumber/legacy.js +130 -155
  8. package/lib/adapter/cucumber.d.ts +2 -0
  9. package/lib/adapter/cucumber.js +5 -16
  10. package/lib/adapter/cypress-plugin/index.d.ts +2 -0
  11. package/lib/adapter/cypress-plugin/index.js +91 -105
  12. package/lib/adapter/jasmine.d.ts +11 -0
  13. package/lib/adapter/jasmine.js +54 -53
  14. package/lib/adapter/jest.d.ts +13 -0
  15. package/lib/adapter/jest.js +97 -99
  16. package/lib/adapter/mocha.d.ts +2 -0
  17. package/lib/adapter/mocha.js +112 -141
  18. package/lib/adapter/nightwatch.d.ts +4 -0
  19. package/lib/adapter/nightwatch.js +80 -0
  20. package/lib/adapter/playwright.d.ts +14 -0
  21. package/lib/adapter/playwright.js +199 -231
  22. package/lib/adapter/vitest.d.ts +35 -0
  23. package/lib/adapter/vitest.js +150 -149
  24. package/lib/adapter/webdriver.d.ts +24 -0
  25. package/lib/adapter/webdriver.js +144 -121
  26. package/lib/bin/cli.d.ts +2 -0
  27. package/lib/bin/cli.js +229 -211
  28. package/lib/bin/reportXml.d.ts +2 -0
  29. package/lib/bin/reportXml.js +51 -52
  30. package/lib/bin/startTest.d.ts +2 -0
  31. package/lib/bin/startTest.js +83 -95
  32. package/lib/bin/uploadArtifacts.d.ts +2 -0
  33. package/lib/bin/uploadArtifacts.js +56 -61
  34. package/lib/client.d.ts +76 -0
  35. package/lib/client.js +429 -465
  36. package/lib/config.d.ts +1 -0
  37. package/lib/config.js +18 -23
  38. package/lib/constants.d.ts +25 -0
  39. package/lib/constants.js +50 -44
  40. package/lib/data-storage.d.ts +34 -0
  41. package/lib/data-storage.js +216 -188
  42. package/lib/junit-adapter/adapter.d.ts +9 -0
  43. package/lib/junit-adapter/adapter.js +17 -20
  44. package/lib/junit-adapter/csharp.d.ts +5 -0
  45. package/lib/junit-adapter/csharp.js +28 -14
  46. package/lib/junit-adapter/index.d.ts +3 -0
  47. package/lib/junit-adapter/index.js +27 -25
  48. package/lib/junit-adapter/java.d.ts +5 -0
  49. package/lib/junit-adapter/java.js +41 -53
  50. package/lib/junit-adapter/javascript.d.ts +4 -0
  51. package/lib/junit-adapter/javascript.js +30 -27
  52. package/lib/junit-adapter/python.d.ts +5 -0
  53. package/lib/junit-adapter/python.js +38 -37
  54. package/lib/junit-adapter/ruby.d.ts +4 -0
  55. package/lib/junit-adapter/ruby.js +11 -8
  56. package/lib/output.d.ts +11 -0
  57. package/lib/output.js +44 -52
  58. package/lib/package.json +3 -0
  59. package/lib/pipe/bitbucket.d.ts +25 -0
  60. package/lib/pipe/bitbucket.js +223 -230
  61. package/lib/pipe/csv.d.ts +47 -0
  62. package/lib/pipe/csv.js +113 -126
  63. package/lib/pipe/debug.d.ts +29 -0
  64. package/lib/pipe/debug.js +125 -99
  65. package/lib/pipe/github.d.ts +30 -0
  66. package/lib/pipe/github.js +218 -213
  67. package/lib/pipe/gitlab.d.ts +25 -0
  68. package/lib/pipe/gitlab.js +183 -206
  69. package/lib/pipe/html.d.ts +35 -0
  70. package/lib/pipe/html.js +258 -321
  71. package/lib/pipe/index.d.ts +1 -0
  72. package/lib/pipe/index.js +94 -66
  73. package/lib/pipe/testomatio.d.ts +71 -0
  74. package/lib/pipe/testomatio.js +429 -474
  75. package/lib/replay.d.ts +31 -0
  76. package/lib/replay.js +255 -0
  77. package/lib/reporter-functions.d.ts +34 -0
  78. package/lib/reporter-functions.js +28 -26
  79. package/lib/reporter.d.ts +232 -0
  80. package/lib/reporter.js +34 -29
  81. package/lib/services/artifacts.d.ts +33 -0
  82. package/lib/services/artifacts.js +55 -51
  83. package/lib/services/index.d.ts +9 -0
  84. package/lib/services/index.js +14 -12
  85. package/lib/services/key-values.d.ts +27 -0
  86. package/lib/services/key-values.js +56 -53
  87. package/lib/services/logger.d.ts +64 -0
  88. package/lib/services/logger.js +226 -245
  89. package/lib/template/testomatio.hbs +1026 -1366
  90. package/lib/uploader.d.ts +60 -0
  91. package/lib/uploader.js +295 -364
  92. package/lib/utils/pipe_utils.d.ts +41 -0
  93. package/lib/utils/pipe_utils.js +89 -85
  94. package/lib/utils/utils.d.ts +54 -0
  95. package/lib/utils/utils.js +398 -307
  96. package/lib/xmlReader.d.ts +92 -0
  97. package/lib/xmlReader.js +525 -532
  98. package/package.json +64 -21
  99. package/src/adapter/codecept.js +373 -0
  100. package/src/adapter/cucumber/current.js +228 -0
  101. package/src/adapter/cucumber/legacy.js +158 -0
  102. package/src/adapter/cucumber.js +4 -0
  103. package/src/adapter/cypress-plugin/index.js +110 -0
  104. package/src/adapter/jasmine.js +60 -0
  105. package/src/adapter/jest.js +107 -0
  106. package/src/adapter/mocha.cjs +2 -0
  107. package/src/adapter/mocha.js +156 -0
  108. package/src/adapter/nightwatch.js +88 -0
  109. package/src/adapter/playwright.js +254 -0
  110. package/src/adapter/vitest.js +183 -0
  111. package/src/adapter/webdriver.js +142 -0
  112. package/src/bin/cli.js +348 -0
  113. package/src/bin/reportXml.js +77 -0
  114. package/src/bin/startTest.js +124 -0
  115. package/src/bin/uploadArtifacts.js +91 -0
  116. package/src/client.js +515 -0
  117. package/src/config.js +30 -0
  118. package/src/constants.js +53 -0
  119. package/src/data-storage.js +204 -0
  120. package/src/junit-adapter/adapter.js +23 -0
  121. package/src/junit-adapter/csharp.js +28 -0
  122. package/src/junit-adapter/index.js +28 -0
  123. package/src/junit-adapter/java.js +58 -0
  124. package/src/junit-adapter/javascript.js +31 -0
  125. package/src/junit-adapter/python.js +42 -0
  126. package/src/junit-adapter/ruby.js +10 -0
  127. package/src/output.js +57 -0
  128. package/src/pipe/bitbucket.js +252 -0
  129. package/src/pipe/csv.js +140 -0
  130. package/src/pipe/debug.js +125 -0
  131. package/src/pipe/github.js +232 -0
  132. package/src/pipe/gitlab.js +247 -0
  133. package/src/pipe/html.js +373 -0
  134. package/src/pipe/index.js +71 -0
  135. package/src/pipe/testomatio.js +504 -0
  136. package/src/replay.js +262 -0
  137. package/src/reporter-functions.js +55 -0
  138. package/src/reporter.cjs_decprecated +21 -0
  139. package/src/reporter.js +33 -0
  140. package/src/services/artifacts.js +59 -0
  141. package/src/services/index.js +13 -0
  142. package/src/services/key-values.js +59 -0
  143. package/src/services/logger.js +315 -0
  144. package/src/template/emptyData.svg +23 -0
  145. package/src/template/testomatio.hbs +1081 -0
  146. package/src/uploader.js +376 -0
  147. package/src/utils/pipe_utils.js +119 -0
  148. package/src/utils/utils.js +416 -0
  149. package/src/xmlReader.js +614 -0
@@ -1,118 +1,106 @@
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 utils_js_1 = require("../utils/utils.js");
13
+ const config_js_1 = require("../config.js");
14
+ const dotenv_1 = __importDefault(require("dotenv"));
15
+ const version = (0, utils_js_1.getPackageVersion)();
16
+ console.log(picocolors_1.default.cyan(picocolors_1.default.bold(` 🤩 Testomat.io Reporter v${version}`)));
17
+ const program = new commander_1.Command();
12
18
  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 => {
19
+ .option('-c, --command <cmd>', 'Test runner command')
20
+ .option('--launch', 'Start a new run and return its ID')
21
+ .option('--finish', 'Finish Run by its ID')
22
+ .option('--env-file <envfile>', 'Load environment variables from env file')
23
+ .option('--filter <filter>', 'Additional execution filter')
24
+ .action(async (opts) => {
19
25
  const { launch, finish, filter } = opts;
20
26
  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;
27
+ if (opts.envFile)
28
+ dotenv_1.default.config({ path: opts.envFile });
29
+ const apiKey = process.env['INPUT_TESTOMATIO-KEY'] || config_js_1.config.TESTOMATIO;
25
30
  const title = process.env.TESTOMATIO_TITLE;
26
-
27
31
  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;
32
+ console.log('Starting a new Run on Testomat.io...');
33
+ const client = new client_js_1.default({ apiKey });
34
+ client.createRun().then(() => {
35
+ console.log(process.env.runId);
36
+ process.exit(0);
37
+ });
38
+ return;
36
39
  }
37
-
38
40
  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;
41
+ // TODO: add error in case of TESTOMATIO environment variable is not set
42
+ // because command is fine in console, but actually (on testomat.io) run is not finished
43
+ if (!process.env.TESTOMATIO_RUN) {
44
+ console.log('TESTOMATIO_RUN environment variable must be set.');
45
+ return process.exit(1);
46
+ }
47
+ console.log('Finishing Run on Testomat.io...');
48
+ const client = new client_js_1.default({ apiKey });
49
+ // @ts-ignore
50
+ client.updateRunStatus(constants_js_1.STATUS.FINISHED).then(() => {
51
+ console.log(picocolors_1.default.yellow(`Run ${process.env.TESTOMATIO_RUN} was finished`));
52
+ process.exit(0);
53
+ });
54
+ return;
53
55
  }
54
-
55
56
  let exitCode = 0;
56
-
57
57
  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;
58
+ process.exitCode = 255;
59
+ console.log(constants_js_1.APP_PREFIX, `No command provided. Use -c option to launch a test runner.`);
60
+ return;
61
61
  }
62
-
63
- const client = new TestomatClient({ apiKey, title, parallel: true });
64
-
62
+ const client = new client_js_1.default({ apiKey, title, parallel: true });
65
63
  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;
64
+ const [pipe, ...optsArray] = filter.split(':');
65
+ const pipeOptions = optsArray.join(':');
66
+ try {
67
+ const tests = await client.prepareRun({ pipe, pipeOptions });
68
+ if (!tests || tests.length === 0) {
69
+ return;
70
+ }
71
+ const grep = ` --grep (${tests.join('|')})`;
72
+ command += grep;
73
+ }
74
+ catch (err) {
75
+ console.log(constants_js_1.APP_PREFIX, err);
74
76
  }
75
-
76
- const grep = ` --grep (${tests.join('|')})`;
77
- command += grep;
78
- } catch (err) {
79
- console.log(APP_PREFIX, err);
80
- }
81
77
  }
82
-
83
78
  const testCmds = command.split(' ');
84
- console.log(APP_PREFIX, `🚀 Running`, chalk.green(command));
85
-
79
+ console.log(constants_js_1.APP_PREFIX, `🚀 Running`, picocolors_1.default.green(command));
86
80
  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;
81
+ const cmd = (0, cross_spawn_1.spawn)(testCmds[0], testCmds.slice(1), { stdio: 'inherit' });
82
+ cmd.on('close', code => {
83
+ console.log(constants_js_1.APP_PREFIX, '⚠️ ', `Runner exited with ${picocolors_1.default.bold(code)}, report is ignored`);
84
+ if (code > exitCode)
85
+ exitCode = code;
86
+ process.exitCode = exitCode;
87
+ });
88
+ return;
97
89
  }
98
-
99
90
  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
- });
91
+ const cmd = (0, cross_spawn_1.spawn)(testCmds[0], testCmds.slice(1), { stdio: 'inherit' });
92
+ cmd.on('close', code => {
93
+ const emoji = code === 0 ? '🟢' : '🔴';
94
+ console.log(constants_js_1.APP_PREFIX, emoji, `Runner exited with ${picocolors_1.default.bold(code)}`);
95
+ const status = code === 0 ? 'passed' : 'failed';
96
+ client.updateRunStatus(status, true);
97
+ if (code > exitCode)
98
+ exitCode = code;
99
+ process.exitCode = exitCode;
100
+ });
111
101
  });
112
- });
113
-
102
+ });
114
103
  if (process.argv.length <= 2) {
115
- program.outputHelp();
104
+ program.outputHelp();
116
105
  }
117
-
118
106
  program.parse(process.argv);
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -1,87 +1,82 @@
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 utils_js_1 = require("../utils/utils.js");
13
+ const config_js_1 = require("../config.js");
14
+ const utils_js_2 = require("../utils/utils.js");
15
+ const dotenv_1 = __importDefault(require("dotenv"));
16
+ const debug = (0, debug_1.default)('@testomatio/reporter:upload-cli');
17
+ const version = (0, utils_js_1.getPackageVersion)();
18
+ console.log(picocolors_1.default.cyan(picocolors_1.default.bold(` 🤩 Testomat.io Reporter v${version}`)));
19
+ const program = new commander_1.Command();
13
20
  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 => {
21
+ .option('--env-file <envfile>', 'Load environment variables from env file')
22
+ .option('--force', 'Re-upload artifacts even if they were uploaded before')
23
+ .action(async (opts) => {
17
24
  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
25
+ dotenv_1.default.config({ path: opts.envFile });
22
26
  }
23
-
24
- const apiKey = config.TESTOMATIO;
27
+ else {
28
+ dotenv_1.default.config();
29
+ }
30
+ const apiKey = config_js_1.config.TESTOMATIO;
25
31
  process.env.TESTOMATIO_DISABLE_ARTIFACTS = '';
26
- const runId = process.env.TESTOMATIO_RUN || process.env.runId || readLatestRunId();
27
-
32
+ const runId = process.env.TESTOMATIO_RUN || process.env.runId || (0, utils_js_2.readLatestRunId)();
28
33
  if (!runId) {
29
- console.log('TESTOMATIO_RUN environment variable must be set or restored from a previous run.');
30
- return process.exit(1);
34
+ console.log('TESTOMATIO_RUN environment variable must be set or restored from a previous run.');
35
+ return process.exit(1);
31
36
  }
32
-
33
- const client = new TestomatClient({
34
- apiKey,
35
- runId,
36
- isBatchEnabled: false,
37
+ const client = new client_js_1.default({
38
+ apiKey,
39
+ runId,
40
+ isBatchEnabled: false,
37
41
  });
38
42
  let testruns = client.uploader.readUploadedFiles(process.env.TESTOMATIO_RUN);
39
-
40
43
  const numTotalArtifacts = testruns.length;
41
-
42
44
  debug('Found testruns:', testruns);
43
-
44
- if (!opts.force) testruns = testruns.filter(tr => !tr.uploaded);
45
-
45
+ if (!opts.force)
46
+ testruns = testruns.filter(tr => !tr.uploaded);
46
47
  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);
48
+ console.log(constants_js_1.APP_PREFIX, 'Total artifacts:', numTotalArtifacts);
49
+ if (numTotalArtifacts) {
50
+ console.log(constants_js_1.APP_PREFIX, 'No new artifacts to upload');
51
+ console.log(constants_js_1.APP_PREFIX, 'To re-upload artifacts run this command with --force flag');
52
+ }
53
+ process.exit(0);
53
54
  }
54
-
55
55
  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;
56
+ if (!acc[rid]) {
57
+ acc[rid] = [];
58
+ }
59
+ if (!acc[rid].includes(file))
60
+ acc[rid].push(file);
61
+ return acc;
61
62
  }, {});
62
-
63
63
  // we need to obtain S3 credentials
64
64
  await client.createRun();
65
-
66
65
  client.uploader.checkEnabled();
67
66
  client.uploader.disableLogStorage();
68
-
69
67
  for (const rid in testrunsByRid) {
70
- const files = testrunsByRid[rid];
71
- await client.addTestRun(undefined, {
72
- rid,
73
- files,
74
- });
68
+ const files = testrunsByRid[rid];
69
+ await client.addTestRun(undefined, {
70
+ rid,
71
+ files,
72
+ });
75
73
  }
76
-
77
- console.log(APP_PREFIX, client.uploader.successfulUploads.length, 'artifacts uploaded');
74
+ console.log(constants_js_1.APP_PREFIX, client.uploader.successfulUploads.length, 'artifacts uploaded');
78
75
  if (client.uploader.failedUploads.length) {
79
- console.log(APP_PREFIX, client.uploader.failedUploads.length, 'artifacts failed to upload');
76
+ console.log(constants_js_1.APP_PREFIX, client.uploader.failedUploads.length, 'artifacts failed to upload');
80
77
  }
81
- });
82
-
78
+ });
83
79
  if (process.argv.length <= 1) {
84
- program.outputHelp();
80
+ program.outputHelp();
85
81
  }
86
-
87
82
  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';