Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

How to pass fail-if-no-device-connected parameter? #142

Open
hram opened this issue Jan 12, 2017 · 4 comments
Open

How to pass fail-if-no-device-connected parameter? #142

hram opened this issue Jan 12, 2017 · 4 comments

Comments

@hram
Copy link

hram commented Jan 12, 2017

I'v run tests without any device or emulator connected.
In log I see '[SR.runTests] Executing instrumentation suite on 0 device(s).'
But build is success.
I can fail build if no devices connected.

@jainsahab
Copy link
Contributor

jainsahab commented Jan 19, 2017

spoon supports failIfNoDeviceConnected flag, to fail the build if no device is connected. You can use that flag.

spoon { failIfNoDeviceConnected = true }

@hram
Copy link
Author

hram commented Jan 19, 2017

Thank you
Before asking I am searching sources for string "fail-if-no-device-connected" but not found any.
Now I see that you set this parameter with SpoonRunner.Builder
I think will been useful explain all parameters in https://github.com/stanfy/spoon-gradle-plugin#usage

@hram
Copy link
Author

hram commented Jan 19, 2017

In my case

devices = ['4d00150fd84d4017']
ignoreFailures = true
failIfNoDeviceConnected = true

BUILD SUCCESSFUL but no one device is connected and no one test is runned

@roman-mazur
Copy link
Contributor

roman-mazur commented Feb 7, 2017

Sorry for a delayed response. It might be an issue with the spoon runner because in this case all the plugin does is just passing the flag.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants