junitreport ant 任务给出 java.lang.OutOfMemoryError: Java heap space [英] junitreport ant task giving java.lang.OutOfMemoryError: Java heap space
问题描述
我正在从 ant 脚本运行 junit 测试.测试成功运行,因此 ant 继续执行 junitreport 任务以创建 html 报告.此任务失败,出现 java.lang.OutOfMemoryError: Java heap space error
.
I'm running junit tests from an ant script. The tests run successfully so ant moves on to the the junitreport task to create the html report. This task is failing with a java.lang.OutOfMemoryError: Java heap space error
.
如何增加此任务的堆大小?或者有其他方法可以解决这个错误吗?
How can I increase the heap size for this task? Or is there another way to resolve this error?
一些附加信息:
它运行良好,直到我添加了 40 个额外的测试
It was working fine until I added 40 additional tests
我查看了测试的 xml 输出,它看起来很合理,即它没有充满冗长的错误消息.
I've had a look at the xml output of the tests and it looks reasonable i.e. it's not full of long error messages.
推荐答案
你可以使用ANT_OPTS环境变量来增加ant使用的堆大小
you can use the ANT_OPTS environment variable to increase the heap size ant uses
这篇关于junitreport ant 任务给出 java.lang.OutOfMemoryError: Java heap space的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!