diff --git a/README.md b/README.md index 8549eae5..367107ed 100644 --- a/README.md +++ b/README.md @@ -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. + ### LICENSE diff --git a/docs/topics/faq.md b/docs/topics/faq.md index 1e8348f5..f9434c08 100644 --- a/docs/topics/faq.md +++ b/docs/topics/faq.md @@ -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). \ No newline at end of file +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.