Skip to content

Commit 475a29e

Browse files
kamal-kaur04francisf
authored andcommitted
add check for browserstack.local
1 parent 9585ed4 commit 475a29e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
<groupId>org.apache.maven.plugins</groupId>
5555
<artifactId>maven-surefire-plugin</artifactId>
5656
<version>2.18.1</version>
57+
<configuration>
58+
<suiteXmlFiles>
59+
<suiteXmlFile>config/single.testng.xml</suiteXmlFile>
60+
</suiteXmlFiles>
61+
</configuration>
5762
</plugin>
5863
</plugins>
5964
</build>

src/test/java/com/browserstack/BrowserStackTestNGTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void setUp(String config_file, String environment) throws Exception {
6262

6363
if (capabilities.getCapability("bstack:options") != null) {
6464
HashMap bstackOptionsMap = (HashMap) capabilities.getCapability("bstack:options");
65-
if (bstackOptionsMap.get("local") != null && bstackOptionsMap.get("local").toString().equalsIgnoreCase("true")) {
65+
if ((bstackOptionsMap.get("local") != null && bstackOptionsMap.get("local").toString().equalsIgnoreCase("true")) || (capabilities.getCapability("browserstack.local") != null && capabilities.getCapability("browserstack.local").toString().equalsIgnoreCase("true"))) {
6666
l = new Local();
6767
Map<String, String> options = new HashMap<String, String>();
6868
options.put("key", accessKey);

0 commit comments

Comments
 (0)