Skip to content

Commit

Permalink
Add document about default unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom authored Jul 14, 2023
1 parent c7bc7e2 commit 43242d6
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,22 @@ apply plugin: "io.github.takahirom.roborazzi"

<table>
<tr>
<td> Gradle Command </td> <td> Description </td>
<td> Use Roborazzi task </td> <td> Use default unit test task </td> <td> Description </td>
</tr>
<tr>
<td>

```sh
./gradlew recordRoborazziDebug
```
`./gradlew recordRoborazziDebug`


</td><td>

`./gradlew testDebugUnitTest` after adding `roborazzi.test.record=true` to your gradle.properties file.

or

`./gradlew testDebugUnitTest -Proborazzi.test.record=true`


</td><td>

Expand All @@ -124,9 +132,16 @@ Record a screenshot
<tr>
<td>

```sh
./gradlew compareRoborazziDebug
```
`./gradlew compareRoborazziDebug`

</td><td>


`./gradlew testDebugUnitTest` after adding `roborazzi.test.compare=true` to your gradle.properties file.

or

`./gradlew testDebugUnitTest -Proborazzi.test.compare=true`

</td><td>

Expand All @@ -144,6 +159,15 @@ be found under `build/test-results/roborazzi`.
./gradlew verifyRoborazziDebug
```

</td><td>


`./gradlew testDebugUnitTest` after adding `roborazzi.test.verify=true` to your gradle.properties file.

or

`./gradlew testDebugUnitTest -Proborazzi.test.verify=true`

</td><td>

Validate changes made to an image. If there is any difference between the current image and the
Expand All @@ -158,6 +182,15 @@ saved one, the test will fail.
./gradlew verifyAndRecordRoborazziDebug
```

</td><td>


`./gradlew testDebugUnitTest` after adding `roborazzi.test.verify=true` and `roborazzi.test.record=true` to your gradle.properties file.

or

`./gradlew testDebugUnitTest -Proborazzi.test.verify=true -Proborazzi.test.record=true`

</td><td>

This task will first verify the images and, if differences are detected, it will record a new
Expand Down

0 comments on commit 43242d6

Please sign in to comment.