@testim/testim-cli 3.193.0 → 3.197.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/README.md +1 -1
- package/cli/onExit.js +12 -1
- package/cli.js +5 -1
- package/codim/codim-npm-package/index.ts +1 -0
- package/commons/constants.js +0 -25
- package/commons/featureFlags.js +2 -0
- package/commons/socket/testResultService.js +4 -14
- package/commons/testimAnalytics.js +0 -1
- package/commons/testimDesiredCapabilitiesBuilder.js +0 -95
- package/commons/testimServicesApi.js +10 -80
- package/executionQueue.js +7 -4
- package/npm-shrinkwrap.json +956 -520
- package/package.json +3 -1
- package/player/chromeLauncherTestPlayer.js +5 -2
- package/player/stepActions/apiStepAction.js +1 -0
- package/player/stepActions/baseJsStepAction.js +5 -1
- package/player/stepActions/pixelValidationStepAction.js +28 -0
- package/player/stepActions/salesforceAutoLoginStepAction.js +39 -0
- package/player/stepActions/scripts/focusElement.js +5 -3
- package/player/stepActions/stepActionRegistrar.js +5 -47
- package/player/utils/eyeSdkService.js +230 -0
- package/reports/consoleReporter.js +0 -20
- package/reports/reporter.js +0 -21
- package/runOptions.js +13 -89
- package/runner.js +9 -46
- package/runners/{strategies/LocalStrategy.js → ParallelWorkerManager.js} +60 -66
- package/runners/TestPlanRunner.js +286 -67
- package/runners/runnerUtils.js +73 -0
- package/{runners/strategies/BaseStrategy.js → services/analyticsService.js} +41 -28
- package/services/gridService.js +24 -16
- package/services/gridService.test.js +21 -21
- package/services/lambdatestService.js +1 -1
- package/testRunHandler.js +1 -1
- package/testRunStatus.js +30 -20
- package/utils.js +5 -5
- package/workers/BaseWorker.js +38 -39
- package/workers/BaseWorker.test.js +1 -1
- package/workers/WorkerExtensionSingleBrowser.js +6 -3
- package/commons/apkUploader/apkUploader.js +0 -46
- package/commons/apkUploader/apkUploaderFactory.js +0 -68
- package/commons/apkUploader/deviceFarmApkUploader.js +0 -41
- package/commons/apkUploader/saucelabsApkUploader.js +0 -36
- package/commons/apkUploader/testObjectApkUploader.js +0 -34
- package/player/mobile/mobileTestPlayer.js +0 -80
- package/player/mobile/mobileWebDriver.js +0 -155
- package/player/mobile/services/frameLocatorMock.js +0 -18
- package/player/mobile/services/mobilePortSelector.js +0 -22
- package/player/mobile/services/mobileTabService.js +0 -241
- package/player/mobile/utils/mobileScreenshotUtils.js +0 -46
- package/player/mobile/utils/mobileWindowUtils.js +0 -84
- package/player/stepActions/mobile/android/androidLocateStepAction.js +0 -122
- package/player/stepActions/mobile/android/androidLongClickStepAction.js +0 -12
- package/player/stepActions/mobile/android/androidScrollStepAction.js +0 -134
- package/player/stepActions/mobile/android/androidSpecialKeyStepAction.js +0 -22
- package/player/stepActions/mobile/android/androidSwipeStepAction.js +0 -32
- package/player/stepActions/mobile/androidGlobalActionStepAction.js +0 -12
- package/player/stepActions/mobile/androidTapStepAction.js +0 -19
- package/player/stepActions/mobile/androidTextChangeStepAction.js +0 -23
- package/player/stepActions/mobile/ios/iosLocateStepAction.js +0 -124
- package/player/stepActions/mobile/ios/iosScrollStepAction.js +0 -76
- package/runners/AnonymousTestPlanRunner.js +0 -106
- package/runners/BaseRunner.js +0 -42
- package/runners/BaseTestPlanRunner.js +0 -194
- package/runners/DeviceFarmRemoteRunner.js +0 -50
- package/runners/SchedulerRemoteRunner.js +0 -47
- package/runners/strategies/DeviceFarmStrategy.js +0 -195
- package/runners/strategies/LocalDeviceFarmStrategy.js +0 -12
- package/runners/strategies/LocalTestStrategy.js +0 -14
- package/runners/strategies/Strategy.js +0 -17
- package/workers/WorkerAppium.js +0 -70
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const LocalDeviceFarmStrategy = require('./LocalDeviceFarmStrategy');
|
|
2
|
-
const LocalTestStrategy = require('./LocalTestStrategy');
|
|
3
|
-
const DeviceFarmStrategy = require('./DeviceFarmStrategy');
|
|
4
|
-
const {CLI_MODE} = require('../../commons/constants');
|
|
5
|
-
|
|
6
|
-
module.exports = (options, customExtensionLocalLocation) => {
|
|
7
|
-
const {projectData, gridData, mode} = options;
|
|
8
|
-
if (["android", "ios"].includes(projectData.type) && gridData.type === "testimMobile") {
|
|
9
|
-
options.mode = CLI_MODE.APPIUM;
|
|
10
|
-
return new DeviceFarmStrategy();
|
|
11
|
-
}
|
|
12
|
-
if (["android", "ios"].includes(projectData.type) && mode === CLI_MODE.DEVICE_FARM_APPIUM) {
|
|
13
|
-
return new LocalDeviceFarmStrategy();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return new LocalTestStrategy(customExtensionLocalLocation);
|
|
17
|
-
};
|
package/workers/WorkerAppium.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const {CLI_MODE} = require('../commons/constants');
|
|
4
|
-
const BaseWorker = require('./BaseWorker');
|
|
5
|
-
const {timeoutMessages} = require('../commons/constants');
|
|
6
|
-
const logger = require('../commons/logger').getLogger("worker-selenium");
|
|
7
|
-
const Promise = require('bluebird');
|
|
8
|
-
const exec = Promise.promisify(require('child_process').exec);
|
|
9
|
-
const reporter = require("../reports/reporter");
|
|
10
|
-
const MobileTestPlayer = require('../player/mobile/mobileTestPlayer');
|
|
11
|
-
const { manifestVersion } = require('../commons/getSessionPlayerRequire');
|
|
12
|
-
|
|
13
|
-
class WorkerAppium extends BaseWorker {
|
|
14
|
-
initPlayer(testRunHandler) {
|
|
15
|
-
const { projectData } = this.options;
|
|
16
|
-
return new MobileTestPlayer(this.id, testRunHandler.getRunParams(), projectData.type);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async getBrowserOnce(testRunHandler, customExtensionLocalLocation, player, gridInfo) {
|
|
20
|
-
reporter.onGetSession(this.id, this.testName, testRunHandler.getRunMode());
|
|
21
|
-
player.clearSessionTabs();
|
|
22
|
-
const { driver } = player;
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
await driver.init(this.options, gridInfo, testRunHandler.getNativeAppData(), this.testName, this.testResultId);
|
|
26
|
-
return player.addTab();
|
|
27
|
-
} catch (err) {
|
|
28
|
-
logger.error(`failed to get device/app (message=${err.message})`, { err });
|
|
29
|
-
throw err;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
runTestCleanup() {
|
|
34
|
-
const { mode } = this.options;
|
|
35
|
-
|
|
36
|
-
if(mode === CLI_MODE.DEVICE_FARM_APPIUM) {
|
|
37
|
-
return exec("adb shell pm clear $DEVICEFARM_APP_NAME");
|
|
38
|
-
}
|
|
39
|
-
return Promise.resolve();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
runTestOnce(testRunHandler, player) {
|
|
43
|
-
const version = manifestVersion || "runner";
|
|
44
|
-
let that = this;
|
|
45
|
-
|
|
46
|
-
reporter.onWaitToTestComplete(this.id, this.isCodeMode);
|
|
47
|
-
|
|
48
|
-
function runSeleniumTest() {
|
|
49
|
-
return new Promise(resolve => player.sessionPlayer.playByTestId(that.testId, that.executionId, that.testResultId, that.baseUrl, that.userData, version, resolve, false, that.overrideTestConfigId, that.branch))
|
|
50
|
-
.timeout(that.testRunTimeout, timeoutMessages.TEST_COMPLETE_TIMEOUT_MSG)
|
|
51
|
-
.catch(Promise.TimeoutError, err => {
|
|
52
|
-
player.sessionPlayer.stopPlayingOnTestTimeout && player.sessionPlayer.stopPlayingOnTestTimeout();
|
|
53
|
-
throw err;
|
|
54
|
-
})
|
|
55
|
-
.then(testResult => {
|
|
56
|
-
testResult.stepsResults = null;
|
|
57
|
-
return Promise.resolve(testResult);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return super.runTestOnce(testRunHandler, player)
|
|
62
|
-
.then(() => runSeleniumTest())
|
|
63
|
-
.catch(err => {
|
|
64
|
-
logger.error("failed to run test once", {err: err});
|
|
65
|
-
return Promise.reject(err);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
module.exports = WorkerAppium;
|