[Android] Writing test into sdcard using TestStorage api #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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