Skip to content

Commit bdf6eca

Browse files
committed
v0.0.6 complete
1 parent 298baed commit bdf6eca

37 files changed

+3909
-22
lines changed

pom.xml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>io.github.rsshekhawat</groupId>
55
<artifactId>cucumber-parallel-xbrowser-testing</artifactId>
66
<packaging>maven-plugin</packaging>
7-
<version>0.0.5</version>
7+
<version>0.0.6</version>
88
<name>cucumber-parallel-xbrowser-testing</name>
99
<url>https://github.com/rsshekhawat/cucumber-parallel-xbrowser-testing</url>
1010

@@ -20,22 +20,19 @@
2020
<dependency>
2121
<groupId>org.apache.maven</groupId>
2222
<artifactId>maven-plugin-api</artifactId>
23-
<version>3.8.1</version>
24-
<scope>provided</scope>
23+
<version>3.8.4</version>
2524
</dependency>
2625

2726
<dependency>
2827
<groupId>org.apache.maven.plugin-tools</groupId>
2928
<artifactId>maven-plugin-annotations</artifactId>
3029
<version>3.6.4</version>
31-
<scope>provided</scope>
3230
</dependency>
3331

3432
<dependency>
3533
<groupId>org.apache.maven</groupId>
3634
<artifactId>maven-core</artifactId>
3735
<version>3.8.4</version>
38-
<scope>provided</scope>
3936
</dependency>
4037

4138
<dependency>
@@ -59,7 +56,6 @@
5956
</dependencies>
6057

6158
<build>
62-
<pluginManagement>
6359
<plugins>
6460
<plugin>
6561
<groupId>org.apache.maven.plugins</groupId>
@@ -138,12 +134,11 @@
138134
<dependency>
139135
<groupId>com.thoughtworks.xstream</groupId>
140136
<artifactId>xstream</artifactId>
141-
<version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
137+
<version>1.4.15</version>
142138
</dependency>
143139
</dependencies>
144140
</plugin>
145141
</plugins>
146-
</pluginManagement>
147142
</build>
148143

149144
<reporting>
@@ -201,3 +196,4 @@
201196
</scm>
202197

203198
</project>
199+

src/main/java/io/github/rsshekhawat/CreateTestRunners.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.Properties;
3737
import org.json.XML;
3838

39-
@Mojo(name="xbrowser", defaultPhase = LifecyclePhase.INITIALIZE)
39+
@Mojo(name="xbrowser", defaultPhase = LifecyclePhase.INTEGRATION_TEST)
4040
public class CreateTestRunners extends AbstractMojo
4141
{
4242
@Parameter(property = "project", readonly = true)
@@ -91,10 +91,10 @@ public void createTestRunners() throws IOException {
9191
content = ripOffPackageNameFromJavaFile(content);
9292

9393
File dir = new File(runnersDirectoryPath);
94+
if (!dir.exists()) dir.mkdirs();
9495

9596
for(int i=0;i<totalFiles;i++) {
9697
String filePath = runnersDirectoryPath + File.separator + fileNamePattern +i+".java";
97-
if (!dir.exists()) dir.mkdirs();
9898
File file = new File(filePath);
9999
boolean flag = file.createNewFile();
100100
FileWriter myWriter = new FileWriter(filePath);
@@ -120,10 +120,10 @@ public String ripOffPackageNameFromJavaFile(String content) throws IOException {
120120
public void createDataPropertiesFile() throws IOException {
121121

122122
File dir = new File(dataDirectoryPath);
123+
if (!dir.exists()) dir.mkdirs();
123124

124125
for(int i=0;i<totalFiles;i++) {
125126
String filePath = dataDirectoryPath + File.separator + fileNamePattern +i+".properties";
126-
if (!dir.exists()) dir.mkdirs();
127127
File file = new File(filePath);
128128
file.createNewFile();
129129
}
@@ -225,10 +225,15 @@ public Map<Integer, Map<String, String>> convertXMLToJSONAndReturnMap() throws I
225225
Map<Integer, Map<String, String>> map = new HashMap<>();
226226
String content = new String(Files.readAllBytes(Paths.get(configurationFilePath)));
227227
JSONObject obj = new JSONObject(XML.toJSONObject(content).toString()).getJSONObject("configurations");
228-
JSONArray arr = obj.getJSONArray("configuration");
229-
totalFiles = arr.length();
230-
for(int i=0;i<arr.length();i++){
231-
map.put(i, jsonToMap(arr.get(i).toString()));
228+
try {
229+
JSONArray arr = obj.getJSONArray("configuration");
230+
totalFiles = arr.length();
231+
for (int i = 0; i < arr.length(); i++) {
232+
map.put(i, jsonToMap(arr.get(i).toString()));
233+
}
234+
}catch(JSONException exc){
235+
map.put(0, jsonToMap(obj.getJSONObject("configuration").toString()));
236+
totalFiles = 1;
232237
}
233238
return map;
234239
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_322) on Wed Feb 16 14:40:10 IST 2022 -->
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>All Classes (cucumber-parallel-xbrowser-testing 0.0.6 API)</title>
8+
<meta name="date" content="2022-02-16">
9+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
10+
<script type="text/javascript" src="script.js"></script>
11+
</head>
12+
<body>
13+
<h1 class="bar">All&nbsp;Classes</h1>
14+
<div class="indexContainer">
15+
<ul>
16+
<li><a href="io/github/rsshekhawat/CreateTestRunners.html" title="class in io.github.rsshekhawat" target="classFrame">CreateTestRunners</a></li>
17+
<li><a href="io/github/rsshekhawat/CreateTestRunners.html" title="class in io.github.rsshekhawat" target="classFrame">CreateTestRunners</a></li>
18+
<li><a href="io/github/rsshekhawat/CustomCucumberReports.html" title="class in io.github.rsshekhawat" target="classFrame">CustomCucumberReports</a></li>
19+
<li><a href="io/github/rsshekhawat/CustomCucumberReports.html" title="class in io.github.rsshekhawat" target="classFrame">CustomCucumberReports</a></li>
20+
</ul>
21+
</div>
22+
</body>
23+
</html>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_322) on Wed Feb 16 14:40:10 IST 2022 -->
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>All Classes (cucumber-parallel-xbrowser-testing 0.0.6 API)</title>
8+
<meta name="date" content="2022-02-16">
9+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
10+
<script type="text/javascript" src="script.js"></script>
11+
</head>
12+
<body>
13+
<h1 class="bar">All&nbsp;Classes</h1>
14+
<div class="indexContainer">
15+
<ul>
16+
<li><a href="io/github/rsshekhawat/CreateTestRunners.html" title="class in io.github.rsshekhawat">CreateTestRunners</a></li>
17+
<li><a href="io/github/rsshekhawat/CreateTestRunners.html" title="class in io.github.rsshekhawat">CreateTestRunners</a></li>
18+
<li><a href="io/github/rsshekhawat/CustomCucumberReports.html" title="class in io.github.rsshekhawat">CustomCucumberReports</a></li>
19+
<li><a href="io/github/rsshekhawat/CustomCucumberReports.html" title="class in io.github.rsshekhawat">CustomCucumberReports</a></li>
20+
</ul>
21+
</div>
22+
</body>
23+
</html>
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_322) on Wed Feb 16 14:40:10 IST 2022 -->
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>Constant Field Values (cucumber-parallel-xbrowser-testing 0.0.6 API)</title>
8+
<meta name="date" content="2022-02-16">
9+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
10+
<script type="text/javascript" src="script.js"></script>
11+
</head>
12+
<body>
13+
<script type="text/javascript"><!--
14+
try {
15+
if (location.href.indexOf('is-external=true') == -1) {
16+
parent.document.title="Constant Field Values (cucumber-parallel-xbrowser-testing 0.0.6 API)";
17+
}
18+
}
19+
catch(err) {
20+
}
21+
//-->
22+
</script>
23+
<noscript>
24+
<div>JavaScript is disabled on your browser.</div>
25+
</noscript>
26+
<!-- ========= START OF TOP NAVBAR ======= -->
27+
<div class="topNav"><a name="navbar.top">
28+
<!-- -->
29+
</a>
30+
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
31+
<a name="navbar.top.firstrow">
32+
<!-- -->
33+
</a>
34+
<ul class="navList" title="Navigation">
35+
<li><a href="io/github/rsshekhawat/package-summary.html">Package</a></li>
36+
<li>Class</li>
37+
<li>Use</li>
38+
<li><a href="overview-tree.html">Tree</a></li>
39+
<li><a href="deprecated-list.html">Deprecated</a></li>
40+
<li><a href="index-all.html">Index</a></li>
41+
<li><a href="help-doc.html">Help</a></li>
42+
</ul>
43+
</div>
44+
<div class="subNav">
45+
<ul class="navList">
46+
<li>Prev</li>
47+
<li>Next</li>
48+
</ul>
49+
<ul class="navList">
50+
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
51+
<li><a href="constant-values.html" target="_top">No&nbsp;Frames</a></li>
52+
</ul>
53+
<ul class="navList" id="allclasses_navbar_top">
54+
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
55+
</ul>
56+
<div>
57+
<script type="text/javascript"><!--
58+
allClassesLink = document.getElementById("allclasses_navbar_top");
59+
if(window==top) {
60+
allClassesLink.style.display = "block";
61+
}
62+
else {
63+
allClassesLink.style.display = "none";
64+
}
65+
//-->
66+
</script>
67+
</div>
68+
<a name="skip.navbar.top">
69+
<!-- -->
70+
</a></div>
71+
<!-- ========= END OF TOP NAVBAR ========= -->
72+
<div class="header">
73+
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
74+
<h2 title="Contents">Contents</h2>
75+
</div>
76+
<!-- ======= START OF BOTTOM NAVBAR ====== -->
77+
<div class="bottomNav"><a name="navbar.bottom">
78+
<!-- -->
79+
</a>
80+
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
81+
<a name="navbar.bottom.firstrow">
82+
<!-- -->
83+
</a>
84+
<ul class="navList" title="Navigation">
85+
<li><a href="io/github/rsshekhawat/package-summary.html">Package</a></li>
86+
<li>Class</li>
87+
<li>Use</li>
88+
<li><a href="overview-tree.html">Tree</a></li>
89+
<li><a href="deprecated-list.html">Deprecated</a></li>
90+
<li><a href="index-all.html">Index</a></li>
91+
<li><a href="help-doc.html">Help</a></li>
92+
</ul>
93+
</div>
94+
<div class="subNav">
95+
<ul class="navList">
96+
<li>Prev</li>
97+
<li>Next</li>
98+
</ul>
99+
<ul class="navList">
100+
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
101+
<li><a href="constant-values.html" target="_top">No&nbsp;Frames</a></li>
102+
</ul>
103+
<ul class="navList" id="allclasses_navbar_bottom">
104+
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
105+
</ul>
106+
<div>
107+
<script type="text/javascript"><!--
108+
allClassesLink = document.getElementById("allclasses_navbar_bottom");
109+
if(window==top) {
110+
allClassesLink.style.display = "block";
111+
}
112+
else {
113+
allClassesLink.style.display = "none";
114+
}
115+
//-->
116+
</script>
117+
</div>
118+
<a name="skip.navbar.bottom">
119+
<!-- -->
120+
</a></div>
121+
<!-- ======== END OF BOTTOM NAVBAR ======= -->
122+
<p class="legalCopy"><small>Copyright &#169; 2022. All rights reserved.</small></p>
123+
</body>
124+
</html>

0 commit comments

Comments
 (0)