Currently test results are stored in app data folder and when tests are clearing app data between each test than old test results are also cleared. This PR is adding TestStorageResultsWriter that is using new TestStorage api from androidx.test.services. TestStorage is saving files into /sdcard/googletest so the results are not deleted when app data is cleared. TestStorage is marked as experimental API thats why I added new allure.results.useTestStorage property to enable this feature if needed.
Additionally I made some improvements so the library users could easily override default TestResultWriter used by AllureAndroidLifecycle if needed (when I was working on this solution I needed to copy all runner code to just override TestResultWriter).
Context
Currently test results are stored in app data folder and when tests are clearing app data between each test than old test results are also cleared. This PR is adding TestStorageResultsWriter that is using new TestStorage api from androidx.test.services. TestStorage is saving files into /sdcard/googletest so the results are not deleted when app data is cleared. TestStorage is marked as experimental API thats why I added new
allure.results.useTestStorage
property to enable this feature if needed. Additionally I made some improvements so the library users could easily override default TestResultWriter used by AllureAndroidLifecycle if needed (when I was working on this solution I needed to copy all runner code to just override TestResultWriter).Checklist