Skip to content

Commit 88b32e8

Browse files
committed
- fixed bstack-local-parallel-browsers profile for gradle
- removed mobile profile
1 parent e50878d commit 88b32e8

4 files changed

Lines changed: 13 additions & 39 deletions

File tree

build.gradle

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ tasks.register('bstack-local-parallel-browsers', Test) {
124124
suites 'src/test/resources/conf/TestNG_MultipleParallel.xml'
125125
}
126126
systemProperty "environment", "remote"
127+
systemProperty "caps_type", "local"
127128
systemProperty "application_endpoint", "$APPLICATION_LOCAL_URL"
128129

129130
}
@@ -134,14 +135,5 @@ tasks.register('bstack-parallel-browsers', Test) {
134135
systemProperty "environment", "remote"
135136
systemProperty "application_endpoint", "$APPLICATION_URL"
136137

138+
137139
}
138-
tasks.register('bstack-parallel-mobile', Test) {
139-
useTestNG() {
140-
suites 'src/test/resources/conf/TestNG_Parallel.xml'
141-
}
142-
systemProperty "environment", "remote"
143-
systemProperty "application_endpoint", "$APPLICATION_URL"
144-
systemProperty "caps_type", "mobile"
145-
systemProperty "env_cap_id", "1"
146-
147-
}

pom.xml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -353,30 +353,6 @@
353353
</plugins>
354354
</build>
355355
</profile>
356-
<profile>
357-
<id>bstack-parallel-mobile</id>
358-
<build>
359-
<plugins>
360-
<plugin>
361-
<groupId>org.apache.maven.plugins</groupId>
362-
<artifactId>maven-surefire-plugin</artifactId>
363-
<configuration>
364-
<systemPropertyVariables>
365-
<environment>remote</environment>
366-
<application_endpoint>${application-url}</application_endpoint>
367-
<caps_type>mobile</caps_type>
368-
<env_cap_id>2</env_cap_id>
369-
</systemPropertyVariables>
370-
<suiteXmlFiles>
371-
<suiteXmlFile>src/test/resources/conf/TestNG_MultipleParallel.xml</suiteXmlFile>
372-
</suiteXmlFiles>
373-
<argLine>
374-
-Ddataproviderthreadcount=${parallel-count}
375-
</argLine>
376-
</configuration>
377-
</plugin>
378-
</plugins>
379-
</build>
380-
</profile>
356+
381357
</profiles>
382358
</project>

src/test/java/browserstack/ParallelTestRunner.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@
1414
@CucumberOptions(features = "src/test/resources/com/browserstack", glue = "browserstack.stepdefs")
1515
public class ParallelTestRunner extends BaseTest {
1616
private TestNGCucumberRunner testNGCucumberRunner;
17+
18+
@BeforeSuite
19+
public void setupReport()
20+
{
21+
AllureReportConfigurationSetup.prepareAllureResultsFolder();
22+
}
1723

1824
@BeforeClass(alwaysRun = true)
1925
public void setUpClass() {
2026
testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());
21-
AllureReportConfigurationSetup.prepareAllureResultsFolder();
22-
27+
2328
}
2429

2530
@Test(groups = "cucumber", description = "Runs Cucumber Feature", dataProvider = "scenarios")

src/test/java/browserstack/stepdefs/HomePageSteps.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ public void iShouldSeePricesInAscendingOrder() {
9393
WebDriverWait wait = new WebDriverWait(ThreadLocalDriver.getWebDriver(), 10);
9494
try {
9595
WebDriverWait webDriverWait = new WebDriverWait(ThreadLocalDriver.getWebDriver(), 10);
96-
Utility.waitForJSLoad(ThreadLocalDriver.getWebDriver());
97-
webDriverWait.until(ExpectedConditions.visibilityOf(ThreadLocalDriver.getWebDriver().findElement(By.cssSelector(".shelf-item__price > div.val > b"))));
96+
Utility.waitForJSLoad(ThreadLocalDriver.getWebDriver());
97+
// webDriverWait.until(ExpectedConditions.visibilityOf(ThreadLocalDriver.getWebDriver().findElement(By.cssSelector(".shelf-item__price > div.val > b"))));
9898
List<WebElement> priceWebElement = ThreadLocalDriver.getWebDriver().findElements(By.cssSelector(".shelf-item__price > div.val > b"));
99+
Utility.waitForJSLoad(ThreadLocalDriver.getWebDriver());
99100
Assert.assertTrue(Utility.isAscendingOrder(priceWebElement, priceWebElement.size()));
100101
} catch (NoSuchElementException e) {
101102
throw new AssertionError("Error in page load");

0 commit comments

Comments
 (0)