views:

37

answers:

2

I'm running testng from ant using the task. I'd really like to add the -server option to the forked jvm as well as specifying the amount of heap space. Anyone know how to do it?

I don't see anything here: http://testng.org/doc/ant.html

Thanks, Ben

A: 

You can run ant via java. This way you can specify -server and -Xms.

Daniel Moura
ant's jvm isn't the problem. You can specify those things in the ANT_OPTS env variable. The issue is that the testng task forks another jvm. It's that jvm that I would like to add these options to.
andersonbd1
+3  A: 

The link you posted specifies that you can pass JVM arguments with a <jvmarg value="blah"/> element. Have you tried this?

<testng>
    <jvmarg value="-server"/>
    <jvmarg value="-Xmx128m"/>
    ...
matt b
chalk another question up for me as, "I am an idiot". Thanks for spelling this out for me.
andersonbd1