Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Writing test into sdcard using TestStorage api #69

Merged

Conversation

kamilwawrzyczek
Copy link
Contributor

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

@CLAassistant
Copy link

CLAassistant commented Mar 17, 2022

CLA assistant check
All committers have signed the CLA.

@viclovsky viclovsky added the type:new feature New feature or request label Mar 17, 2022
Copy link
Collaborator

@viclovsky viclovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@viclovsky viclovsky merged commit 16cc20b into allure-framework:master Mar 17, 2022
@mohamedwasiq
Copy link

This feature is not working for Emulators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants