Is there a way to keep the generated temporary files by robolectric? #7124
Replies: 2 comments 2 replies
-
As I know, Robolectric don't have config to keep temporary files created by internal simulation, and remove it after using to avoid resource leaks(although those temporary files will removed by Linux automatically when they reach recycle state). If you want to analyze content of temporary files, maybe adding proper shadow APIs to exposure those data when running test for later usage, e.g. storing those data to files with your custom code for your need. Could you explain more about your analyzing area/occasion? Maybe we can discuss more about potential shadow APIs or other methods to meet your need instead of keeping temporary files. |
Beta Was this translation helpful? Give feedback.
-
@Pan-Gao there may be some workarounds
|
Beta Was this translation helpful? Give feedback.
-
I need to use temporary files to analyze a problem.
After running the test case, I found that the temporary files generated are automatically cleared。
Is there a way to keep the generated temporary files by robolectric?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions