Skip to content

Commit 93fae37

Browse files
authored
minor updates
1 parent 9b401c6 commit 93fae37

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

README.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ More info about https://jitpack.io/
4141

4242
### Configuration
4343
In order to initialize VisualRegressionTracker, following options should be defined:
44-
* [**Required**] apiUrl - URL where backend is running. Example: "http://localhost:4200"
45-
* [**Required**] project - Project name or ID. Example: "003f5fcf-6c5f-4f1f-a99f-82a697711382"
46-
* [**Required**] apiKey - User apiKey. Example: "F5Z2H0H2SNMXZVHX0EA4YQM1MGDD"
47-
* [_Optional_] branch - Current git branch. Example: "develop"
48-
* [_Optional_] enableSoftAssert - Log errors instead of exceptions. Default value is false
49-
* [_Optional_] ciBuildId - id of the build in CI system
50-
* [_Optional_] httpTimeoutInSeconds - define http socket timeout in seconds. Default value is 10 seconds
44+
45+
* `apiUrl` (**Required**) - URL where backend is running. _Example_: "http://localhost:4200"
46+
* `project` (**Required**) - Project name or ID. _Example_: "003f5fcf-6c5f-4f1f-a99f-82a697711382"
47+
* `apiKey` (**Required**) - User apiKey. _Example_: "F5Z2H0H2SNMXZVHX0EA4YQM1MGDD"
48+
* `branch` (Optional) - Current git branch. _Example_: "develop"
49+
* `enableSoftAssert` (Optional) - Log errors instead of exceptions. Default value is false
50+
* `ciBuildId` (Optional) - id of the build in CI system
51+
* `httpTimeoutInSeconds` (Optional) - define http socket timeout in seconds. Default value is 10 seconds
5152

5253
There are a few ways to provide those options
5354

@@ -104,11 +105,11 @@ export VRT_HTTPTIMEOUTINSECONDS=15
104105

105106
> [!NOTE]
106107
> Final values, that will be used by VisualRegressionTracker, will be resolved as following:
107-
> 1. Check if it was provided while creating or building VisualRegressionTrackerConfig
108-
> 2. If not, try to find the environment variable
109-
> 3. Get it from the configuration file (if it exists)
110-
108+
> 1. If explicitly set while creating `VisualRegressionTrackerConfig` - use this value
109+
> 2. Use value from environment variable if it exists
110+
> 3. Try to get it from the configuration file
111111
112+
<br />
112113

113114

114115
### Create an instance of `VisualRegressionTracker`
@@ -126,13 +127,27 @@ VisualRegressionTracker visualRegressionTracker = new VisualRegressionTracker();
126127
> [!TIP]
127128
> If config is not provided explicitly, it will be created based on the environment variables or configuration file. Please see [Configuration](README.md#configuration) section
128129
130+
<br />
131+
132+
### Start `VisualRegressionTracker`
133+
134+
```java
135+
visualRegressionTracker.start();
136+
```
137+
138+
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.
139+
140+
<br />
141+
129142
### Take a screenshot as String in Base64 format
130143

131144
```java
132145
// Selenium example
133146
String screenshotBase64 = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);
134147
```
135148

149+
<br />
150+
136151
### Track image
137152

138153
Default options
@@ -158,3 +173,12 @@ visualRegressionTracker.track(
158173
.build()
159174
);
160175
```
176+
177+
178+
### Stop `VisualRegressionTracker`
179+
180+
```java
181+
visualRegressionTracker.stop();
182+
```
183+
184+
Should be called once current build should be considered as completed.

0 commit comments

Comments
 (0)