The Web Audits Checkpoint operation runs a number of audits against a web page and checks how the page performs. The operation measures audit scores and compares them against the specified threshold values.
The operation uses the Google Lighthouse tool and can perform the following audits:
When you add the operation to your test, TestComplete displays the Checkpoint dialog where you specify the tested web page, a list of audits for it, and the emulation environment.
TestComplete version 14.1.
An active license for the Web module.
An active license for the Intelligent Quality add-on.
The Intelligent Quality add-on and its Web Audits plugin must be enabled in TestComplete.
You can enable the add-on and plugin during TestComplete installation. If you did not enable them during the installation, you can do this at any moment later via the File > Install Extensions dialog. To do that, select File > Install Extensions from the TestComplete main menu and enable the Intelligent Quality > Intelligent Quality Core and Web Audits plugins in the resulting dialog.
Google Chrome must be installed on your computer.
If the obtained scores are equal to or greater than the threshold values, the operation returns True and posts a success message () to the test log. Otherwise, the operation returns False and posts an error message () to the log.
The operation is an analogue of the
WebAudits.For(URL)...Check scripting method.
The operation cannot have child operations.
The operation uses the following parameters:
String. Specifies the URL of the web page that will be verified.
Integer. Specifies the threshold value for the Performance audit.
Integer. Specifies the threshold value for the Accessibility audit.
Integer. Specifies the threshold value for the Best practices audit.
Integer. Specifies the threshold value for the Search engine optimization audit.
Integer. Specifies the threshold value for the Progressive web app audit.
A threshold value can be a number between 0 and 100. The default value is 90.
Boolean. Specifies the type of the device to be used for emulation. Set this parameter to
True to check the behavior of the specified page on a mobile device. Leave the default value (
False) to check its behavior on a desktop computer.
To specify the parameters listed above, do the following:
Select the operation in the Keyword Test editor.
Select the Value cell and click within it, or press F2. This will open the in-place editor.
Click the ellipsis button in the in-place editor. The Operation Parameters dialog will appear where you can specify the parameter values. For detailed information on setting values in the dialog, see Specifying Operation Parameters.
Click OK to close the dialog and apply the changes.
Press Enter to confirm the changes and close the in-place editor, or press Esc to close the editor discarding any changes.
To learn about Web Audits checkpoints and how to create them, see About Web Audits Checkpoints.