Using robolectric from IntelliJ causes OutOfMemory

78 views
Skip to first unread message

Chris Danson

unread,
Nov 12, 2012, 3:53:26 AM11/12/12
to robol...@googlegroups.com

I am trying to run a unit test from IntelliJ that uses Robolectric by following the example here ::http://pivotal.github.com/robolectric/intellij-quick-start.html Have added the Robolectric jar and a jar for Junit4. When the test runs I get an OutOfMemory. I suppose I need to add some vm args to the run configuration for specifying a larger heap size or something. The run config does not appear to have an option for adding vm args. Can anyone advise on this? Incidentally, the example I'm following suggests I use a Maven project. I am not doing this as I haven't needed Maven for anything before and don't see why I should now. (happy to be corrected on that)

Aaron VonderHaar

unread,
Nov 14, 2012, 1:03:10 AM11/14/12
to robol...@googlegroups.com
I just set up a new robolectric project yesterday and didn't run in to this.  You should be able to set the vm args in the run configuration in IntelliJ though.


On Mon, Nov 12, 2012 at 12:53 AM, Chris Danson <cjdan...@gmail.com> wrote:

I am trying to run a unit test from IntelliJ that uses Robolectric by following the example here ::http://pivotal.github.com/robolectric/intellij-quick-start.html Have added the Robolectric jar and a jar for Junit4. When the test runs I get an OutOfMemory. I suppose I need to add some vm args to the run configuration for specifying a larger heap size or something. The run config does not appear to have an option for adding vm args. Can anyone advise on this? Incidentally, the example I'm following suggests I use a Maven project. I am not doing this as I haven't needed Maven for anything before and don't see why I should now. (happy to be corrected on that)




--
--Aaron V.
[ http://github.com/avh4 ]

Chris Danson

unread,
Nov 14, 2012, 9:23:46 AM11/14/12
to robol...@googlegroups.com
Did you set up your project as a Maven project? I was trying to get it working with an existing project. Guess I'll try making two from scratch .One as Maven and one not.

Aaron VonderHaar

unread,
Nov 14, 2012, 9:42:39 PM11/14/12
to robol...@googlegroups.com
No, this was using ant instead of maven, but it was a new project, not an existing one.
Reply all
Reply to author
Forward
0 new messages