Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Heap Space - Out of memory error When I run more than 1300 test cases using serenity with cucumber5 #2094

Closed
kreigy1310garg opened this issue May 19, 2020 · 13 comments

Comments

@kreigy1310garg
Copy link

Java Heap Space - Out of memory error When I run more than 1300 test cases using serenity with cucumber5. Even I have tried increasing heap space for jenkins to 6144M still issue persists.

I don't know how to get rid of this.

Attaching screenshot
Bug

@kreigy1310garg
Copy link
Author

I am doing rest api testing using serenity rest assured using 2.2.5 and 2.2.0 for serenity cucumber5

@globalworming
Copy link
Collaborator

you could use a profiler maybe.. to check what exactly is worth so much RAM
or try https://serenity-bdd.github.io/theserenitybook/latest/serenity-parallel-batches.html

@wakaleo
Copy link
Member

wakaleo commented May 19, 2020 via email

@globalworming
Copy link
Collaborator

and the usual answer is "maybe a version conflict"? :)

@globalworming
Copy link
Collaborator

I am doing rest api testing using serenity rest assured using 2.2.5 and 2.2.0 for serenity cucumber5

any reason you use different versions?

@kreigy1310garg
Copy link
Author

These versions are suggested by Serenity GITHUB for cucumber 5. Also I was getting this with cucumber 2 as well . Recently upgraded to cucumber 5.

@globalworming
Copy link
Collaborator

ah, ok. sorry, I am not very familiar with the cucumber part of serenity :)

@wakaleo
Copy link
Member

wakaleo commented May 20, 2020

I would need a sample project or access to your Jenkins environment (we can do this as part of our commercial support packages) - otherwise it will be hard to diagnose. As @globalworming suggested, I would suggest investigating with a profiler to see what objects and methods are taking the most memory.

@chnmdey1
Copy link

Hi @kreigy1310garg @wakaleo , is there any resolution to this. I am facing similar issue for my project.

@wakaleo
Copy link
Member

wakaleo commented Apr 27, 2021

Use a profiler to see what is using memory. If you can provide a sample project to reproduce the issue, that could help.

@wakaleo wakaleo closed this as completed Feb 12, 2022
@onlybiju
Copy link

onlybiju commented Mar 14, 2022

H Team and @wakaleo,
I am too getting this "Java Heap Space - Out of memory error". I have 100+ test cases that includes API and UI and takes around 8 to 9 hours to execute in sequence. During execution it gives me java heap memory error and at the end generates serenity report with 0 test cases on it. However I see all report related files under \target\site\serenity folder. Any help would be much appreciated.
I tried with below and updating serenity to 3.2.0 version, but that did not help.

-Xmx1024m

Attached my POM file for reference
pom.txt

Thanks a lot!
Brajesh

@wakaleo
Copy link
Member

wakaleo commented Mar 14, 2022

H Team and @wakaleo, I am too getting this "Java Heap Space - Out of memory error". I have 100+ test cases that includes API and UI and takes around 8 to 9 hours to execute in sequence. During execution it gives me java heap memory error and at the end generates serenity report with 0 test cases on it. However I see all report related files under \target\site\serenity folder. Any help would be much appreciated. I tried with below and updating serenity to 3.2.0 version, but that did not help. -Xmx1024m Attached my POM file for reference pom.txt

Thanks a lot! Brajesh

Can you provide a sample project that reproduces the issue? 100 test cases should take under a minute to generate the reports (though 8-9 hours of execution would indicate that they are very long/slow tests, that has no impact on the report generation). Short answer - without being able to reproduce the issue, I have no idea what this could be caused by, as I have never encountered it (and I have projects that run with over 3000 tests and generate the reports quickly without needing any additional memory).

@onlybiju
Copy link

Thanks for quick response @wakaleo, This is our internal company application unfortunately I would not be able to share the code.
I will try to use profiler and get the report. I will get back you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants