Skip to content

Commit

Permalink
Merge pull request #402 from sanao1006/add-FAQ-section-about-outOfMem…
Browse files Browse the repository at this point in the history
…ory-error

Add faq section about out of memory error
  • Loading branch information
takahirom authored Jun 9, 2024
2 parents 76c38e0 + 88c2c70 commit f6fda21
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,23 @@ You can specify the SDK version like `@Config(sdk = [33])` or by using `robolect
[https://robolectric.org/configuring/](https://robolectric.org/configuring/)
If your images are mostly fine but there are some drawing issues like shadows or shape graphics, you can try using Robolectric's Hardware Rendering mode. Please refer to [this issue](https://github.com/takahirom/roborazzi/issues/255#issuecomment-1972838571).
### Q: I am seeing Out Of Memory errors.
**A:** You may solve this by using `unitTests.maxHeapSize` to adjust the unit test heap size as follows:
```groovy
android {
...
testOptions {
unitTests.all {
maxHeapSize = "4096m"
}
}
}
```
It is discussed in [this issue](https://github.com/takahirom/roborazzi/issues/272).
Additionally, it might be worth trying to run your tests with VisualVM to monitor memory usage and identify potential leaks.
</div>
### LICENSE
Expand Down
18 changes: 17 additions & 1 deletion docs/topics/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,20 @@ To ensure more consistent results, consider configuring your continuous integrat
You can specify the SDK version like `@Config(sdk = [33])` or by using `robolectric.properties` with `sdk=33`.
[https://robolectric.org/configuring/](https://robolectric.org/configuring/)

If your images are mostly fine but there are some drawing issues like shadows or shape graphics, you can try using Robolectric's Hardware Rendering mode. Please refer to [this issue](https://github.com/takahirom/roborazzi/issues/255#issuecomment-1972838571).
If your images are mostly fine but there are some drawing issues like shadows or shape graphics, you can try using Robolectric's Hardware Rendering mode. Please refer to [this issue](https://github.com/takahirom/roborazzi/issues/255#issuecomment-1972838571).

### Q: I am seeing Out Of Memory errors.

**A:** You may solve this by using `unitTests.maxHeapSize` to adjust the unit test heap size as follows:
```groovy
android {
...
testOptions {
unitTests.all {
maxHeapSize = "4096m"
}
}
}
```
It is discussed in [this issue](https://github.com/takahirom/roborazzi/issues/272).
Additionally, it might be worth trying to run your tests with VisualVM to monitor memory usage and identify potential leaks.

0 comments on commit f6fda21

Please sign in to comment.