加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 无法保留堆空间

发布时间:2020-12-15 00:39:50 所属栏目:Java 来源:网络整理
导读:我正在使用soap ui 5.0.0开源.我正在通过ant运行soapui testcases来获取Junit报告 build.xml文件: project basedir="." default="testreport" name="FCMRestAPIAutomation"target name="SoapUI" exec dir="." executable="C:Program Files (x86)SmartBear
我正在使用soap ui 5.0.0开源.我正在通过ant运行soapui testcases来获取Junit报告

build.xml文件:

<project basedir="." default="testreport" name="FCMRestAPIAutomation">
<target name="SoapUI">  
    <exec dir="." executable="C:Program Files (x86)SmartBearSoapUI-5.0.0bintestrunner.bat">
    <arg line="-r -j -o -f 'C:Userssn3020722DesktopNotificationNew folder' -sFirstLoginTest 'C:Userssn3020722DesktopNotificationNew folderFCM Project.xml'"></arg>
</exec>
</target>
<target name="testreport" depends="SoapUI">
<junitreport todir="C:Userssn3020722DesktopNotificationNew folderAPI">
 <fileset dir="C:Userssn3020722DesktopNotificationNew folderAPI">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="C:Userssn3020722DesktopNotificationNew folderreportshtml">
 </report>
 </junitreport>
 </target>
</project>

命令提示符出错:

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:Userssn3020722DesktopNotificationNew folderAPITESTS-TestSuites.xml to C:Userssn3020722AppDataLocalTempnull913190532
[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:Userssn20722AppDataLocalTempnull913190532

我在系统环境变量中添加了以下内容.

_JAVA_OPTIONS: -Xmx2048MB

但是我仍然面临着其他问题,Soapui本身并没有在分配的空间中打开..任何建议来解决空间问题..?

解决方法

下载了适用于Windows的SoapUI 5.0.0软件包之后,我发现在文件testrunner.bat中有第31行的配置:
set JAVA_OPTS=-Xms128m -Xmx1024m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%"

如您所见,最大内存参数设置为1024m(-Xmx1024m).你能在你的文件中将其更改为2048米并再试一次.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读