@testomatio/reporter 1.0.16 → 1.0.18-beta.1

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/Changelog.md ADDED
@@ -0,0 +1,359 @@
1
+ <!-- pending release updates -->
2
+ # 1.0.18
3
+
4
+ * Fixed stack traces for CodeceptJS
5
+
6
+ # 1.0.17
7
+
8
+ Renamed `TESTOMATIO_STACK_FILTER` to `TESTOMATIO_STACK_IGNORE`
9
+
10
+ # 1.0.16
11
+
12
+ * Addded [stack trace configuration](./docs/stacktrace.md) and documentation:
13
+
14
+ ```
15
+ TESTOMATIO_STACK_IGNORE="tests/support/**.js" <actual-run-command>
16
+ ```
17
+ * Jest: fixed reporting tests without a suite title
18
+
19
+ # 1.0.15
20
+
21
+ * Attach Run to Jira Issue via `TESTOMATIO_JIRA_ID` env variable:
22
+
23
+ ```
24
+ TESTOMATIO_JIRA_ID=TST-12 <actual run command>
25
+ ```
26
+
27
+ * Mocha - removed requirement of TESTOMATIO API Key
28
+
29
+ # 1.0.14
30
+
31
+ * Execute tests by tag names. Use this filter to select tests associated with specific tags.
32
+
33
+ ```bash
34
+ TESTOMATIO={API_KEY} npx start-test-run -c 'actual run command' --filter 'testomatio:tag-name=smoke'
35
+ ```
36
+
37
+ * more instruction you can find in docs/pipes/testomatio.md
38
+
39
+ # 1.0.13
40
+
41
+ * JUnit improvements
42
+ * Match test from source code by adding Test ID as a comment:
43
+
44
+ ```java
45
+ // @T8acca9eb
46
+ ```
47
+ * Match test from output by adding Test ID as output:
48
+
49
+ ```java
50
+ System.out.println("tid://@T8acca9eb");
51
+ ```
52
+ * Support for suite before and after output
53
+ * Improved support for artifacts
54
+
55
+ # 1.0.12
56
+
57
+ & Logger refactoring by @olexandr13 in #208
58
+ * fix undefined logs by @olexandr13 in #210
59
+
60
+ # 1.0.11
61
+
62
+ * fix steps duplication for codecept report by @olexandr13 in #209
63
+
64
+ # 1.0.10
65
+
66
+ * Added `TESTOMATIO_PUBLISH=1` variable to automatically publish run report
67
+
68
+ # 1.0.9
69
+
70
+ * Support XUnit format
71
+ * Improved support for parametrized Java tests
72
+
73
+ # 1.0.8
74
+
75
+ * Fixed `Can't read push of undefined` when logging steps
76
+
77
+ # 1.0.6
78
+
79
+ * Testomat.io. Auto-detect current build url and report it to Testomat.io. Manually url can be set with `BUILD_URL` variable:
80
+
81
+ ```
82
+ BUILD_URL=https://.... TESTOMATIO=apiKey <actual test command>
83
+ ```
84
+
85
+ # 1.0.5
86
+
87
+ * Fix "create tests" params processing for testomatio pipe
88
+
89
+ # 1.0.4
90
+
91
+ * Fixed parallel run
92
+
93
+ # 1.0.3
94
+
95
+ * Fixed reporting parallel runs
96
+
97
+ # 1.0.0
98
+
99
+
100
+ * Added [`TESTOMATIO_SHARED_RUN` option](https://github.com/testomatio/reporter/blob/master/docs/pipes.md#reporting-parallel-execution-to-to-same-run) to use a shared run for parallel executions
101
+ * Reworked [documentation](https://github.com/testomatio/reporter/tree/master#readme).
102
+ * Added an option to obtain [S3 configuration](https://github.com/testomatio/reporter/blob/master/docs/artifacts.md#configuration) from Testomat.io
103
+ * Introduced [pipes](https://github.com/testomatio/reporter/blob/master/docs/pipes.md):
104
+ * GitHub
105
+ * GitLab
106
+ * CSV Pipe
107
+
108
+
109
+ # 0.7.6
110
+
111
+ * Updated to use AWS S3 3.0 SDK for uploading
112
+
113
+ # 0.7.5
114
+
115
+ * Fixed reporting skipped tests in mocha
116
+
117
+ # 0.7.4
118
+
119
+ * Fixed parsing source code in JUnit files
120
+
121
+ # 0.7.3
122
+
123
+ * CodeceptJS: Upload all traces and videos from artifacts
124
+ * Fixed reporting skipped test in XML
125
+ * added `--timelimit` option to `report-xml` command line
126
+
127
+ # 0.7.2
128
+
129
+ * Fixed uploading non-existing file
130
+
131
+ # 0.7.1
132
+
133
+ * Support for NUnit XML v3 format
134
+
135
+ # 0.7.0
136
+
137
+ * Support for `@cucumber/cucumber` (>= 7.0) added
138
+ * Initial support for C# and NUnit
139
+
140
+ # 0.6.10
141
+
142
+ * Fixed uploading multilpe artifacts in Playwright
143
+
144
+ # 0.6.9
145
+
146
+ * Fixed pending tests reports for Cypress
147
+
148
+ # 0.6.8
149
+ # 0.6.7
150
+
151
+ * Pytest: fixed creating suites from reports
152
+
153
+ # 0.6.6
154
+
155
+ * JUnit reporter: prefer suite title over testcase classname in a report
156
+
157
+ # 0.6.5
158
+
159
+ * Fixed test statuses for runs in JUnit reporter
160
+
161
+ # 0.6.4
162
+
163
+ * Added `TESTOMATIO_PROCEED=1` param to not close current run
164
+ * Fixed priority of commands from `npx @testomatio/reporter`
165
+
166
+ # 0.6.3
167
+
168
+ * Fixed `npx start-test-run` to launch commands
169
+
170
+ # 0.6.2
171
+
172
+ * Added `--env-file` option to load env variables from env file
173
+
174
+ # 0.6.1
175
+
176
+ * Fixed creating RunGroup with JUnit reporter
177
+
178
+ # 0.6.0
179
+
180
+ * JUnit reporter support
181
+
182
+ # 0.5.10
183
+
184
+ * Fixed reporting Scenario Outline in Cypress-Cucumber
185
+ * Fixed error reports for Cypress when running in Chrome
186
+
187
+ # 0.5.9
188
+
189
+ * Added environment on Cypress report
190
+
191
+ # 0.5.8
192
+
193
+ * Fixed Cypress.io reporting
194
+
195
+ # 0.5.7
196
+
197
+ * Fixed webdriverio artifacts
198
+
199
+ # 0.5.6
200
+
201
+ * Unmark failed CodeceptJS tests as skipped
202
+
203
+ # 0.5.5
204
+
205
+ * Fixed `BeforeSuite` failures in CodeceptJS
206
+
207
+ # 0.5.4
208
+
209
+ Added `TESTOMATIO_CREATE=1` option to create unmatched tests on report
210
+
211
+ ```
212
+ TESTOMATIO_CREATE=1 TESTOMATIO=apiKey npx codeceptjs run
213
+ ```
214
+
215
+ # 0.5.3
216
+
217
+ * Fixed parsing suites
218
+
219
+ # 0.5.2
220
+
221
+ * Fixed multiple upload of artifacts in Cypress.io
222
+
223
+ # 0.5.1
224
+
225
+ * Fixed Cypress.io to report tests inside nested suites
226
+
227
+ # 0.5.0
228
+
229
+ * Added Cypress.io plugin
230
+ * Added artifacts upload to webdriverio
231
+
232
+ # 0.4.6
233
+
234
+ - Fixed CodeceptJS reporter to report tests failed in hooks
235
+
236
+ # 0.4.5
237
+
238
+ - Fixed "Total XX artifacts publicly uploaded to S3 bucket" when no S3 bucket is configured
239
+ - Improved S3 connection error messages
240
+
241
+ # 0.4.4
242
+
243
+ - Fixed returning 0 exit code when a process fails when running tests in parallel via `start-test-run`. Previously was using the last exit code returned by a process. Currently prefers the highest exit code that was returned by a process.
244
+
245
+ # 0.4.3
246
+
247
+ - Added `TESTOMATIO_DISABLE_ARTIFACTS` env variable to disable publishing artifacts.
248
+
249
+ # 0.4.2
250
+
251
+ - print version of reporter
252
+ - print number of uploaded artifacts
253
+ - print access mode for uploaded artifacts
254
+
255
+ # 0.4.1
256
+
257
+ Added `global.testomatioArtifacts = []` array which can be used to add arbitrary artifacts to a report.
258
+
259
+ ```js
260
+ // inside a running test:
261
+ global.testomatioArtifacts.push('file/to/upload.png');
262
+ ```
263
+
264
+ # 0.4.0
265
+
266
+ - Playwright: Introduced playwright/test support with screenshots and video artifacts
267
+
268
+ > Known issues: reporting using projects configured in Playwright does not work yet
269
+
270
+ - CodeceptJS: added video uploads
271
+
272
+ # 0.3.16
273
+
274
+ - CodeceptJS: fixed reporting tests with empty steps (on retry)
275
+
276
+ # 0.3.15
277
+
278
+ - Finish Run via API:
279
+
280
+ ```
281
+ TESTOMATIO={apiKey} TESTOMATIO_RUN={runId} npx @testomatio/reporter@latest --finish
282
+ ```
283
+
284
+ # 0.3.14
285
+
286
+ - Create an empty Run via API:
287
+
288
+ ```
289
+ TESTOMATIO={apiKey} npx @testomatio/reporter@latest --launch
290
+ ```
291
+
292
+ # 0.3.13
293
+
294
+ - Checking for a valid report URL
295
+ - Sending unlimited data on test report
296
+
297
+ # 0.3.12
298
+
299
+ - Fixed submitting arbitrary data on a test run
300
+ - Jest: fixed sending errors with stack traces
301
+ - Cypress: fixed sending reports
302
+
303
+ # 0.3.11
304
+
305
+ - Fixed circular JSON reference when submitting data to Testomatio
306
+
307
+ # 0.3.10
308
+
309
+ - Minor fixes
310
+
311
+ # 0.3.9
312
+
313
+ - Making all reporters to run without API key
314
+
315
+ # 0.3.8
316
+
317
+ - Fixed `npx start-test-run` to work with empty API keys
318
+
319
+ # 0.3.7
320
+
321
+ - Fixed release
322
+
323
+ # 0.3.6
324
+
325
+ - Update title and rungroup on start for scheduled runs.
326
+
327
+ # 0.3.5
328
+
329
+ - Added `TESTOMATIO_RUN` environment variable to pass id of a specific run to report
330
+
331
+ # 0.3.4
332
+
333
+ - Minor fixes
334
+
335
+ # 0.3.3
336
+
337
+ - [CodeceptJS] Fixed stack trace reporting
338
+ - [CodeceptJS] Fixed displaying of nested steps
339
+ - [CodeceptJS][mocha] Added assertion diff to report
340
+
341
+ # 0.3.2
342
+
343
+ - Fixed error message for S3 uploading
344
+
345
+ # 0.3.1
346
+
347
+ - [CodeceptJS] Better formatter for nested structures and BDD tests
348
+
349
+ # 0.3.0
350
+
351
+ - Added `TESTOMATIO_TITLE` env variable to set a name for Run
352
+ - Added `TESTOMATIO_RUNGROUP_TITLE` env variable to attach Run to RunGroup
353
+ - Added `TESTOMATIO_ENV` env variable to attach additional env values to report
354
+ - [CodeceptJS] **CodeceptJS v3 support**
355
+ - [CodeceptJS] Dropped support for CodeceptJS 2
356
+ - [CodeceptJS] Added support for before hooks
357
+ - [CodeceptJS] Log of steps
358
+ - [CodeceptJS] Upload screenshots of failed tests to S3
359
+ - [CodeceptJS] Updated to use with parallel execution
@@ -1,7 +1,7 @@
1
1
  const debug = require('debug')('@testomatio/reporter:adapter:codeceptjs');
2
2
  const chalk = require('chalk');
3
3
  const TestomatClient = require('../client');
4
- const { STATUS, APP_PREFIX, TESTOMAT_TMP_STORAGE } = require('../constants');
4
+ const { STATUS, APP_PREFIX, TESTOMAT_TMP_STORAGE_DIR } = require('../constants');
5
5
  const upload = require('../fileUploader');
6
6
  const { parseTest: getIdFromTestTitle, fileSystem } = require('../utils/utils');
7
7
 
@@ -56,7 +56,7 @@ function CodeceptReporter(config) {
56
56
  // Listening to events
57
57
  event.dispatcher.on(event.all.before, () => {
58
58
  // clear tmp dir
59
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
59
+ fileSystem.clearDir(TESTOMAT_TMP_STORAGE_DIR);
60
60
 
61
61
  recorder.add('Creating new run', () => client.createRun());
62
62
  videos = [];
@@ -147,9 +147,6 @@ function CodeceptReporter(config) {
147
147
  failedTests.push(id || title);
148
148
  let testId = parseTest(tags);
149
149
  const testObj = getTestAndMessage(title);
150
- if (error && error.stack && test.steps && test.steps.length) {
151
- error.stack = test.steps[test.steps.length - 1].line();
152
- }
153
150
 
154
151
  const files = [];
155
152
  if (artifacts.screenshot) files.push({ path: artifacts.screenshot, type: 'image/png' });
@@ -2,9 +2,9 @@
2
2
  const { Formatter, formatterHelpers } = require('@cucumber/cucumber');
3
3
  const chalk = require('chalk');
4
4
  const fs = require('fs');
5
- const { STATUS, TESTOMAT_TMP_STORAGE } = require('../../constants');
5
+ const { STATUS, TESTOMAT_TMP_STORAGE_DIR } = require('../../constants');
6
6
  const TestomatClient = require('../../client');
7
- const logger = require('../../logger');
7
+ const logger = require('../../storages/logger');
8
8
  const { parseTest, fileSystem } = require('../../utils/utils');
9
9
 
10
10
  const { GherkinDocumentParser, PickleParser } = formatterHelpers;
@@ -37,7 +37,7 @@ class CucumberReporter extends Formatter {
37
37
 
38
38
  parseEnvelope(envelope) {
39
39
  if (envelope.testRunStarted) {
40
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
40
+ fileSystem.clearDir(TESTOMAT_TMP_STORAGE_DIR);
41
41
  }
42
42
  if (envelope.testCaseStarted && this.client) {
43
43
  this.client.createRun();
@@ -2,7 +2,7 @@
2
2
  const { Formatter } = require('cucumber');
3
3
  const chalk = require('chalk');
4
4
  const { parseTest, fileSystem } = require('../../utils/utils');
5
- const { STATUS, TESTOMAT_TMP_STORAGE } = require('../../constants');
5
+ const { STATUS, TESTOMAT_TMP_STORAGE_DIR } = require('../../constants');
6
6
  const TestomatClient = require('../../client');
7
7
 
8
8
  const createTestomatFormatter = apiKey => {
@@ -97,7 +97,7 @@ const createTestomatFormatter = apiKey => {
97
97
 
98
98
  options.eventBroadcaster.on('gherkin-document', addDocument);
99
99
  options.eventBroadcaster.on('test-run-started', () => {
100
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
100
+ fileSystem.clearDir(TESTOMAT_TMP_STORAGE_DIR);
101
101
  this?.client?.createRun();
102
102
  });
103
103
  options.eventBroadcaster.on('test-case-finished', this.onTestCaseFinished.bind(this));
@@ -1,5 +1,5 @@
1
1
  const TestomatClient = require('../client');
2
- const { STATUS, TESTOMAT_TMP_STORAGE } = require('../constants');
2
+ const { STATUS, TESTOMAT_TMP_STORAGE_DIR } = require('../constants');
3
3
  const { parseTest, ansiRegExp, fileSystem } = require('../utils/utils');
4
4
 
5
5
  class JestReporter {
@@ -11,20 +11,9 @@ class JestReporter {
11
11
  this.client.createRun();
12
12
  }
13
13
 
14
- static getIdOfCurrentlyRunningTest() {
15
- if (!process.env.JEST_WORKER_ID) return null;
16
- try {
17
- // @ts-expect-error "expect" could only be defined inside Jest environement (forbidden to import it outside)
18
- // eslint-disable-next-line no-undef
19
- if (expect && expect?.getState()?.currentTestName) return parseTest(expect?.getState()?.currentTestName);
20
- } catch (e) {
21
- return null;
22
- }
23
- }
24
-
25
14
  onRunStart() {
26
15
  // clear tmp dir
27
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
16
+ fileSystem.clearDir(TESTOMAT_TMP_STORAGE_DIR);
28
17
  }
29
18
 
30
19
  onTestResult(test, testResult) {
@@ -72,9 +61,6 @@ class JestReporter {
72
61
  const { numFailedTests } = results;
73
62
  const status = numFailedTests === 0 ? STATUS.PASSED : STATUS.FAILED;
74
63
  this.client.updateRunStatus(status);
75
-
76
- // clear tmp dir
77
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
78
64
  }
79
65
  }
80
66
 
@@ -1,11 +1,9 @@
1
1
  // eslint-disable-next-line global-require, import/no-extraneous-dependencies
2
2
  const Mocha = require('mocha');
3
- const debug = require('debug')('@testomatio/reporter:adapter:mocha');
4
3
  const chalk = require('chalk');
5
4
  const TestomatClient = require('../client');
6
- const { STATUS, TESTOMAT_TMP_STORAGE } = require('../constants');
7
- const { parseTest, specificTestInfo, fileSystem } = require('../utils/utils');
8
- const ArtifactStorage = require('../_ArtifactStorageOld');
5
+ const { STATUS, TESTOMAT_TMP_STORAGE_DIR } = require('../constants');
6
+ const { parseTest, fileSystem } = require('../utils/utils');
9
7
 
10
8
  const { EVENT_RUN_BEGIN, EVENT_RUN_END, EVENT_TEST_FAIL, EVENT_TEST_PASS, EVENT_TEST_PENDING } =
11
9
  Mocha.Runner.constants;
@@ -15,7 +13,7 @@ function MochaReporter(runner, opts) {
15
13
  let passes = 0;
16
14
  let failures = 0;
17
15
  let skipped = 0;
18
- let artifactStore;
16
+ // let artifactStore;
19
17
 
20
18
  const apiKey = opts?.reporterOptions?.apiKey || process.env.TESTOMATIO;
21
19
 
@@ -24,13 +22,7 @@ function MochaReporter(runner, opts) {
24
22
  runner.on(EVENT_RUN_BEGIN, () => {
25
23
  client.createRun();
26
24
 
27
- const params = {
28
- toFile: true,
29
- };
30
-
31
- artifactStore = runner._workerReporter !== undefined ? new ArtifactStorage(params) : new ArtifactStorage();
32
-
33
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
25
+ fileSystem.clearDir(TESTOMAT_TMP_STORAGE_DIR);
34
26
  });
35
27
 
36
28
  runner.on(EVENT_TEST_PASS, async test => {
@@ -38,20 +30,11 @@ function MochaReporter(runner, opts) {
38
30
  console.log(chalk.bold.green('✔'), test.fullTitle());
39
31
  const testId = parseTest(test.title);
40
32
 
41
- const specificTest = specificTestInfo(test);
42
- const content = await artifactStore.artifactByTestName(specificTest);
43
-
44
- debug(`test=${specificTest} content = `, content);
45
-
46
- client.addTestRun(
47
- STATUS.PASSED,
48
- {
49
- test_id: testId,
50
- title: test.title,
51
- time: test.duration,
52
- },
53
- content,
54
- );
33
+ client.addTestRun(STATUS.PASSED, {
34
+ test_id: testId,
35
+ title: test.title,
36
+ time: test.duration,
37
+ });
55
38
  });
56
39
 
57
40
  runner.on(EVENT_TEST_PENDING, test => {
@@ -70,29 +53,18 @@ function MochaReporter(runner, opts) {
70
53
  console.log(chalk.bold.red('✖'), test.fullTitle(), chalk.gray(err.message));
71
54
  const testId = parseTest(test.title);
72
55
 
73
- const specificTest = specificTestInfo(test);
74
- const content = await artifactStore.artifactByTestName(specificTest);
75
-
76
- debug(`fail test=${specificTest} content = `, content);
77
-
78
- client.addTestRun(
79
- STATUS.FAILED,
80
- {
81
- error: err,
82
- test_id: testId,
83
- title: test.title,
84
- time: test.duration,
85
- },
86
- content,
87
- );
56
+ client.addTestRun(STATUS.FAILED, {
57
+ error: err,
58
+ test_id: testId,
59
+ title: test.title,
60
+ time: test.duration,
61
+ });
88
62
  });
89
63
 
90
64
  runner.on(EVENT_RUN_END, () => {
91
65
  const status = failures === 0 ? STATUS.PASSED : STATUS.FAILED;
92
66
  console.log(chalk.bold(status), `${passes} passed, ${failures} failed, ${skipped} skipped`);
93
67
  client.updateRunStatus(status);
94
-
95
- artifactStore.cleanup();
96
68
  });
97
69
  }
98
70
 
@@ -3,7 +3,7 @@ const crypto = require('crypto');
3
3
  const os = require('os');
4
4
  const path = require('path');
5
5
  const fs = require('fs');
6
- const { APP_PREFIX, STATUS: Status, TESTOMAT_TMP_STORAGE } = require('../constants');
6
+ const { APP_PREFIX, STATUS: Status, TESTOMAT_TMP_STORAGE_DIR } = require('../constants');
7
7
  const TestomatioClient = require('../client');
8
8
  const { isArtifactsEnabled } = require('../fileUploader');
9
9
  const { parseTest, fileSystem } = require('../utils/utils');
@@ -19,15 +19,17 @@ class PlaywrightReporter {
19
19
 
20
20
  onBegin(_config, suite) {
21
21
  // clean data storage
22
- fileSystem.clearDir(TESTOMAT_TMP_STORAGE.mainDir);
22
+ fileSystem.clearDir(TESTOMAT_TMP_STORAGE_DIR);
23
23
  if (!this.client) return;
24
24
  this.suite = suite;
25
25
  this.client.createRun();
26
26
  }
27
27
 
28
- // onTestBegin(test) {
29
- // const testId = parseTest(test.title);
30
- // }
28
+ /*
29
+ onTestBegin(test) {
30
+ // does not work; value is not to the storage context
31
+ global.testTitle = test.title;
32
+ } */
31
33
 
32
34
  onTestEnd(test, result) {
33
35
  if (!this.client) return;
@@ -44,23 +46,33 @@ class PlaywrightReporter {
44
46
  appendStep(step, steps);
45
47
  }
46
48
 
47
- const logs = `\n\n${chalk.bold('Logs:')}\n${chalk.red(result.stderr.join(''))}\n${result.stdout.join('')}`;
48
-
49
- const reportTestPromise = this.client.addTestRun(checkStatus(result.status), {
50
- error,
51
- test_id: testId,
52
- suite_title,
53
- title,
54
- steps: steps.join('\n'),
55
- time: duration,
56
- stack: logs,
57
- }).then(pipes => {
58
- testId = pipes?.filter(p => p.pipe.includes('Testomatio'))[0]?.result?.data?.test_id;
59
-
60
- this.uploads.push({
61
- testId, title, suite_title, files: result.attachments.filter((a) => a.body || a.path)
49
+ let logs = '';
50
+ if (result.stderr.length || result.stdout.length) {
51
+ logs = `\n\n${chalk.bold('Logs:')}\n${chalk.red(result.stderr.join(''))}\n${result.stdout.join('')}`;
52
+ }
53
+
54
+ const reportTestPromise = this.client
55
+ .addTestRun(checkStatus(result.status), {
56
+ error,
57
+ test_id: testId,
58
+ suite_title,
59
+ title,
60
+ steps: steps.join('\n'),
61
+ time: duration,
62
+ stack: logs,
63
+ })
64
+ .then(pipes => {
65
+ testId = pipes?.filter(p => p.pipe.includes('Testomatio'))[0]?.result?.data?.test_id;
66
+
67
+ this.uploads.push({
68
+ testId,
69
+ title,
70
+ suite_title,
71
+ files: result.attachments.filter(a => a.body || a.path),
72
+ });
73
+ // remove empty uploads
74
+ this.uploads = this.uploads.filter(upload => upload.files.length);
62
75
  });
63
- });
64
76
 
65
77
  reportTestPromises.push(reportTestPromise);
66
78
  }
@@ -53,6 +53,12 @@ program
53
53
 
54
54
  let exitCode = 0;
55
55
 
56
+ if (!command.split) {
57
+ process.exitCode = 255;
58
+ console.log(APP_PREFIX, `No command provided. Use -c option to launch a test runner.`);
59
+ return;
60
+ }
61
+
56
62
  const client = new TestomatClient({ apiKey, title, parallel: true });
57
63
 
58
64
  if(filter) {
@@ -74,12 +80,6 @@ program
74
80
  }
75
81
  }
76
82
 
77
- if (!command.split) {
78
- process.exitCode = 255;
79
- console.log(APP_PREFIX, `No command provided. Use -c option to launch a test runner.`);
80
- return;
81
- }
82
-
83
83
  const testCmds = command.split(' ');
84
84
  console.log(APP_PREFIX, `🚀 Running`, chalk.green(command));
85
85