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

Could author write a tutorial about how to integrate RoboSpock to Android studio and how to run test cases #32

Open
androidhuoniao opened this issue Jan 9, 2015 · 12 comments
Labels

Comments

@androidhuoniao
Copy link

No description provided.

@aprofromindia
Copy link

+1, I have a fully working tutorial with Robolectric and a partially working one with Robospock here - http://aprorules.blogspot.de/2015/04/setting-up-bdd-with-robospockrobolectri.html

@pjakubczyk
Copy link
Member

great one but I see one thing. you just added the 3.0 dependency which means it overrides the 2.3 one. i am hesitating if this will work fine across all projects.

fiy i am working to get 3.0-r2 working gut still not ready

@pjakubczyk
Copy link
Member

The new sample is available in
https://github.com/Polidea/RoboSpock/tree/master/sample

@theScud
Copy link

theScud commented Jun 26, 2015

Hey so i went through the blog post and the provided example links , but am still having a hard time making sense of the process , i managed add the gradle pulgin and also understood the basic structure , but i'm still now sure on where i should define my testspec.groovy or how to run the test . ?

Also do you guys have anyone working on the documentation for this . i really like the frame work and would really like to contribute if nothing else then in the documentation atleast

@pjakubczyk
Copy link
Member

@theScud thanks for making me more verbose :)

the webpage robospock.org has been updated.

@pjakubczyk
Copy link
Member

@theScud
https://github.com/robospock/RoboSpock/tree/master/sample

I have added a small readme. Please don't hesitate to ask more question so I can extend it.

@theScud
Copy link

theScud commented Jul 2, 2015

LOL thanks for dumbing it down :P

@theScud
Copy link

theScud commented Jul 2, 2015

okay so i tried like you suggested but got this warning and a failed to execute result

Error:Gradle: Execution failed for task ':app:compileFlavorDebugUnitTestGroovy'.

no source files

cant make head or tail of this because i have a test spec in the groovy direcory

@pjakubczyk
Copy link
Member

Looks like no Spec was found in test directory. I remember that the groovy plugin must have at least 0.3.6 version.

Btw, do you have the sample online so I could take a look?

@pjakubczyk
Copy link
Member

@theScud still have problem ?

@viacheslavokolitiy
Copy link

Could author update RoboSpock library ? Android Studio 1.4.0 can't run unit tests, it seems this issue is related to similar robolectric issue. robolectric/robolectric#1936

But from console gradlew test throws an error, that robolectric doesn't support API 22 and API 23

@pjakubczyk
Copy link
Member

@viacheslavokolitiy it's matter of groovy plugin. Android gradle plugin is not always backward compatible and groovy team needs some time to adjust the changes.

Yes, robolectric doesn't support all APIs. The easiest way is to see the source code
https://github.com/robolectric/robolectric/blob/robolectric-3.0/robolectric/src/main/java/org/robolectric/internal/SdkConfig.java#L21

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

No branches or pull requests

5 participants