Hi,
I’m coding an app running under salesforce infrastructure.
Users can reach this app by login into salesforce (login.salesforce.com).
The question is: is it possible (and how) could I use webpagetest to test my app performance.
Thank you for you help !
I have read the link you sent me but still, there is something I don’t understand: could I use online page test to accomplish this or should I download a desktop version (if so provide me the installer link please) ?
In the online version I have seen a scripting tab, may I fulfill this tab also ?
Yes, you can use the online WebPagetest. You can paste a script into the script tab and it will execute it (debugging is trial and error that way though).
FWIW, your second logData should have a “1” instead of “0”. That said, it doesn’t look like “submitForm” works for the salesforce login. They may have javascript logic attached to the submit button.
logData 0
// bring up the login screen
navigate https://login.salesforce.com/
logData 1
// log in
setValue id=username [email]
setValue id=password [password]
click className=loginButton
That said, they have a device-specific (browser?) verification path that still prevents you from getting to the app. You might be able to scrape a session cookie and use that with the setCookie script command but if they tie an IP address or user agent string to the session cookie then you might be SOL.
Now I could make it work with some trick.
The problem is that first, by using this approach, I’m first loggin in and the get redirected to https://na10.salesforce.com/home/home.jsp (my goal).
I think the problem with this is that in the final report I’m getting useless login page and redirecting times but what I actually need is timings/performance testing only for home.jsp.
So my question is: if I subtract redirecting/login page data from report totals I get the remaining : home.jsp data.
If home.js is a public page, would I get similar data as the remaining ?
What you are seeing is not actually the login page itself but the authentication process to log into salesforce which is outside of your control. You should be able to ignore everything before home.jsp (well, pay attention to it but yell at salesforce if it is too slow).
Yes, you can use WebPageTest to test your Salesforce-hosted app’s performance, but there are some challenges due to Salesforce’s login authentication. WebPageTest works best with public URLs, so testing behind a login requires some additional setup.
How to Use WebPageTest for Your Salesforce App:
1. Use Scripted Authentication (If Allowed)
WebPageTest supports scripting for automated login. However, this works only if Salesforce allows programmatic login without additional security checks (like CAPTCHA, MFA, etc.). You can try a script like this:
logData 0
navigate https://login.salesforce.com
setValue name=username your-email@example.com
setValue name=password your-password
submitForm name=login
logData 1
navigate https://your-app.salesforce.com
Replace "your-email@example.com" and "your-password" with valid credentials.
Update "https://your-app.salesforce.com" with your actual app URL.
2. Use a Test Account with Reduced Security Measures
If your organization has Multi-Factor Authentication (MFA) enabled, this can block automated logins.
You might need a test user with relaxed security settings for WebPageTest.
3. Manually Capture Cookies and Use Them in WebPageTest
Use developer tools (F12 → Application → Cookies) to copy session cookies.
Inject these cookies in WebPageTest via scripting.
4. Test Publicly Accessible Pages
If your app has parts that do not require login (like a landing page), you can directly test those without authentication.
5. Use API Testing for Backend Performance
WebPageTest is mainly for frontend performance testing. If you need backend response times, use tools like Postman, JMeter, or Salesforce Apex performance logs.
Final Considerations
MFA and session security policies might prevent automated login.
Consider testing performance with Salesforce’s built-in tools, like Lightning Performance Profiler or Salesforce Developer Console.
If login automation is not possible, try alternative performance testing tools like Lighthouse (Chrome DevTools) or GTmetrix.