Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SeeTest allows you to pass Environment variables and command line arguments to an iOS the application during the launch process.

Users are required to pass the environment variables or command line arguments as a MAP of the key-value set which is passed to the application

...

KeyTypeDescriptionOS
relaunchbooleanWhether or not to kill the application in case it is runningAndroid & iOS
instrumentbooleanLaunch the application in an instrumented modeAndroid & iOS
launch_argsList<String>Ordered An ordered array of command line argsiOS
launch_envMap<String,String>Set of key = value pairs that will be passed as Environment variables to the applicationiOS
<adb-option-key><adb-option-value>key-value pairs of adb extra optionsAndroid
  • Instrumentation in iOS is determined during installation.

The examples below show a couple of use cases for this feature for users who are using JAVA \ Ruby Clients, this command is supported for all SeeTestAutomation clients

...

Code Block
languagejava
themeEclipse
titleExample - Java launch iOS App with options and pass map as environment variables
// Launch app as instrumented, use Use relaunch
Map <String, Object> launchOptionsMap = new HashMap ();
launchOptionsMap.put("instrument", true);
launchOptionsMap.put("relaunch", true);
// Create ENV vars map to pass to the application so it will run in DEBUG with a secret key
Map envVars = new HashMap();
envVars.put("secret_key", "DFSF5343543CAA");
envVars.put("DEBUG", true);

launchOptionsMap.put("launch_env",envVars);

client.launch("com.experibank.eribank",launchOptionsMap);
Code Block
languagejava
themeEclipse
titleExample - Java launch Android App with adb options
// Launch app as instrumented, use relaunch
Map <String, Object> launchOptionsMap = new HashMap ();
launchOptionsMap.put("instrumentinstrumented", true);
launchOptionsMap.put("relaunch", true);
// Create adb params map to pass 
launchOptionsMap.put("-D", "");
launchOptionsMap.put("--es", "android.intent.extra.TEXT Hello");

client.launch("com.experibank.eribank",launchOptionsMap);

...