This topic covers how to collect performance metrics of Google web page using Lighthouse, then generate a report on its performance, accessibility and more. From there, the audits can be used as indicators for improving the web page.
Lighthouse as a NodeJS module (see Overview | Lighthouse | Chrome for Developers for installation instructions). Note: Please assure that lighthouse command can be executed on command-line interface before restarting Katalon Studio (try the command lighthouse --help).
Lighthouse metrics test case which is available in the sample project
Instructions
Open browser and navigate to Google web page.
WebUI.openBrowser('https://www.google.com')
Get the current tab url as well as host and port of the current browser instance.
I couldn’t get to the command line from the Katalon either way (I tried to run a batch file, execute some random application from the test - no luck) @sonpham could you please help me fix it?
Hi! Yes, I did. But I think I could do something wrong while copying it to my own. Should I copy all th files from it (configuration,settings)? I copied scripts and test cases
I got this error when I executed my lighthouse testCase :
sh: lighthouse: command not found
But I have npm/lighthouse right installed in my project. When I executed my lighthouse generated command directly in my terminal, that’s working.
FYI, I’m on MAC, that’s maybe the reason
Can you please help check the version of lighthouse & npm to make sure you have installed them? If yes, check the path of installation so that the shell can find and execute Lighthouse command.