8

I am using soap ui 5.0.0 open source. I am running soapui testcases through ant to get the Junit report

build.xml:

<project basedir="." default="testreport" name="FCMRestAPIAutomation">
<target name="SoapUI">  
    <exec dir="." executable="C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\bin\testrunner.bat">
    <arg line="-r -j -o -f 'C:\Users\sn3020722\Desktop\Notification\New folder' -sFirstLoginTest 'C:\Users\sn3020722\Desktop\Notification\New folder\FCM Project.xml'"></arg>
</exec>
</target>
<target name="testreport" depends="SoapUI">
<junitreport todir="C:\Users\sn3020722\Desktop\Notification\New folder\API">
 <fileset dir="C:\Users\sn3020722\Desktop\Notification\New folder\API">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="C:\Users\sn3020722\Desktop\Notification\New folder\reports\html">
 </report>
 </junitreport>
 </target>
</project>  

Error in the command prompt:

SoapUI:
     [exec] Error: Could not create the Java Virtual Machine.
     [exec] Error occurred during initialization of VMError: A fatal exception h
as occurred. Program will exit.
     [exec]
     [exec] Could not reserve enough space for object heap
     [exec] Result: 1

testreport:
[junitreport] Processing C:\Users\sn3020722\Desktop\Notification\New folder\API\TESTS-TestSuites.xml to C:\Users\sn3020722\AppData\Local\Temp\null913190532
[junitreport] Loading stylesheet jar:file:/D:/eclipse/plugins/org.apache.ant_1.8
.3.v201301120609/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit
/xsl/junit-frames.xsl
[junitreport] Transform time: 312ms
[junitreport] Deleting: C:\Users\sn20722\AppData\Local\Temp\null913190532

I have added the following in the system environment variables.

_JAVA_OPTIONS: -Xmx2048MB

But still i am facing other issue that Soapui itself is not opened with the allotted space.. Any suggestion to workout the space issue..?

ChanGan
  • 4,254
  • 11
  • 74
  • 135
  • This means the vm can't allocate enough memory, ergo you do not have enough free physical memory (check top/task manager). Also: The _JAVA_OPTIONS environment variable will be picked up by any java process, I do not recommend to use those. – slowy Mar 23 '17 at 13:38
  • i do have enough physical memoery space,, – ChanGan Mar 23 '17 at 13:40
  • how you run your tests? Please show full command, with options. – user1516873 Mar 23 '17 at 14:17
  • i will go in to the path where my build.xml is there in command prompt and give ant so that it will look the build.xml and do the job – ChanGan Mar 24 '17 at 04:43
  • Did you read http://stackoverflow.com/questions/4401396/could-not-reserve-enough-space-for-object-heap ? (the issue might be 32-bit jvm) –  Mar 27 '17 at 05:21
  • What your system's configuration : 32bit or 64bit, windows, linux ... ? On windows 32bit, even if you have 4g of ram available, [the jvm can't allocate more than 1.6g](http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#gc_heap_32bit) . – Mohamed AMAZIRH Mar 27 '17 at 14:39
  • 64bit 8GB Ram.. windows.. – ChanGan Mar 28 '17 at 05:10
  • tried that already http://stackoverflow.com/questions/4401396/could-not-reserve-enough-space-for-object-heap.. but no luck – ChanGan Mar 28 '17 at 05:11
  • Are you sure that the jvm is also 64bit ? – Mohamed AMAZIRH Mar 28 '17 at 14:44

1 Answers1

2

After downloading the SoapUI 5.0.0 package for windows, I found out that in the file testrunner.bat there is a configuration at line 31 :

set JAVA_OPTS=-Xms128m -Xmx1024m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%\"

As you can see, the maximum memory parameter is set to 1024m (-Xmx1024m). Can you change it in your file to 2048m and try again.

Mohamed AMAZIRH
  • 1,159
  • 7
  • 26
  • 1
    I see in your question that you're using a 32bit SoapUI. So the testrunner.bat is probably using the jre shipped with soapui (C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\jre) which is 32bit. Can you add this line just before the line I mentioned in my answer : set JAVA=PATH_TO_64BIT_JAVA_EXECUTABLE – Mohamed AMAZIRH Mar 28 '17 at 14:50
  • I have updated in soapui.bat file which solves my issue. – ChanGan Mar 29 '17 at 06:50
  • Report comes as empty.. can you check that build.xml is correct? – ChanGan Mar 29 '17 at 06:51