8000 Sample Tests · LambdaTest/java-testng-selenium@17a29a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17a29a5

Browse files
committed
Sample Tests
1 parent 1dec376 commit 17a29a5

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/test/java/com/lambdatest/Tests/ParallelJenkinsTestThreadControl.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.ArrayList;
1111
import java.util.Iterator;
1212
import java.util.List;
13+
import java.util.Properties;
1314

1415
import org.json.JSONArray;
1516
import org.json.JSONObject;
@@ -34,11 +35,11 @@ public class ParallelJenkinsTestThreadControl {
3435
public static String status = "failed";
3536
public String buildTag = System.getenv("LT_BUILD_NAME");
3637
public String gridURL = System.getenv("LT_GRID_URL");
37-
public static String threadCount = System.getenv("threadCount");
38+
public static String threadcount = System.getenv("threadcount");
3839

3940
public static void main(String[] args) {
4041

41-
System.setProperty("threadcount", threadCount);
42+
System.setProperty("threadcount", threadcount);
4243

4344

4445
TestNG testng = new TestNG();
@@ -61,7 +62,14 @@ public void test(String param, Method method) throws Exception {
6162
String version = envDeatails[2];
6263
String browser = envDeatails[0];
6364
String resValue = envDeatails[3];
65+
66+
java.io.InputStream is = this.getClass().getResourceAsStream("my.properties");
67+
java.util.Properties p = new Properties();
68+
p.load(is);
69+
String threadCount = p.getProperty("threadcount");
70+
6471
Reporter.log("threadCount" + threadCount);
72+
Reporter.log("threadcount" + threadcount);
6573
Reporter.log("Running with the value (" + param + ") on thread [" + Thread.currentThread().getId() + "]");
6674
this.setUp(browser, version, os, resValue, method.getName());
6775

src/test/java/com/lambdatest/Tests/ParallelTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
public class ParallelTest {
2525

2626
public static String status = "failed";
27-
/*
28-
* public String buildTag = System.getenv("LT_BUILD"); public String username =
29-
* System.getenv("LT_USERNAME"); public String accesskey =
30-
* System.getenv("LT_APIKEY"); public String gridURL =
31-
* System.getenv("LT_GRID_URL");
32-
*/
3327

3428
@Test(dataProvider = "browsersDetails")
3529
public void test(String browser, String version, String os, Method method) throws Exception {

0 commit comments

Comments
 (0)
0