- automatically measure a form that is split in several pages
- assess the page given by a search result
- audit a web application
- measure different states of a very same page
- Asqatasun v5.0.0-rc.1 at least
- Record your scenario with Selenium IDE
- Verify it actually works withing Selenium IDE
- Upload it to Asqatasun
- in Selenium IDE, you will create a testsuite, compound of one test. This test is the actual scenario, and it can have several steps. If you ever create more than one test (from a Selenium IDE point of view), only the first one will be executed by Asqatasun.
A scenario is a set of Selenium commands, either recorded thanks to Selenium-IDE addon, either coded by a developer.
Once uploaded, a scenario is played on Asqatasun server. Technically, this means a headless Firefox (managed by Asqatasun) executes the desired scenario. This Firefox has an empty default profile with English as language.
You’ll save a lot of time doing so, as you’ll have no clue on what’s going wrong if the scenario audit fails.
When replaying locally, you may encounter a CSP (content security policy) error:
An old solution consisted in disabling CSP in the browser. This is no longer possible since Firefox 99. Another way to do so can be done by using a web extension.
Here is how to replay locally your scenario. First install the Firefox extension ModHeader. Once installed, open the panel:
Click on the
+ icon and add a
Response header: as name type
Content-Security-Policy and as value
Click on more time on the
+ icon and add a
Filter. Let say your scenario is for
URL pattern type
You may also leverage Firefox profiles to have a separated environment for Selenium-IDE. To do so create a new profile, have Selenium-IDE extension installed, and simply replay the scenario to verify it actually works (you might need ModHeader to replay locally your scenario).
When creating a scenario, keep in mind the Firefox that will run it, is pristine ; no session in any website is created, no cookie is stored yet, no authentication has been made yet.
So if you create a scenario on an internationalized web application, and want to test it (let say) in French, you’ll have to trigger the relevant actions to switch the web application to French. Those actions must be part of the scenario, then you can record the business tasks you want to audit.
On the other side, the Asqatasun administrator could install a localized version of Firefox ESR (instead of the default English version).
You can find various scenario examples in our dedicated repository: Asqatasun scenario examples