Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1c053f8
Set up CI with Azure Pipelines
nithyamn Apr 10, 2023
752c6ce
Update azure-pipelines.yml for Azure Pipelines
nithyamn Apr 10, 2023
9e78b90
Update azure-pipelines.yml for Azure Pipelines
nithyamn Apr 10, 2023
8d9b470
Update azure-pipelines.yml for Azure Pipelines
nithyamn Apr 10, 2023
31dc5e5
Update azure-pipelines.yml for Azure Pipelines
nithyamn May 2, 2023
52402cb
Update azure-pipelines.yml for Azure Pipelines
nithyamn May 2, 2023
a4f5d7b
Update azure-pipelines.yml for Azure Pipelines
nithyamn May 2, 2023
2f4a701
Update azure-pipelines.yml for Azure Pipelines
nithyamn May 15, 2023
db12bd1
Update azure-pipelines.yml for Azure Pipelines
nithyamn May 15, 2023
210743a
few changes
nithyamn May 15, 2023
eedd6e7
Update azure-pipelines.yml for Azure Pipelines
nithyamn May 15, 2023
1c6e2f5
Update browserstack-web.yml
nithyamn May 15, 2023
44bc640
added more platforms
nithyamn Jun 6, 2023
2e141d3
added more platforms
nithyamn Jun 6, 2023
2c84cd8
added more platforms
nithyamn Jun 6, 2023
26af6e4
edit in azure yml
nithyamn Jun 6, 2023
2a2d05e
Set up CI with Azure Pipelines
nithyamn Jul 12, 2023
7d3353f
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
24962f7
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
cd4cec3
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
730615c
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
035c3c0
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
317aa35
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
0ea2b57
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
ac6b8db
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
5237262
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
098dd77
Update azure-pipelines.yml for Azure Pipelines
nithyamn Jul 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
pool:
vmImage: ubuntu-latest


steps:

- task: NodeTool@0
inputs:
versionSpec: '10.x'

# - task: CmdLine@2
# inputs:
# script: 'echo $BROWSERSTACK_BUILD_NAME'

# - bash: npm install uuid

# - task: JavaToolInstaller@0
# displayName: 'Use Java 11'
# inputs:
# versionSpec: 11
# jdkArchitectureOption: x64
# jdkSourceOption: PreInstalled

- task: BrowserStackConfig@0
inputs:
BrowserStackServiceEndPoint: 'bstack-conn'
browserstackLocal: false
- task: Maven@4
env:
# BROWSERSTACK_USERNAME:
# BROWSERSTACK_ACCESS_KEY:
# BROWSERSTACK_BUILD_NAME: $(System.TeamProject)-$(Build.DefinitionName)-$(Build.BuildNumber)
inputs:
mavenPomFile: 'pom.xml'
goals: 'test -P single_web -Dbrowserstack.config=browserstack-web.yml'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: false
# - task: BrowserStackResults@1
# inputs:
# browserstackProduct: 'automate'

- task: Gradle@3
inputs:
gradleWrapperFile: 'gradlew'
tasks: 'build'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
sqGradlePluginVersionChoice: 'specify'
14 changes: 13 additions & 1 deletion browserstack-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,19 @@ platforms:
- deviceName: iPhone 14
browserName: safari
osVersion: 16

- deviceName: Google Pixel 7
browserName: chrome
osVersion: 13.0
# - os: Windows
# osVersion: 10
# browserName: Edge
# browserVersion: latest
# - deviceName: Samsung Galaxy S22 Ultra
# browserName: chrome
# osVersion: 12.0
# - deviceName: iPhone 14
# browserName: safari
# osVersion: 16
# =======================
# Parallels per Platform
# =======================
Expand Down
153 changes: 80 additions & 73 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,33 @@
<maven.compiler.target>1.8</maven.compiler.target>
<surefire.version>3.0.0-M5</surefire.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>4.1.4</selenium.version>
<testng.version>7.4.0</testng.version>
<selenium.version>4.8.1</selenium.version>
<testng.version>7.6.1</testng.version>
<appium.version>8.3.0</appium.version>
<webdrivermanager.version>5.3.1</webdrivermanager.version>
<config.file>config/single.testng.xml</config.file>
</properties>

<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.6.0</version>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>4.6.0</version>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.7.1</version>
<version>${testng.version}</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>8.2.1</version>
<version>${appium.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand All @@ -53,76 +55,81 @@
<version>LATEST</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>${webdrivermanager.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>getClasspathFilenames</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<!-- <suiteXmlFiles>-->
<!-- <suiteXmlFile>${config.file}</suiteXmlFile>-->
<!-- </suiteXmlFiles>-->
<argLine>-javaagent:${com.browserstack:browserstack-java-sdk:jar}</argLine>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>local_web</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>config/local.testng.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>-javaagent:${com.browserstack:browserstack-java-sdk:jar}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>single_web</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${config.file}</suiteXmlFile>
</suiteXmlFiles>
<argLine>-javaagent:${com.browserstack:browserstack-java-sdk:jar}</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>getClasspathFilenames</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<!-- <suiteXmlFiles>-->
<!-- <suiteXmlFile>${config.file}</suiteXmlFile>-->
<!-- </suiteXmlFiles>-->
<argLine>-javaagent:${com.browserstack:browserstack-java-sdk:jar}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</build>

<profiles>
<profile>
<id>local_web</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>config/local.testng.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>-javaagent:${com.browserstack:browserstack-java-sdk:jar}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>single_web</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${config.file}</suiteXmlFile>
</suiteXmlFiles>
<argLine>-javaagent:${com.browserstack:browserstack-java-sdk:jar}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>single_ios</id>
<build>
Expand Down Expand Up @@ -191,5 +198,5 @@
</plugins>
</build>
</profile>
</profiles>
</profiles>
</project>
Binary file added res/selenium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/test/java/web/BaseTestWeb.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package web;
import io.github.bonigarcia.wdm.WebDriverManager;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.openqa.selenium.WebDriver;
Expand All @@ -14,9 +15,11 @@ public class BaseTestWeb {
@BeforeMethod(alwaysRun = true)
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
// options.addArguments("start-maximized");
options.addArguments("--remote-allow-origins=*");
driver = new ChromeDriver(options);
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
}

Expand Down