sitespeed.io icon indicating copy to clipboard operation
sitespeed.io copied to clipboard

Sitespeed Test HTML Report is getting crashed when the test run got failed intermittently

Open prithivi96 opened this issue 3 years ago • 2 comments

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.

prithivi96 avatar Jul 14 '22 15:07 prithivi96

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.

soulgalore avatar Jul 14 '22 20:07 soulgalore

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 image

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.

image

Report Screenshot:

image

prithivi96 avatar Jul 21 '22 05:07 prithivi96

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 avatar Dec 16 '22 09:12 linqunhe

@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.

soulgalore avatar Dec 16 '22 17:12 soulgalore

I still think most (all) errors are catchable, so its more up to us as script-writers to write scripts that work.

soulgalore avatar Dec 27 '23 16:12 soulgalore