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

HTML source code of screenshot webpages are downloaded #3095

Closed
kenny-la opened this issue Mar 21, 2023 · 12 comments
Closed

HTML source code of screenshot webpages are downloaded #3095

kenny-la opened this issue Mar 21, 2023 · 12 comments

Comments

@kenny-la
Copy link

kenny-la commented Mar 21, 2023

In response to https://github.com/SeleniumHQ/selenium/issues/11750 I updated serenity bdd from 3.2.0 to 3.6.7.

However, I noticed that now the VM that I use for running the tests is running out of memory quickly, as the reports now include the HTML source code of the webpages that are being tested.
These are saved as "pagesource[some-number].html" and take up to 4mb each.
This should be defaulted to false, and still happens when setting the option below in the serenity.properties.

serenity.store.html.source=false

@wakaleo
Copy link
Member

wakaleo commented Mar 21, 2023

HTML source code is not generated by default, except for test failures.

@wakaleo
Copy link
Member

wakaleo commented Mar 21, 2023

What makes you think the page source is related to memory consumption?

@kenny-la
Copy link
Author

Thank you for the speedy answer!

After updating serenity, the page source files were generated for each and every test regardless of test outcome.
Setting serenity.store.html.source=false wouldn't help, although that should be defaulted to false anyway if I read that correctly.

With 509 test cases this amounted to about 6gb of pagesource[0-9]*.html files which is too much to bear.

@ikallala
Copy link

I had the same problem and it was fixed by serenity.store.html=NEVER and serenity.generate.csv.reports=false

@kenny-la
Copy link
Author

Thanks, I tried it but unfortunately it's not working for me.

@wakaleo
Copy link
Member

wakaleo commented Mar 22, 2023

What is in your serenity.conf or serenity.properties file? HTML source is not generated by default in the most current versions of Serenity.

@kenny-la
Copy link
Author

I have nothing except for the following inside the serenity.properties.
serenity.store.html.source=NEVER
serenity.generate.csv.reports=false

I also tried putting them inside the systemVariables of the maven surefire plugin

@wakaleo
Copy link
Member

wakaleo commented Mar 22, 2023

Have you tried with the latest version? Serenity hasn't generated these files by default for some time.

Also, you talk about running out of memory - do you mean disk space? Because generating files of any kind should not affect the memory, so if you are running out of memory, it's probably a different issue.

@kenny-la
Copy link
Author

My mistake - I meant disk space.
I tried with the newest stable release 3.6.7, as well as 3.6.12 and 3.6.21 to no avail.
I am using it in combination with JUnit 4 if that makes any difference

@wakaleo
Copy link
Member

wakaleo commented Mar 22, 2023

Try:

serenity.store.html=NEVER

@kenny-la
Copy link
Author

Thanks a million for the help!

It seems to have solved the issue. I will check again tomorrow if any issues have come up but it looks good so far.

@kenny-la
Copy link
Author

I just realised my mistake of changing

serenity.store.html.source=false
to serenity.store.html.source=NEVER
rather than serenity.store.html=NEVER

although I have been given the correct answer yesterday already.
I need to have my glasses fixed.

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

3 participants