xebia-functional / macroid-starter

A sample project to start playing with Macroid
http://macroid.github.io/
34 stars 18 forks source link

Is there a way to add tests to the project? #4

Open wpoosanguansit opened 10 years ago

wpoosanguansit commented 10 years ago

Hi, I am testing out Macroid which looks really interesting. So I am led to this starter project. However, I wonder how to add tests to the project? Could you please provide a configuration to have simple tests running? Thanks for your help and work.

stanch commented 10 years ago

Hi,

Do you mean on-device tests or Robolectric? The latter is going to be somewhat hard to configure (especially with ScalaTest). You can find instructions for both here: https://github.com/pfn/android-sdk-plugin. I’ll add some tests in this project when I have time.

wpoosanguansit commented 10 years ago

I have tried to follow the instruction in android-sdk-plugin but I am still having a hard time getting things to work. Also, I tried to run the project and I am still getting an error:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.google.android.gms#play-services;4.0.30: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.google.android.gms#play-services;4.0.30: not found

I am not sure if it is a temporary error on the server or if there needs to be a change in the configuration. Again, thank you for your help.

stanch commented 10 years ago

You need to have “Google Repository” and “Google Play Services” installed in the SDK manager, like this: http://macroid.github.io/ScalaOnAndroid.html#the-android-sdk. On the other hand, I’m not sure what play services are doing in this project in the first place... You can just remove that dependency. But if you need it later, see the link above.

wpoosanguansit commented 10 years ago

Got it! That resolves the issue. Thank you.

wpoosanguansit commented 10 years ago

Hi, I hope you don't mind I follow up with you to find out if you have got any chance to get tests setup for the project at all. Thank you for your help.