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

Support for multiple build variants #1

Closed
scompt opened this issue Oct 6, 2015 · 8 comments
Closed

Support for multiple build variants #1

scompt opened this issue Oct 6, 2015 · 8 comments

Comments

@scompt
Copy link

scompt commented Oct 6, 2015

Thanks for releasing this! I've been looking forward to taking a look at it.

My app has a bunch of build types and a couple build flavors yielding lots of different build variants. When I follow the docs to add your project and run a simple test, I get the following error:

$ ./gradlew screenshotTests

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':ExampleCompany:pullScreenshots'.
> Task with path ':packageDebugAndroidTest' not found in project ':ExampleCompany'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 12.355 sec

It looks like the plugin is trying to find the packageDebugAndroidTest task, which doesn't exist in my app. Instead, I would like to use the packagePlayInternalDebugAndroidTest task.

Looking around in the plugin, I found this, which suggests that I can configure the plugin like so:

screenshots {
    testApkTarget = 'packagePlayInternalDebugAndroidTest'
}

Even with this line, I get the same error. Any advice?

@tdrhq
Copy link
Contributor

tdrhq commented Oct 6, 2015

what command do you typically use to run your tests? I probably need to make this line customizable: https://github.com/facebook/screenshot-tests-for-android/blob/master/plugin/src/main/groovy/com/facebook/testing/screenshot/build/ScreenshotsPlugin.groovy#L72

@scompt
Copy link
Author

scompt commented Oct 6, 2015

what command do you typically use to run your tests?

connectedAndroidTest

@tdrhq
Copy link
Contributor

tdrhq commented Oct 6, 2015

ah, looks like I have a bug in https://github.com/facebook/screenshot-tests-for-android/blob/master/plugin/src/main/groovy/com/facebook/testing/screenshot/build/ScreenshotsPlugin.groovy#L17 where I'm reading the property before you get a chance to set it which kind of defeats the purpose. Let me fix this.

@tdrhq
Copy link
Contributor

tdrhq commented Oct 6, 2015

I landed a fix: 7b3e997

Would you be able to install the jars into a local maven to test this out? If it works, I'll deploy it as a new version early next week (will try to bundle it with other bugs)

@scompt
Copy link
Author

scompt commented Oct 6, 2015

Yep, that fixes it for me. At least it gets me to another error. I'll take a look at that tomorrow.

@tdrhq
Copy link
Contributor

tdrhq commented Oct 9, 2015

Still having issues? I'm closing this task out for now, but feel free to open another one for the new issues!

@tdrhq tdrhq closed this as completed Oct 9, 2015
@arpit130
Copy link

Please update it the plugin jar on Maven.

@tdrhq
Copy link
Contributor

tdrhq commented Oct 13, 2015

@arpit130, I have updated the jar on maven central and bumped the version to 0.2.2. Let me know if you find any issues

TimoPtr added a commit to TimoPtr/screenshot-tests-for-android that referenced this issue Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants