Create Browser Test
A Browser Test allows running your end-to-end test scenario using real browsers from our cloud environment. We leverage Playwright framework to executing the test scenario. The scenarios can be automated using our no-code editor or by adding scripts written in Javascript.
No-code Browser Test
You can add a new Browser Test using our no-code editor by using available pre-defined actions. Learn more about No-code Editor.
- Click New Monitor button.
- Provide a Name for your test e.g. Check WWW page title.
- Optionally, select an Environment which contains variables that can be referenced in your test.
- Leave Scripted Mode to OFF.
- Click Add a Step button.
- A panel will be shown with all available actions for defining a new step.
- Select an action from the list below. For example, the Go to URL action will allow you to navigate to a URL.
- Add steps, drag and drop to steps to compose the actions to automate your use case.
- Click Submit
Following is an example of a no-code Browser Test.
Scripted Browser Test
Navigate to Browser Tests page.
- Click New Test button.
- Provide a Name for your test e.g. Check WWW page title.
- Optionally, select an Environment which contains variables that can be referenced in your test.
- Toggle Scripted Mode to ON.
- Add Playwright Script that must be executed for your test. Following is an example Playwright script.
const { chromium } = require('playwright');
const { expect } = require('chai');
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://www.playwright.dev');
const title = await page.title();
console.log('Asserting page title');
expect(title).to.equal('Fast and reliable end-to-end testing for modern web apps | Playwright');
browser.close();
- Leave the Enabled toggle button ON to enable the monitor on creation.
- Click Submit
Browser Tests will have Snooze alerts enabled on creation. This is to prevent sending out alerts while you work on the script to ensure the test is running as expected. Once the script is working as expected, Unsnooze alerts for the monitor to start receiving notifications from the monitor.
Recording Tests
You can use DevRaven Recorder Chrome extension or Playwright's codegen tool to generate tests for your use cases. Refer Recording Tests for more details.