Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ updates:
patterns:
- "*"

- package-ecosystem: docker-compose
directory: "/.github/vrt"
schedule:
interval: weekly
groups:
docker:
patterns:
- "*"

- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
33 changes: 33 additions & 0 deletions .github/vrt/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
services:
api:
image: visualregressiontracker/api:6.0.0-rc1
environment:
DATABASE_URL: postgresql://vrt:vrt@postgres:5432/vrt
JWT_SECRET: ci
APP_FRONTEND_URL: http://localhost:8080
BODY_PARSER_JSON_LIMIT: 5mb
ports:
- "4200:3000"
depends_on:
migration:
condition: service_completed_successfully
migration:
image: visualregressiontracker/migration:6.0.0-rc1
environment:
DATABASE_URL: postgresql://vrt:vrt@postgres:5432/vrt
DEFAULT_USER_EMAIL: visual-regression-tracker@example.com
DEFAULT_USER_PASSWORD: "123456"
DEFAULT_USER_API_KEY: DEFAULTUSERAPIKEYTOBECHANGED
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17
environment:
POSTGRES_USER: vrt
POSTGRES_PASSWORD: vrt
POSTGRES_DB: vrt
healthcheck:
test: ["CMD-SHELL", "pg_isready -d vrt -U vrt"]
interval: 2s
retries: 30
43 changes: 40 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,25 @@ jobs:
strategy:
fail-fast: false
matrix:
example: [appium-maven, jdi-light-testng, playwright, selenium-maven, standalone-from-folder-maven]
example: [jdi-light-testng, playwright, selenium-maven]
defaults:
run:
working-directory: ${{ matrix.example }}
steps:
- uses: actions/checkout@v7
- name: Start Visual Regression Tracker
working-directory: .github/vrt
run: docker compose up -d --quiet-pull
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 17
java-version: ${{ matrix.example == 'jdi-light-testng' && 21 || 17 }}
cache: maven
cache-dependency-path: ${{ matrix.example }}/pom.xml
- run: mvn -B test-compile
working-directory: ${{ matrix.example }}
- name: Wait for Visual Regression Tracker
run: timeout 180 bash -c 'until curl -s -o /dev/null http://localhost:4200; do sleep 2; done'
- run: mvn -B test

gradle:
name: ${{ matrix.example }}
Expand All @@ -38,12 +46,41 @@ jobs:
fail-fast: false
matrix:
example: [allure-junit5-gradle-kts, selenide-gradle]
defaults:
run:
working-directory: ${{ matrix.example }}
steps:
- uses: actions/checkout@v7
- name: Start Visual Regression Tracker
working-directory: .github/vrt
run: docker compose up -d --quiet-pull
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v6
- run: ./gradlew testClasses
- name: Wait for Visual Regression Tracker
run: timeout 180 bash -c 'until curl -s -o /dev/null http://localhost:4200; do sleep 2; done'
- run: ./gradlew test

# Appium needs an iOS simulator and the standalone client a folder of images, so CI only compiles them.
compile:
name: ${{ matrix.example }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example: [appium-maven, standalone-from-folder-maven]
defaults:
run:
working-directory: ${{ matrix.example }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 17
cache: maven
cache-dependency-path: ${{ matrix.example }}/pom.xml
- run: mvn -B test-compile
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Visual Regression Tracker examples for Java

Each folder is a separate project on [sdk-java](https://github.com/Visual-Regression-Tracker/sdk-java) 5.5.0 from JitPack (Java 17):
Each folder is a separate project on [sdk-java](https://github.com/Visual-Regression-Tracker/sdk-java) 5.5.0 from JitPack (Java 17; JDI Light needs Java 21):

- [Playwright + Maven + JUnit 4](playwright)
- [Selenium 4 + Maven + JUnit 4](selenium-maven)
Expand Down
1 change: 0 additions & 1 deletion allure-junit5-gradle-kts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ dependencies {

tasks.test {
useJUnitPlatform()
ignoreFailures = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.io.InputStream;
import java.net.URI;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

public class AllureImageDiffTest {

Expand Down Expand Up @@ -72,6 +72,6 @@ public void imageDiffExample() throws IOException, InterruptedException {
attachScreenshotToAllureReport(result.getImageUrl(), "actual");
attachScreenshotToAllureReport(result.getBaselineUrl(), "expected");
attachScreenshotToAllureReport(result.getDiffUrl(), "diff");
assertEquals(TestRunStatus.OK, result.getTestRunResponse().getStatus());
assertNotEquals(TestRunStatus.UNRESOLVED, result.getTestRunResponse().getStatus());
}
}
6 changes: 1 addition & 5 deletions jdi-light-testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<driver>chrome</driver>
<!--driver>firefox</driver-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.release>21</maven.compiler.release>
<aspectj.version>1.9.26</aspectj.version>
<domain>https://jdi-testing.github.io/jdi-light/</domain>
<allure.testng>2.35.5</allure.testng>
Expand Down Expand Up @@ -71,10 +71,6 @@
<systemPropertyVariables>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
</systemPropertyVariables>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/general.xml</suiteXmlFile>
</suiteXmlFiles>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.mytests.tests.testng.RetryListenerClass
13 changes: 0 additions & 13 deletions jdi-light-testng/src/test/resources/general.xml

This file was deleted.

Loading