sitespeed.io
sitespeed.io copied to clipboard
Sitespeed Test HTML Report is getting crashed when the test run got failed intermittently
Hi Team,
We were trying to execute a complex test script which has many transactions. During the run, if the test fails intermittently, entire HTML report is getting crashed and we were not able to retrieve the results of completed transactions. If there is any workaround to retrieve the completed transaction results in HTML report, it will help us analyze and debug client side metrics for those transactions.
Kindly share if there is any alternate solution for this requirement.
Hi @prithivi96 I think the best way is to use try/catch in your script so you can catch when your script fails and do an alternate route.
Hi @soulgalore As suggested, I handled using try/catch and now report is getting generated even when script fails. But during one of final execution, few errors we are not able to capture using the try/catch and report is getting crashed though all the transaction got completed successfully.
Kindly help to resolve this issue.
Tool Configuration:
Executed using npm module

Problem: The following Browsertime TypeError was thrown at the end even after successful completion of the execution. We are not able to capture this error in try/catch, so the report is crashed and no metrics were found in the report.

Report Screenshot:

Now there are exceptions in some scenarios that cannot be caught at all, such as when the logic of accessing the browser page code is blocked until it crashes or some logic of sitespeed initialization is abnormal. . This should have a timeout mechanism to end the measurement directly. . Otherwise, some have set up multiple measurements now, each time they have to wait until they crash, and a scene may take more than half an hour
@linqunhe can you share an example where it not work? There are timeouts for browser interaction:
--browsertime.timeouts.browserStart Timeout when waiting for browser to start, in milliseconds
--browsertime.timeouts.pageLoad Timeout when waiting for url to load in milliseconds
--browsertime.timeouts.script Timeout when running browser script in milliseconds
--browsertime.timeouts.pageCompleteCheck Timeout when waiting for page to complete loading
What I know will crash is if NodeJS runs out of memory but that is hard to catch.
I still think most (all) errors are catchable, so its more up to us as script-writers to write scripts that work.