| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
repositories {
maven { url 'https://jitpack.io' }
}dependencies {
implementation group: 'com.github.visual-regression-tracker', name: 'sdk-java', version: '${REPLACE_THIS_VALUE}'
}<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories><dependency>
<groupId>com.github.Visual-Regression-Tracker</groupId>
<artifactId>sdk-java</artifactId>
<version>${REPLACE_THIS_VALUE}</version>
</dependency>More info about https://jitpack.io/
In order to initialize VisualRegressionTracker, following options should be defined:
There are a few ways to provide those options
Create config with builderVisualRegressionTrackerConfig config = VisualRegressionTrackerConfig.builder()
.apiUrl("http://localhost:4200")
.apiKey("F5Z2H0H2SNMXZVHX0EA4YQM1MGDD")
.project("003f5fcf-6c5f-4f1f-a99f-82a697711382")
.enableSoftAssert(true)
.branchName("develop")
.build();export VRT_APIURL=http://localhost:4200 export VRT_APIKEY=F5Z2H0H2SNMXZVHX0EA4YQM1MGDD export VRT_PROJECT=003f5fcf-6c5f-4f1f-a99f-82a697711382 export VRT_BRANCHNAME=develop export VRT_ENABLESOFTASSERT=true export VRT_CIBUILDID=40bdba4 export VRT_HTTPTIMEOUTINSECONDS=15
{
"apiUrl": "[http://162.243.161.172:4200](http://localhost:4200)",
"project": "003f5fcf-6c5f-4f1f-a99f-82a697711382",
"apiKey": "F5Z2H0H2SNMXZVHX0EA4YQM1MGDD",
"branchName": "develop",
"enableSoftAssert": false,
"ciBuildId": "40bdba4"
}
Note
Final values, that will be used by VisualRegressionTracker, will be resolved as following:
VisualRegressionTracker visualRegressionTracker = new VisualRegressionTracker(config);or
VisualRegressionTracker visualRegressionTracker = new VisualRegressionTracker();Tip
If config is not provided explicitly, it will be created based on the environment variables or configuration file. Please see Configuration section
visualRegressionTracker.start();At that point VisualRegressionTracker will try to create a new build for provided project. All of the subsequent tracked screenshots are going to be included in that build.
// Selenium example
String screenshotBase64 = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);Default options
visualRegressionTracker.track(
"Name for test",
screenshotBase64
);With specific options
visualRegressionTracker.track(
"Name for test",
screenshotBase64,
TestRunOptions.builder()
.browser("Chrome")
.os("Windows")
.viewport("1200x800")
.diffTollerancePercent(3.0f)
.build()
);visualRegressionTracker.stop();Should be called once current build should be considered as completed.
| Back | FazBrowse Home | New Git URL |