Comments (8)
(I should preface this by saying that while I wrote all the gradle scripts here, I'm by no means a gradle expert so I might be wrong about what I'm going to say, but here goes:)
you need to set up both testApkTarget and connectedAndroidTestTarget. The first is the one that generates the APK, the second is the one that runs the tests on the devies. So it looks like the flavored target you listed should actually be the connectedAndroidTestTarget configuration.
In theory I should be able to figure out the testApkTarget from connectedAndroidTestTarget and simplify the configuration. I'll see if I can make that work somehow, but in the meantime can you try my suggestion and see if this works?
from screenshot-tests-for-android.
Got it now. I'd update your documentation to reflect that testApkTarget
needs to be "package" and the connectedAndroidTestTarget
needs to be "connected". I'm pretty sure this is only needed
because I'm using flavors. Having it automatically respect flavors would
also be nice.
On Thu, Dec 3, 2015 at 1:34 PM, Arnold Noronha [email protected]
wrote:
(I should preface this by saying that while I wrote all the gradle scripts
here, I'm by no means a gradle expert so I might be wrong about what I'm
going to say, but here goes:)you need to set up both testApkTarget and connectedAndroidTestTarget. The
first is the one that generates the APK, the second is the one that runs
the tests on the devies. So it looks like the flavored target you listed
should actually be the connectedAndroidTestTarget configuration.In theory I should be able to figure out the testApkTarget from
connectedAndroidTestTarget and simplify the configuration. I'll see if I
can make that work somehow, but in the meantime can you try my suggestion
and see if this works?—
Reply to this email directly or view it on GitHub
#17 (comment)
.
from screenshot-tests-for-android.
I also had to do this and it resolved my issue. Documentation around this would be incredibly helpful!
from screenshot-tests-for-android.
I've added documentation in The Gradle Setup wiki page, in the hopes of helping others.
from screenshot-tests-for-android.
I needed to do this
// This task reports the location of the Test APK generated by the build for use by Facebook Screenshot Tests
task packageDebugAndroidTest(dependsOn: 'assembleDebugTest') {
outputs.dir file("${buildDir}/outputs/apk").listFiles().findAll {it.name.contains('androidTest-unaligned')}
}
from screenshot-tests-for-android.
Having a similar problem related to flavors.
After the usual
gradlew :<mylibraryname>:screenshotTests
(note that this is a library project and 'mylibraryname' is just a dummy name)
I am getting a:
> Task with path 'packageDebugAndroidTest' not found in project ':<mylibraryname>'.
Instead there is a 'packageProductionDebugAndroidTest' defined task where 'Production' is a flavor.
Isn't there a way to pick that up automatically?
from screenshot-tests-for-android.
I facing with the same problem.
from screenshot-tests-for-android.
The rewrite generates tasks per flavor.
from screenshot-tests-for-android.
Related Issues (20)
- verifyDebugAndroidTestScreenshotTest:RuntimeError HOT 1
- java.lang.OutOfMemoryError: Failed to allocate a 8781536 byte allocation with 4981712 free bytes and 4MB until OOM, max allowed footprint 536870912, growth limit 536870912 at java.util.Arrays.copyOf(Arrays.java:3260) HOT 2
- Library forces arbitrarily small image width HOT 1
- Found 0 Screenshots
- Recording a single test deletes all other screenshots
- Fail to execute runDebugAndroidTestScreenshotTest due to syntax error HOT 1
- Add support to Kotlin DSL
- RunScreenshotTestTask doesn't support configuration cache
- Performance?
- Value error: Operation on closed image when recording/verifying screenshots HOT 2
- Can't record very large view inside ScrollView HOT 4
- Screenshot record fails because of --> "Accessibility content change on non-UI thread"
- Is it possible to hideout dynamic content on the screen before capturing screenshot HOT 1
- Is it possible to vertical scroll and capture full screen
- Incorrect accessibility actions checks in `AccessibilityUtil`
- How to run plugin tests (plugin:check)
- How to install all the artifacts to local maven repository
- plugin id 'com.facebook.testing.screenshot:plugin' version '0.14.0' apply false Fail for android DSL files
- Add SurfaceView support
- test failure: Is your sdcard directory read-only?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from screenshot-tests-for-android.