Creating a Robolectric project from scratch with ant
I’m still trying to figure out this Android unit testing madness and this time I was finally able to create a Robolectric project without any IDE. Now that I know the steps it doesn’t seem so hard, but it was a long process trying to gather all the information necessary to make this work.
The first thing we need is to create a folder inside our android project. I’ll call mine tests. This is going to be the folder where we will include everything related to our Robolectric tests. The next step is to create a build.xml file so we can build our project with ant: