Got Robolectric all set up in Eclipse and it works great, but I'm
having a tough time figuring out how to share a Robolectric test
project with a team via Git, or integrate it into a Jenkins CI
process. It was for this reason that I decided to ditch Robolectric in
favor of emulated tests at my last gig, but I'd really like to figure
out how to make it work.
Obviously there are a lot of configurable parts in Robolectric
(location of Android and Maps jars, the launch configuration, the
linking of the test folder between the main project and the test
project, etc...).
We're not using Maven, and have no interest in using Maven.
Any suggestions? I committed the Eclipse launch configuration file to
Git, but there are still dependencies on on the .jar file paths, and
the linked projects "test" folders are broken, because they too
require specific file paths. I haven't found any way to use
environment variables or anything for these things.
Can I use Ant to configure my launch configuration for both Eclipse
and Jenkins, even though we won't be using it to actually build our
APKs?
Justin, did you ever get a reply? We are confronting the exact same scenario. In particular, creating the Robolectric project as a Java project means we have to add the Android jars manually, which results in the non-relative path problem you also bumped up against.
I've never tried doing this in Eclipse, but it's a cinch in IntelliJ
because I just download AndroidIntelliJStarter (
https://github.com/pivotal/AndroidIntelliJStarter) and I can start writing
Robolectric tests in the test tree. You might download it and figure out
how to configure Eclipse to use it.
On Thu, Oct 25, 2012 at 2:49 PM, markyt <m...@cabulous.com> wrote:
> Justin, did you ever get a reply? We are confronting the exact same
> scenario. In particular, creating the Robolectric project as a Java project
> means we have to add the Android jars manually, which results in the
> non-relative path problem you also bumped up against.
On Tuesday, March 6, 2012 2:00:51 AM UTC+2, Justin wrote:
> Hey All,
> Got Robolectric all set up in Eclipse and it works great, but I'm > having a tough time figuring out how to share a Robolectric test > project with a team via Git, or integrate it into a Jenkins CI > process. It was for this reason that I decided to ditch Robolectric in > favor of emulated tests at my last gig, but I'd really like to figure > out how to make it work.
> Obviously there are a lot of configurable parts in Robolectric > (location of Android and Maps jars, the launch configuration, the > linking of the test folder between the main project and the test > project, etc...).
> We're not using Maven, and have no interest in using Maven.
> Any suggestions? I committed the Eclipse launch configuration file to > Git, but there are still dependencies on on the .jar file paths, and > the linked projects "test" folders are broken, because they too > require specific file paths. I haven't found any way to use > environment variables or anything for these things.
> Can I use Ant to configure my launch configuration for both Eclipse > and Jenkins, even though we won't be using it to actually build our > APKs?