@@ -10,13 +10,14 @@ const config = (() => {
10
10
. option ( "testFolder" , { describe : "e2e test folder name" , default : "e2e" , type : "string" } )
11
11
. option ( "appiumCapsLocation" , { describe : "Capabilities" , type : "string" } )
12
12
. option ( "sauceLab" , { describe : "SauceLab" , default : false , type : "boolean" } )
13
- . option ( "port" , { alias : "p" , describe : "Execution port" , type : "string" } )
13
+ . option ( "port" , { alias : "p" , describe : "Appium port" , type : "string" } )
14
+ . option ( "wdaLocalPort" , { alias : "p" , describe : "WDA port" , type : "string" } )
14
15
. option ( "verbose" , { alias : "v" , describe : "Log actions" , type : "boolean" } )
15
16
. option ( "path" , { describe : "path" , default : process . cwd ( ) , type : "string" } )
16
17
. option ( "appPath" , { describe : "application path" , type : "string" } )
17
18
. option ( "storage" , { describe : "Storage for images folder." , type : "string" } )
18
19
. option ( "testReports" , { describe : "Test reporting folder" , type : "string" } )
19
- . option ( "reuseDevice" , { describe : "Reusing device if available." , type : "boolean" , defualt : false } )
20
+ . option ( "reuseDevice" , { describe : "Reusing device if available." , type : "boolean" , defualt : true } )
20
21
. option ( "ignoreDeviceController" , { alias : "i-ns-device-controller" , describe : "Use default appium options for running emulatos/ simulators." , type : "boolean" , defualt : false } )
21
22
. option ( "useDeviceControllerServer" , {
22
23
alias : "use-ns-device-controller-server" ,
@@ -47,7 +48,8 @@ const config = (() => {
47
48
projectBinary : projectBinary ,
48
49
pluginRoot : pluginRoot ,
49
50
pluginBinary : pluginBinary ,
50
- port : options . port || process . env . npm_config_port ,
51
+ port : options . port || process . env . npm_config_port || process . env [ "APPIUM_PORT" ] ,
52
+ wdaLocalPort : options . wdaLocalPort || process . env [ "WDA_LOCAL_PORT" ] ,
51
53
testFolder : options . testFolder || process . env . npm_config_testFolder || "e2e" ,
52
54
runType : options . runType || process . env . npm_config_runType ,
53
55
appiumCapsLocation : options . appiumCapsLocation || join ( projectDir , options . testFolder , "config" , capabilitiesName ) ,
@@ -57,9 +59,7 @@ const config = (() => {
57
59
storage : options . storage || process . env . npm_config_STORAGE || process . env . STORAGE ,
58
60
testReports : options . testReports || process . env . npm_config_TEST_REPORTS || process . env . TEST_REPORTS ,
59
61
reuseDevice : options . reuseDevice || process . env . npm_config_REUSE_DEVICE || process . env . REUSE_DEVICE ,
60
- ignoreDeviceController : options . ignoreDeviceController ,
61
- useDeviceControllerServer : options . useDeviceControllerServer || process . env [ 'USE_DEVICE_CONTROLLER_SERVER' ] ,
62
- deviceControllerServerPort : parseInt ( options . deviceControllerServerPort ) || parseInt ( process . env [ 'DEVICE_CONTROLLER_SERVER_PORT' ] ) || 8700
62
+ ignoreDeviceController : options . ignoreDeviceController
63
63
} ;
64
64
65
65
return config ;
@@ -81,6 +81,5 @@ export const {
81
81
testReports,
82
82
reuseDevice,
83
83
ignoreDeviceController,
84
- useDeviceControllerServer,
85
- deviceControllerServerPort
84
+ wdaLocalPort
86
85
} = config ;
0 commit comments