File manipulation is now abstracted through the new Destination interface. This allows Testify to implement various alternative file output locations. The existing data/data and sdcard output destinations have been ported to the new interface. This allows for future destinations to be easily supported in the future. This change is backwards compatible.
The Testify Gradle Plugin can now write to AndroidManifest placeholder values in the target application. This means that custom attributes defined in build.gradle are now visible to the Library code. So, advanced configuration options can now be set in the build.gradle file and used by any Library code. In this PR, I have used this feature to pass the useSdCard configuration option to the Library and also to pass the current Gradle module name.
📔 In addition, a small refactoring to ErrorCause was made to support the two new exceptions added
Scope of Impact and Testing instructions
ScreenshotTest and Reporter now use the Destination interface. This should not affect users of Testify, but does impact developers and those who wish to subclass Testify classes.
The tests have been updated to reflect these changes.
Notice
Warning
This change must keep main in a shippable state; it may be shipped without further notice.
What does this change accomplish?
Prerequisite for #148
How have you achieved it?
This PR introduces two core changes:
Destination
interface. This allows Testify to implement various alternative file output locations. The existingdata/data
andsdcard
output destinations have been ported to the new interface. This allows for future destinations to be easily supported in the future. This change is backwards compatible.build.gradle
are now visible to the Library code. So, advanced configuration options can now be set in thebuild.gradle
file and used by any Library code. In this PR, I have used this feature to pass theuseSdCard
configuration option to the Library and also to pass the current Gradle module name.📔 In addition, a small refactoring to
ErrorCause
was made to support the two new exceptions addedScope of Impact and Testing instructions
ScreenshotTest
andReporter
now use theDestination
interface. This should not affect users of Testify, but does impact developers and those who wish to subclass Testify classes.Notice