File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >com.yanirta</groupId >
88 <artifactId >ImageTester</artifactId >
9- <version >3.1.0 </version >
9+ <version >3.1.1 </version >
1010 <packaging >jar</packaging >
1111 <properties >
1212 <maven .compiler.source>1.8</maven .compiler.source>
Original file line number Diff line number Diff line change 11Manifest-Version : 1.0
22Main-Class : com.yanirta.ImageTester
3- Implementation-Version : 3.1.0
3+ Implementation-Version : 3.1.1
44
Original file line number Diff line number Diff line change 2626import com .yanirta .lib .Utils ;
2727
2828public class ImageTester {
29- private static final String cur_ver = "3.1.0 " ;
29+ private static final String cur_ver = "3.1.1 " ;
3030
3131 public static void main (String [] args ) {
3232 CommandLineParser parser = new DefaultParser ();
@@ -79,6 +79,7 @@ public static void main(String[] args) {
7979 .logFile (cmd .getOptionValue ("lf" , null ))
8080 .hostOs (cmd .getOptionValue ("os" , null ))
8181 .hostApp (cmd .getOptionValue ("ap" ))
82+ .environmentName (cmd .getOptionValue ("en" ))
8283 .saveFaliedTests (cmd .hasOption ("as" ))
8384 .ignoreDisplacement (cmd .hasOption ("id" ))
8485 .saveNewTests (!cmd .hasOption ("pn" ))
@@ -335,6 +336,12 @@ private static Options getOptions() {
335336 .hasArg ()
336337 .argName ("app" )
337338 .build ());
339+ options .addOption (Option .builder ("en" )
340+ .longOpt ("environmentName" )
341+ .desc ("Set environment name identifier for test" )
342+ .hasArg ()
343+ .argName ("env" )
344+ .build ());
338345 options .addOption (Option .builder ("di" )
339346 .longOpt ("dpi" )
340347 .desc ("PDF conversion dots per inch parameter default value 300" )
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public class EyesFactory {
1919 private String logFilename ;
2020 private String hostOs ;
2121 private String hostApp ;
22+ private String environmentName ;
2223 private boolean saveFailed = false ;
2324 private boolean ignoreDisplacement = false ;
2425 private boolean saveNewTests = false ;
@@ -59,6 +60,8 @@ public String getBaseAgentId() {
5960 eyes .setHostOS (this .hostOs );
6061 if (StringUtils .isNotBlank (this .hostApp ))
6162 eyes .setHostApp (this .hostApp );
63+ if (StringUtils .isNotBlank (this .environmentName ))
64+ eyes .setEnvName (this .environmentName );
6265 if (StringUtils .isNotBlank (this .logFilename ))
6366 eyes .setLogHandler (new FileLogger (this .logFilename , true , true ));
6467 if (this .proxySettings != null )
@@ -131,6 +134,11 @@ public EyesFactory hostApp(String app) {
131134 return this ;
132135 }
133136
137+ public EyesFactory environmentName (String environmentName ) {
138+ this .environmentName = environmentName ;
139+ return this ;
140+ }
141+
134142 public EyesFactory saveFaliedTests (boolean saveFailed ) {
135143 this .saveFailed = saveFailed ;
136144 return this ;
You can’t perform that action at this time.
0 commit comments