java.lang.OutOfMemoryError with the HTML Reporter

185 views
Skip to first unread message

SUBRAMANYESWARA RAO BHAVIRISETTY

unread,
May 19, 2014, 2:30:08 PM5/19/14
to testng-users
Hi,

I am getting the following exception when I am trying to run tests
using maven surefire plugin. We have around 400+ tests. Test execution
seems to be fine but report generation using html reporter seems to
have issues.

I am using maven-surefire-plugin 2.9 and testng-6.8.8. Also, I am
having the following JVM settings:

-Xms512m -Xmx1024m


org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.reflect.InvocationTargetException; nested exception is
java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
at java.lang.StringBuffer.append(StringBuffer.java:237)
at org.testng.reporters.SuiteHTMLReporter.generateReporterOutput(SuiteHTMLReporter.java:204)
at org.testng.reporters.SuiteHTMLReporter.generateReport(SuiteHTMLReporter.java:75)
at org.testng.TestNG.generateReports(TestNG.java:1115)
at org.testng.TestNG.run(TestNG.java:1074)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
... 9 more

Can anyone please let me know if you have seen this issue before? If
yes, can you please let me know to resolve this issue?

--
Subramanyam

Manoj Kapuganti

unread,
May 22, 2014, 6:19:36 AM5/22/14
to testng...@googlegroups.com
Hello Subramanyam,

Just increase -Xmx depending on your RAM, if you have 4 GB RAM, you can increase this value upto 2800

Put -Xmx3000m

~Manoj Kapuganti

SUBRAMANYESWARA RAO BHAVIRISETTY

unread,
May 22, 2014, 12:57:01 PM5/22/14
to testng-users
Thanks Manoj. I will try increasing the memory.
I was looking through this link https://github.com/cbeust/testng/issues/291 and it says that the issue has been solved in

... TestNG 6.9beta 20121111_2208

But I am not able to find testng-6.9 in the maven repo. 

Am I missing anything here?

~Subramanyam



--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Subramanyam

Cédric Beust ♔

unread,
May 22, 2014, 12:59:32 PM5/22/14
to testng...@googlegroups.com
It's a beta, it can't be in the Maven depot. You'll have to build TestNG from the source if you want to try it.


-- 
Cédric

Manoj Kapuganti

unread,
May 29, 2014, 2:32:42 AM5/29/14
to testng...@googlegroups.com, ced...@beust.com
Please use steps as in below URL to build TestNG


~Manoj Kapuganti

sashidh...@gmail.com

unread,
May 29, 2014, 6:08:08 AM5/29/14
to Manoj Kapuganti
‎Hey Manoj,

It's really good that you are active on forums and sharing knowledge.

Sent from my BlackBerry 10 smartphone on the TELUS network.
From: Manoj Kapuganti
Sent: Thursday, May 29, 2014 2:32 AM
Subject: Re: [testng-users] Re: java.lang.OutOfMemoryError with the HTML Reporter
Reply all
Reply to author
Forward
0 new messages