Skip to content

Commit d472b46

Browse files
committed
update
1 parent 20dc5e6 commit d472b46

File tree

8 files changed

+23
-19
lines changed

8 files changed

+23
-19
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ out
1414
*.ipr
1515
*.iws
1616
*.iml
17-
atlassian-ide-plugin.xml
17+
atlassian-ide-plugin.xml
18+
19+
report

build.gradle

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,34 @@ repositories {
99
mavenCentral()
1010
}
1111

12+
13+
java {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
1218
dependencies {
1319
implementation 'org.aeonbits.owner:owner:1.0.12'
14-
implementation 'com.aventstack:extentreports:5.0.9'
1520
implementation 'com.univocity:univocity-parsers:2.9.1'
16-
implementation 'com.microsoft.playwright:playwright:1.28.1'
21+
implementation 'com.aventstack:extentreports:5.0.9'
22+
implementation 'com.microsoft.playwright:playwright:1.31.0'
1723
implementation 'org.slf4j:slf4j-api:2.0.6'
1824

19-
testCompileOnly 'org.projectlombok:lombok:1.18.24'
20-
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
25+
testCompileOnly 'org.projectlombok:lombok:1.18.26'
26+
testAnnotationProcessor 'org.projectlombok:lombok:1.18.26'
2127

22-
testImplementation 'org.testng:testng:7.7.0'
28+
testImplementation 'org.testng:testng:7.7.1'
2329
testImplementation 'org.slf4j:slf4j-simple:2.0.6'
2430
}
2531

2632
test {
2733
systemProperties = System.getProperties() as Map<String, ?>
2834
def groups = System.getProperty('groups', 'regression')
35+
def thread = System.getProperty('thread', '5')
2936

3037
useTestNG() {
3138
includeGroups groups
39+
parallel 'classes'
40+
threadCount thread as int
3241
}
3342
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/test/java/io/github/tahanima/browser/BrowserManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.microsoft.playwright.Browser;
44
import com.microsoft.playwright.Playwright;
5-
import io.github.tahanima.browser.BrowserFactory;
65

76
import static io.github.tahanima.config.ConfigurationManager.configuration;
87

src/test/java/io/github/tahanima/config/Configuration.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
package io.github.tahanima.config;
22

33
import org.aeonbits.owner.Config;
4+
import org.aeonbits.owner.Config.LoadPolicy;
5+
import org.aeonbits.owner.Config.Sources;
46

57
/**
68
* Mapping interface for the global parameters contained within config.properties file.
79
*
810
* @author tahanima
911
*/
10-
@Config.LoadPolicy(Config.LoadType.MERGE)
11-
@Config.Sources({"system:properties", "classpath:config.properties"})
12+
@LoadPolicy(Config.LoadType.MERGE)
13+
@Sources({"system:properties", "classpath:config.properties"})
1214
public interface Configuration extends Config {
1315
/**
1416
* @return a string containing the browser name

src/test/java/io/github/tahanima/config/ConfigurationManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.github.tahanima.config;
22

3-
import io.github.tahanima.config.Configuration;
43
import org.aeonbits.owner.ConfigCache;
54

65
/**

src/test/java/io/github/tahanima/e2e/BaseE2ETest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
* @author tahanima
1717
*/
1818
@Listeners(TestListener.class)
19-
public abstract class BaseE2ETest {
19+
public class BaseE2ETest {
2020
protected Playwright playwright;
2121
protected Browser browser;
2222
protected BrowserContext browserContext;
2323
protected Page page;
2424

25-
public abstract void initialize();
26-
2725
protected <T extends BasePage> T createInstance(Class<T> basePage) {
2826
return BasePageFactory.createInstance(page, basePage);
2927
}
@@ -32,8 +30,6 @@ protected <T extends BasePage> T createInstance(Class<T> basePage) {
3230
public void setup() {
3331
playwright = Playwright.create();
3432
browser = BrowserManager.browser(playwright);
35-
36-
initialize();
3733
}
3834

3935
@AfterClass(alwaysRun = true)

src/test/java/io/github/tahanima/e2e/login/LoginE2ETest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ public void captureScreenshotOnFailureAndCloseBrowserContext(ITestResult result)
4747
browserContext.close();
4848
}
4949

50-
@Override
51-
public void initialize() {}
52-
5350
@Test(
5451
testName = "TC-1",
5552
dataProvider = "loginData",

0 commit comments

Comments
 (0)