Questions tagged [robospock]

RoboSpock is an Android testing framework which brings Spockframework (modern groovy test framework) to Android applications. It lets to run blazing fast unit tests on JVM without any need for starting an emulator or making any deployments. It ties together Robolectric and Spock.

RoboSpock is an Android testing framework which brings Spockframework (modern groovy test framework) to Android applications. It lets to run blazing fast unit tests on JVM without any need for starting an emulator or making any deployments. It ties together Robolectric and Spock.

10 questions
18
votes
2 answers

Unit testing creating an SQLite database using Spock and Robospock

spock-core:0.7-groovy-2.0 robospock:0.5.0 Android Studio 0.8.2 Fedora release 20 (Heisenbug) This is the complete solution. Now it compiles and runs the unit test successfully, and the directory structure is the same as the preview edit. Please…
ant2009
  • 27,094
  • 154
  • 411
  • 609
3
votes
2 answers

Robospock initializationError NoSuchMethodError with Android Studio 3.0

I am unable to get a new Robospock specification to run in Android Studio 3.0 beta 6 and gradle 3.4.1. The error I get when I run the test in Android Studio is: java.lang.NoSuchMethodError:…
Farrukh Najmi
  • 5,055
  • 3
  • 35
  • 54
2
votes
1 answer

How To Include Transitive Dependencies

I have 2 gradle projects: an Android app and a RoboSpock test. My build.gradle for the Android app has . . . dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile ('com.actionbarsherlock:actionbarsherlock:4.4.0@aar') { …
Brad Rhoads
  • 1,828
  • 3
  • 29
  • 52
1
vote
0 answers

How to unit test Retrofit 2.0 api calls along with EventBus with robospock?

Can anyone help me unit testing api calls using retrofit 2.0 and eventBus for managing the response from the api, Specifically using Robospock public boolean login(String username, String password) { Retrofit retrofit = new Retrofit.Builder() …
1
vote
1 answer

Need help setting up RoboSpock

I want to use RoboSpock for Testing my android apps, but I am stuck setting up my project. I created an example project which I have added to github. https://github.com/DerSchimi/RoboSpockExample This project contains a folder called AppLibrary…
user40369
  • 130
  • 8
1
vote
1 answer

Actionbar Sherlock Not Found in Test Build Script

I have 2 gradle.build scripts, one for my app and one for my test. The app has a dependency on actionbarsherlock as follows: dependencies { compile project(':shared-jars') compile ('com.actionbarsherlock:actionbarsherlock:4.4.0@aar') { …
Brad Rhoads
  • 1,828
  • 3
  • 29
  • 52
1
vote
0 answers

Robospock and gradle build variants?

I'm using Robospock to perform unit testing and mocking with gradle. This worked great until I added gradle build variants to the mix. My android build.gradle file: apply plugin: 'android-library' android { compileSdkVersion 19 …
0
votes
1 answer

Gradle: Failed to apply plugin [id 'groovy']

When applying my own custom plugin which in turn applies groovy (plugin), it fails with Failed to apply plugin [id 'groovy'] which is caused by java.lang.IllegalStateException: model 'tasks' is finalized thrown from…
Centril
  • 2,549
  • 1
  • 22
  • 30
0
votes
0 answers

Gradle/Android: Use debug version of project for dependency

Background I'm trying to get robospock (roboelectric + spock-framework) to work as a work-around for the fact that the android gradle plugin is stupid and doesn't let me apply plugin: 'groovy'. However, robospock doesn't seem to work... I'm trying…
Centril
  • 2,549
  • 1
  • 22
  • 30
0
votes
0 answers

Could not find method include()

I'm trying to add in testing to my Android app via RoboSpock. I'm trying to model my project after their example. So I have the following structure to my project: src/ android/ src/org/myorg/myproject build.gradle …
Brad Rhoads
  • 1,828
  • 3
  • 29
  • 52