Skip to content

Commit

Permalink
Parallel methods (#2809)
Browse files Browse the repository at this point in the history
* small corrections

* swithc all parallel classes to methods

* move Soft asserts to single thread tests

* move Soft asserts to single thread tests

* another ci run

* another ci run

* set retry to 2 ans switch on nextMethodTest

* move SoftAsserts back to parallel execution

* correct validateLocators for Grid

* fix actions issue while close driver

* add show for actions
  • Loading branch information
RomanIovlev authored Mar 1, 2021
1 parent d594e3c commit 20a60bf
Show file tree
Hide file tree
Showing 37 changed files with 159 additions and 81 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Changelog

## 1.3.10 (planed March 2021)
## 1.3.12 (planed March 2021)
* Support [Angular materials](https://material.angular.io/components/categories) elements
* All tasks [angular](https://github.com/jdi-testing/jdi-light/issues?q=is%3Aissue+label%3AAngular+)

##1.3.10 (01.03.2021)
* Fix issue with actions
* Fix Grid header locators validation

##1.3.9 (28.02.2021)
* Fix beforeNewPage issue
* Fix issues with getting private fields by forms and other elements
Expand Down
4 changes: 2 additions & 2 deletions jdi-bdd-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.epam.jdi</groupId>
<artifactId>jdi-bdd-tests</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<name>Tests: JDI BDD</name>

<properties>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-bdd</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
Expand Down
4 changes: 2 additions & 2 deletions jdi-bdd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.epam.jdi</groupId>
<artifactId>jdi-bdd</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<name>JDI BDD</name>

<properties>
Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-html</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
Expand Down
6 changes: 3 additions & 3 deletions jdi-eyes-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.epam.jdi</groupId>
<artifactId>jdi-eyes-demo</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<name>Selenium to JDI Example with Eyes</name>
<packaging>jar</packaging>

Expand All @@ -23,12 +23,12 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-eyes</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-html</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-angular-tests-with-mocks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<artifactId>jdi-light-angular-tests-with-mocks</artifactId>
<name>Tests: JDI Angular unit tests with mocks</name>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -28,7 +28,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-angular</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-angular-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<artifactId>jdi-light-angular-tests</artifactId>
<name>Tests: JDI Angular</name>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-angular</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
Expand Down
2 changes: 1 addition & 1 deletion jdi-light-angular-tests/src/test/resources/common.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="WINDOWS-1251"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="JDI-Light Angular Common elements Tests" parallel="classes" thread-count="1">
<suite name="JDI-Light Angular Common elements Tests" parallel="methods" thread-count="1">
<test name="Common elements tests">
<packages>
<package name="io.github.epam.angular.tests.elements.common.*"/>
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-angular/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>jdi-light-angular</artifactId>
<packaging>jar</packaging>
<name>JDI Angular</name>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-html</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions jdi-light-applitools-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>jdi-light-applitools-tests</artifactId>
<name>Tests: JDI Light Applitools Eyes</name>
<packaging>jar</packaging>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -33,12 +33,12 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-html</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-eyes</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
Expand Down
2 changes: 1 addition & 1 deletion jdi-light-applitools-tests/src/test/resources/general.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="WINDOWS-1251"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="JDI-Light Applitools Tests" parallel="classes" thread-count="1">
<suite name="JDI-Light Applitools Tests" parallel="methods" thread-count="1">
<test name="Tests">
<packages>
<package name="com.jdi.tests"/>
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-bootstrap-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<version>1.3.9</version>
<version>1.3.10</version>
<artifactId>jdi-light-bootstrap-tests</artifactId>
<name>Tests: JDI Bootstrap</name>
<groupId>com.epam.jdi</groupId>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-bootstrap</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>

<!--Allure config in parent-->
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>jdi-light-bootstrap</artifactId>
<name>JDI Light Bootstrap Elements</name>
<packaging>jar</packaging>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-html</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions jdi-light-eyes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>jdi-light-eyes</artifactId>
<name>JDI Light Applitools Eyes</name>
<packaging>jar</packaging>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>

<!-- Applitools SDK -->
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-html-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>1.3.9</version>
<version>1.3.10</version>
<artifactId>jdi-light-html-tests</artifactId>
<name>Tests: JDI Html</name>
<groupId>com.epam.jdi</groupId>
Expand All @@ -25,7 +25,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light-html</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>

<!--Allure config in parent-->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package io.github.epam.html.tests.performance;

import com.epam.jdi.light.driver.WebDriverFactory;
import com.epam.jdi.tools.Timer;
import io.github.epam.TestsInit;
import org.openqa.selenium.Keys;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import static io.github.com.StaticSite.html5Page;
import static io.github.com.pages.HtmlElementsPage.yourName;
import static io.github.epam.html.tests.site.steps.States.shouldBeLoggedIn;
import static org.testng.Assert.assertEquals;

/**
* Created by Roman Iovlev on 01.03.2019
* Email: [email protected]; Skype: roman.iovlev
*/

public class ActionsCloseTests implements TestsInit {

@BeforeMethod
public void before() {
shouldBeLoggedIn();
html5Page.shouldBeOpened();
yourName.setText(text);
}
String text = "TextField";

@Test
public void getValueTest() {
yourName.core().actionsWithElement(a -> a.
click().
keyDown(Keys.CONTROL).
sendKeys("a").
keyUp(Keys.CONTROL));
yourName.sendKeys("Test");
assertEquals(yourName.getValue(), "Test");
}

@Test
public void sendKeysTest() {
yourName.core().actionsWithElement(a -> a.
click().
keyDown(Keys.CONTROL).
sendKeys("a").
keyUp(Keys.CONTROL));
yourName.sendKeys("Test");
assertEquals(yourName.getValue(), "Test");
}
@AfterMethod(alwaysRun = true)
public void tearDown() {
WebDriverFactory.close();
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.epam.html.tests.issues.issue67;
package io.github.epam.html.tests.site;

import com.epam.jdi.light.asserts.core.SoftAssert;
import io.github.epam.TestsInit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

public class RetryFailedTestCases implements IRetryAnalyzer {
private int retryCnt = 0;
final int maxRetryCnt = 2;

//This method will be called everytime a test fails. It will return TRUE if a test fails and need to be retried, else it returns FALSE
public boolean retry(ITestResult result) {
//You could mentioned maxRetryCnt (Maximiun Retry Count) as per your requirement. Here I took 2, If any failed testcases then it runs two times
int maxRetryCnt = 0;
if (retryCnt < maxRetryCnt) {
logger.trace("Retrying " + result.getName() + " again and the count is " + (retryCnt+1));
retryCnt++;
Expand Down
2 changes: 1 addition & 1 deletion jdi-light-html-tests/src/test/resources/common.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
arguments=--headless
# arguments=--headless
2 changes: 1 addition & 1 deletion jdi-light-html-tests/src/test/resources/functional.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="WINDOWS-1251"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="JDI-Light HTML Functional Tests" parallel="classes">
<suite name="JDI-Light HTML Functional Tests" parallel="methods">
<test name="Functional Tests" thread-count="6">
<packages>
<package name="io.github.epam.html.tests.elements.common"/>
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-html/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>jdi-light-html</artifactId>
<name>JDI Light Html Elements</name>
<packaging>jar</packaging>
<version>1.3.9</version>
<version>1.3.10</version>
<groupId>com.epam.jdi</groupId>

<properties>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.epam.jdi</groupId>
<artifactId>jdi-light</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions jdi-light-mobile-bootstrap-web-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<version>1.3.9</version>
<version>1.3.10</version>
<artifactId>jdi-light-mobile-bootstrap-web-tests</artifactId>
<name>Tests: JDI Mobile Bootstrap Web tests</name>
<groupId>com.epam.jdi</groupId>
Expand All @@ -17,7 +17,7 @@
<allure.maven>2.10.0</allure.maven>
<jetty.version>9.4.12.RC2</jetty.version>
<aspectj.version>1.9.6</aspectj.version>
<jdi.version>1.3.9</jdi.version>
<jdi.version>1.3.10</jdi.version>
<suite.xml.file>src/test/resources/demoRun.xml</suite.xml.file>
<suite.xml.file>src/test/resources/general.xml</suite.xml.file>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions jdi-light-mobile-html-web-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<version>1.3.9</version>
<version>1.3.10</version>
<artifactId>jdi-light-mobile-html-web-tests</artifactId>
<name>Tests: JDI Mobile HTML Web</name>
<groupId>com.epam.jdi</groupId>
Expand All @@ -17,7 +17,7 @@
<allure.maven>2.10.0</allure.maven>
<jetty.version>9.4.12.RC2</jetty.version>
<aspectj.version>1.9.6</aspectj.version>
<jdi.version>1.3.9</jdi.version>
<jdi.version>1.3.10</jdi.version>
<suite.xml.file>src/test/resources/demoRun.xml</suite.xml.file>
<suite.xml.file>src/test/resources/general.xml</suite.xml.file>
</properties>
Expand Down
Loading

0 comments on commit 20a60bf

Please sign in to comment.