I've an application that have some room for performance improvements. Our customer has requested some performance measurements on the Client (Browser) side, and I'm trying to use testcafe to have some execution time indications.
One option is to have people accessing the different features, activating in Chrome the development tools, and taking note of DOMContentLoaded values, too boring, error prone and time consuming.
Using testcafe we can do begin-end measurements, but because testcafe is loading the pages through it's proxy is clear that this figures will be worst.
There are several questions
1. amount of delay added by the proxy:
does anybody have idea of something like a multiplier factor,
i.e.: times in testcafe will be -> X times the DOMContentLoaded you get from the developer console.
2. When to get Selector value from the page
I'm trying to do this:
S1 - access the page PageUnderTest
S2 - set filter values
S3 - click search to submit the page and apply the filters
S4 - the PageUnderTest is rendered with the filters applied.
Because I'm trying to get the time till the page is loaded, I get BEGIN Timestamp before issuing t.click(button) (S3) then I expect for the page title, but not knowing how testcafe works I fear that testcafe get this value from S3 because the PageUnderTest is already rendered. Can anybody provide some clarifications?
I've a token that is changed on each submit then I'm getting the token in S3 (before the click) and loop reading the token till the value is different to the value got in S3. Do you think this is a good approach?
3- How to understand page has been fully rendered.
Do you have any suggestions?
Best regards