pom.xml - How to access system properties passed with -D switch in maven -


i using android-maven-plugin writing uiautomator test cases. project works different clients , need send client's name string program, selected cleint's app tested. here code expecting client's name

@override     protected void setup() throws exception {         super.setup();         uiautomatorutils.unlockemulator();         string launcherstring = /* needed way access client's name string" */         assertnotnull("launcherstring not provided", launcherstring);         applauncher.launchapplicationfromdesiredlauncher(launcherstring);         uiautomatorutils.setcurrenttestname("loginlogout");     } 

how can achieve this. tried pass argument command line this: mvn install -dlauncher=xyzclient , value in setup() system.getproperty("launcher"). not working.

i want know best approach challenge?

imho not practice test case pull such dynamic value outside. not know how build maven project if such property required specified.

i don't understand context, can put list of client names in test resources , run against it. in way tested developers checking code out. when release project, can sure of clients has been tested.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -