@autifyhq/autify-cli-integration-test 0.11.0 → 0.13.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/__recordings__/web%20test%20run%20--autify-connect-client%20--wait%20https%3A%2F%2Fapp.autify.com%2Fprojects%2F743%2Fscenarios%2F91437/polly-proxy_3343057686/recording.har +115 -74
- package/__recordings__/web%20test%20run%20--autify-connect-client%20--wait%20https%3A%2F%2Fapp.autify.com%2Fprojects%2F743%2Ftest_plans%2F169408/polly-proxy_3343057686/recording.har +562 -0
- package/__recordings__/web%20test%20run%20--wait%20https%3A%2F%2Fapp.autify.com%2Fprojects%2F743%2Ftest_plans%2F169408/polly-proxy_3343057686/recording.har +511 -0
- package/__recordings__/web%20test%20run%20https%3A%2F%2Fapp.autify.com%2Fprojects%2F743%2Ftest_plans%2F169408/polly-proxy_3343057686/recording.har +60 -0
- package/__snapshots__/golden/webTestRunAutifyConnectClient.test.js.snap +7 -6
- package/__snapshots__/golden/webTestRunTestPlan.test.js.snap +14 -0
- package/__snapshots__/golden/webTestRunTestPlanAutifyConnectClient.test.js.snap +40 -0
- package/__snapshots__/golden/webTestRunTestPlanWait.test.js.snap +27 -0
- package/dist/bin/autify-with-proxy.js +1 -1
- package/dist/commands.js +8 -1
- package/dist/test/golden/webTestRunTestPlan.test.d.ts +1 -0
- package/dist/test/golden/webTestRunTestPlan.test.js +5 -0
- package/dist/test/golden/webTestRunTestPlanAutifyConnectClient.test.d.ts +1 -0
- package/dist/test/golden/webTestRunTestPlanAutifyConnectClient.test.js +5 -0
- package/dist/test/golden/webTestRunTestPlanWait.test.d.ts +1 -0
- package/dist/test/golden/webTestRunTestPlanWait.test.js +5 -0
- package/dist/test/helpers/execAutifyCli.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`autify web test run https://app.autify.com/projects/0000/test_plans/0000 --wait --autify-connect-client 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"stderr": "",
|
|
6
|
+
"stdout": "[HPM] Proxy created: / -> https://app.autify.com
|
|
7
|
+
[HPM] Proxy created: / -> https://mobile-app.autify.com
|
|
8
|
+
[Autify Connect Manager] YYYY-MM-DDTHH:MM:SS.MMMZ info Ephemeral Access Point was created: autify-cli-acab582f-b894-4199-9a57-36a163242914
|
|
9
|
+
Starting Autify Connect Client...
|
|
10
|
+
[Autify Connect Manager] YYYY-MM-DDTHH:MM:SS.MMMZ info Starting Autify Connect Client (accessPoint: autify-cli-acab582f-b894-4199-9a57-36a163242914, debugServerPort: <random>, path: /path/to/autifyconnect, version: Autify Connect version v0.6.12, build 7464852)
|
|
11
|
+
Waiting until Autify Connect Client is ready...
|
|
12
|
+
[Autify Connect Client] YYYY-MM-DDTHH:MM:SS.MMMZ info start serving a debug server on http://localhost:<random>
|
|
13
|
+
[Autify Connect Client] YYYY-MM-DDTHH:MM:SS.MMMZ info Starting to establish a secure connection with the Autify connect server. Your session ID is \\"fake\\".
|
|
14
|
+
[Autify Connect Client] YYYY-MM-DDTHH:MM:SS.MMMZ info Successfully connected!
|
|
15
|
+
Autify Connect Client is ready!
|
|
16
|
+
✅ Successfully started: https://app.autify.com/projects/743/results/1235243 (Capability is configured by test plan)
|
|
17
|
+
🕐 Waiting for the test result: https://app.autify.com/projects/743/results/1235243
|
|
18
|
+
[HH:MM:SS] Waiting... (timeout: 300 s) [started]
|
|
19
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
20
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
21
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
22
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
23
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
24
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
25
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
26
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
27
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
28
|
+
[HH:MM:SS] → TestPlan: 👍 Passed , TestCases: 👍 Passed
|
|
29
|
+
[HH:MM:SS] Waiting... (timeout: 300 s) [completed]
|
|
30
|
+
✅ Test passed!: https://app.autify.com/projects/743/results/1235243
|
|
31
|
+
Waiting until Autify Connect Client exits...
|
|
32
|
+
[Autify Connect Client] YYYY-MM-DDTHH:MM:SS.MMMZ info Interrupt received.
|
|
33
|
+
[Autify Connect Client] YYYY-MM-DDTHH:MM:SS.MMMZ info Shutdown completed.
|
|
34
|
+
[Autify Connect Manager] YYYY-MM-DDTHH:MM:SS.MMMZ info Ephemeral Access Point was deleted: autify-cli-acab582f-b894-4199-9a57-36a163242914
|
|
35
|
+
[Autify Connect Manager] YYYY-MM-DDTHH:MM:SS.MMMZ info Autify Connect Client exited (code: 0, signal: null)
|
|
36
|
+
Autify Connect Client exited.
|
|
37
|
+
[HPM] server close signal received: closing proxy server
|
|
38
|
+
",
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`autify web test run https://app.autify.com/projects/0000/test_plans/0000 --wait 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"stderr": "",
|
|
6
|
+
"stdout": "[HPM] Proxy created: / -> https://app.autify.com
|
|
7
|
+
[HPM] Proxy created: / -> https://mobile-app.autify.com
|
|
8
|
+
✅ Successfully started: https://app.autify.com/projects/743/results/1222373 (Capability is configured by test plan)
|
|
9
|
+
🕐 Waiting for the test result: https://app.autify.com/projects/743/results/1222373
|
|
10
|
+
[HH:MM:SS] Waiting... (timeout: 300 s) [started]
|
|
11
|
+
[HH:MM:SS] → TestPlan: ⏳ Waiting, TestCases: ⏳ Waiting
|
|
12
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
13
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
14
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
15
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
16
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
17
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
18
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
19
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
20
|
+
[HH:MM:SS] → TestPlan: 🚗 Running, TestCases: 🚗 Running
|
|
21
|
+
[HH:MM:SS] → TestPlan: 👍 Passed , TestCases: 👍 Passed
|
|
22
|
+
[HH:MM:SS] Waiting... (timeout: 300 s) [completed]
|
|
23
|
+
✅ Test passed!: https://app.autify.com/projects/743/results/1222373
|
|
24
|
+
[HPM] server close signal received: closing proxy server
|
|
25
|
+
",
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
@@ -91,10 +91,10 @@ const autifyWithProxy = async (originalArgs) => {
|
|
|
91
91
|
const autify = getAutifyCli();
|
|
92
92
|
const proc = (0, node_child_process_1.spawn)(autify, args, {
|
|
93
93
|
env: {
|
|
94
|
+
AUTIFY_CONNECT_CLIENT_MODE: "fake",
|
|
94
95
|
...node_process_1.env,
|
|
95
96
|
AUTIFY_WEB_BASE_PATH: `http://localhost:${webProxy.port}/api/v1/`,
|
|
96
97
|
AUTIFY_MOBILE_BASE_PATH: `http://localhost:${mobileProxy.port}/api/v1/`,
|
|
97
|
-
AUTIFY_CONNECT_CLIENT_MODE: "fake",
|
|
98
98
|
},
|
|
99
99
|
stdio: "inherit",
|
|
100
100
|
shell: true,
|
package/dist/commands.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.normalizeCommand = exports.androidBuildPath = exports.iosBuildPath = voi
|
|
|
4
4
|
exports.iosBuildPath = "ios.app";
|
|
5
5
|
exports.androidBuildPath = "android.apk";
|
|
6
6
|
const webTestScenarioUrl = "https://app.autify.com/projects/743/scenarios/91437";
|
|
7
|
+
const webTestPlanUrl = "https://app.autify.com/projects/743/test_plans/169408";
|
|
7
8
|
const mobileAndroidTestPlanUrl = "https://mobile-app.autify.com/projects/4yyFEL/test_plans/Wptd97";
|
|
8
9
|
const mobileIosTestPlanUrl = "https://mobile-app.autify.com/projects/4yyFEL/test_plans/kYtlRR";
|
|
9
10
|
const mobileWorkspaceId = "4yyFEL";
|
|
@@ -38,6 +39,10 @@ const replaceWebTestScenarioUrl = (arg) => {
|
|
|
38
39
|
const regExp = /^https:\/\/app.autify.com\/projects\/\d+\/scenarios\/\d+\/?$/;
|
|
39
40
|
return regExp.test(arg) ? webTestScenarioUrl : arg;
|
|
40
41
|
};
|
|
42
|
+
const replaceWebTestPlanUrl = (arg) => {
|
|
43
|
+
const regExp = /^https:\/\/app.autify.com\/projects\/\d+\/test_plans\/\d+\/?$/;
|
|
44
|
+
return regExp.test(arg) ? webTestPlanUrl : arg;
|
|
45
|
+
};
|
|
41
46
|
const replaceMobileTetsPlanUrl = (arg, os) => {
|
|
42
47
|
const regExp = /^https:\/\/mobile-app.autify.com\/projects\/[^/]+\/test_plans\/[^/]+\/?$/;
|
|
43
48
|
if (regExp.test(arg)) {
|
|
@@ -64,7 +69,9 @@ const sortParameters = (args) => {
|
|
|
64
69
|
const isIos = (args) => args.some((a) => a.endsWith(".app"));
|
|
65
70
|
const replaceConstants = (args) => {
|
|
66
71
|
if (args[0] === "web") {
|
|
67
|
-
return args
|
|
72
|
+
return args
|
|
73
|
+
.map((a) => replaceWebTestScenarioUrl(a))
|
|
74
|
+
.map((a) => replaceWebTestPlanUrl(a));
|
|
68
75
|
}
|
|
69
76
|
if (args[0] === "mobile") {
|
|
70
77
|
return isIos(args)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable unicorn/filename-case */
|
|
4
|
+
const testAutifyCliSnapshot_1 = require("../helpers/testAutifyCliSnapshot");
|
|
5
|
+
(0, testAutifyCliSnapshot_1.testAutifyCliSnapshot)("web test run https://app.autify.com/projects/0000/test_plans/0000");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable unicorn/filename-case */
|
|
4
|
+
const testAutifyCliSnapshot_1 = require("../helpers/testAutifyCliSnapshot");
|
|
5
|
+
(0, testAutifyCliSnapshot_1.testAutifyCliSnapshot)("web test run https://app.autify.com/projects/0000/test_plans/0000 --wait --autify-connect-client");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable unicorn/filename-case */
|
|
4
|
+
const testAutifyCliSnapshot_1 = require("../helpers/testAutifyCliSnapshot");
|
|
5
|
+
(0, testAutifyCliSnapshot_1.testAutifyCliSnapshot)("web test run https://app.autify.com/projects/0000/test_plans/0000 --wait");
|
|
@@ -9,7 +9,7 @@ const strip_ansi_1 = tslib_1.__importDefault(require("strip-ansi"));
|
|
|
9
9
|
const node_process_1 = require("node:process");
|
|
10
10
|
const normalize = (stdout) => stdout
|
|
11
11
|
.replace(/\[\d{2}:\d{2}:\d{2}]/g, "[HH:MM:SS]")
|
|
12
|
-
.replace(/path: .+autifyconnect
|
|
12
|
+
.replace(/path: .+autifyconnect[^,]*,/g, "path: /path/to/autifyconnect,")
|
|
13
13
|
.replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z/g, "YYYY-MM-DDTHH:MM:SS.MMMZ")
|
|
14
14
|
.replace(/debugServerPort: \d+,/g, "debugServerPort: <random>,")
|
|
15
15
|
.replace(/debug server on http:\/\/localhost:\d+/g, "debug server on http://localhost:<random>")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autifyhq/autify-cli-integration-test",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Autify Command Line Interface (CLI) Integration Test",
|
|
5
5
|
"author": "Autify",
|
|
6
6
|
"bin": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/express": "^4.17.14",
|
|
40
40
|
"@types/jest": "^28.1.7",
|
|
41
|
-
"@types/node": "^16.11.
|
|
41
|
+
"@types/node": "^16.11.63",
|
|
42
42
|
"@types/which": "^2.0.1",
|
|
43
43
|
"shx": "^0.3.4",
|
|
44
44
|
"ts-node": "^10.9.1",
|
|
45
|
-
"typescript": "^4.
|
|
45
|
+
"typescript": "^4.8.4"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "shx rm -rf dist && tsc -b",
|