Skip to content

Commit

Permalink
v0.0.3 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
rsshekhawat committed Feb 9, 2022
1 parent 53a3d98 commit 3dc319a
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# IntelliJ Files
.idea

# Target folder
target

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.github.rsshekhawat</groupId>
<artifactId>cucumber-parallel-xbrowser-testing</artifactId>
<packaging>maven-plugin</packaging>
<version>0.0.2</version>
<version>0.0.3</version>
<name>cucumber-parallel-xbrowser-testing</name>
<url>https://github.com/rsshekhawat/cucumber-parallel-xbrowser-testing</url>

Expand Down
20 changes: 19 additions & 1 deletion src/main/java/io/github/rsshekhawat/MyMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

import org.json.XML;

@Mojo(name="xbrowser", defaultPhase = LifecyclePhase.INITIALIZE)
Expand Down Expand Up @@ -158,10 +160,10 @@ public void createPropertiesFilesForEachTestRunner() throws IOException {

Map<Integer, Map<String, String>> map = configMap;
File dir = new File(propertiesDirectoryPath);
if (!dir.exists()) dir.mkdirs();

for(int i=0;i<totalFiles;i++) {
String filePath = propertiesDirectoryPath + File.separator + fileNamePattern +i+ ".properties";
if (!dir.exists()) dir.mkdirs();

File file = new File(filePath);
BufferedWriter bf = new BufferedWriter(new FileWriter(file));
Expand Down Expand Up @@ -201,6 +203,22 @@ public Map<String, String> jsonToMap(String content) throws JSONException {
return map;
}

public void setSystemVariables(String fileName){

try {
File file = new File(propertiesDirectoryPath+File.separator+fileName);
Properties prop = new Properties();
InputStream is = new FileInputStream(file);
prop.load(is);
for (Map.Entry e : prop.entrySet()){
System.setProperty(e.getKey().toString(),e.getValue().toString());
}
is.close();
}catch (Exception exc){
getLog().info(exc.getMessage());
}
}

public void printConfigurationsLogs(){

getLog().info("------------------------------------------------------------------------");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<description>xbrowser parallel testing</description>
<groupId>io.github.rsshekhawat</groupId>
<artifactId>cucumber-parallel-xbrowser-testing</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
<goalPrefix>cucumber-parallel-xbrowser-testing</goalPrefix>
<mojos>
<mojo>
Expand Down
2 changes: 1 addition & 1 deletion target/classes/META-INF/maven/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<description>xbrowser parallel testing</description>
<groupId>io.github.rsshekhawat</groupId>
<artifactId>cucumber-parallel-xbrowser-testing</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
<goalPrefix>cucumber-parallel-xbrowser-testing</goalPrefix>
<isolatedRealm>false</isolatedRealm>
<inheritedByDefault>true</inheritedByDefault>
Expand Down
Binary file modified target/classes/io/github/rsshekhawat/MyMojo.class
Binary file not shown.
Binary file removed target/cucumber-parallel-xbrowser-testing-0.0.2.jar
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven
#Wed Feb 09 00:26:30 IST 2022
version=0.0.2
#Wed Feb 09 11:51:32 IST 2022
version=0.0.3
groupId=io.github.rsshekhawat
artifactId=cucumber-parallel-xbrowser-testing

0 comments on commit 3dc319a

Please sign in to comment.