@testomatio/reporter 1.0.4 → 1.0.6-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 CHANGED
@@ -1,5 +1,13 @@
1
1
  <!-- pending release updates -->
2
2
 
3
+ # 1.0.5
4
+
5
+ * Fix "create tests" params processing for testomatio pipe
6
+
7
+ # 1.0.4
8
+
9
+ * Fixed parallel run
10
+
3
11
  # 1.0.3
4
12
 
5
13
  * Fixed reporting parallel runs
@@ -38,7 +38,7 @@ class TestomatioPipe {
38
38
  // do not finish this run (for parallel testing)
39
39
  this.proceed = process.env.TESTOMATIO_PROCEED;
40
40
  this.runId = params.runId || process.env.runId;
41
- this.createNewTests = !!process.env.TESTOMATIO_CREATE;
41
+ this.createNewTests = params.createNewTests ?? !!process.env.TESTOMATIO_CREATE;
42
42
  this.hasUnmatchedTests = false;
43
43
 
44
44
  if (!isValidUrl(this.url.trim())) {
@@ -53,8 +53,24 @@ class TestomatioPipe {
53
53
  async createRun() {
54
54
  if (!this.isEnabled) return;
55
55
 
56
+ let buildUrl = process.env.BUILD_URL || process.env.CI_JOB_URL || process.env.CIRCLE_BUILD_URL;
57
+
58
+ // GitHub Actions Url
59
+ if (!buildUrl && process.env.GITHUB_RUN_ID) {
60
+ buildUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`
61
+ }
62
+
63
+ // Azure DevOps Url
64
+ if (!buildUrl && process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI) {
65
+ const collectionUri = process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI;
66
+ const project = process.env.SYSTEM_TEAMPROJECT;
67
+ const buildId = process.env.BUILD_BUILDID;
68
+ buildUrl = `${collectionUri}/${project}/_build/results?buildId=${buildId}`;
69
+ }
70
+
56
71
  const runParams = Object.fromEntries(
57
72
  Object.entries({
73
+ ci_build_url: buildUrl,
58
74
  parallel: this.parallel,
59
75
  api_key: this.apiKey.trim(),
60
76
  group_title: this.groupTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.0.4",
3
+ "version": "1.0.6-beta.1",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",