Beat social media to the issue
Build our browser test
A browser test drives a real Google Chrome browser through a journey we write, from the locations we choose, on the schedule we set. In the Introduction module we reviewed a browser test somebody else had built. Now we build our own, for the checkout journey on our store website.
Steps and Transactions build Browser Tests:
- A step is one interaction — go to a URL, click something, or assert that something is there. Steps have names, and those names are what we read when a test fails.
- A synthetic transaction groups steps into parts of a workflow. Each transaction gets its own duration, requests, and size metrics, so we can say “checkout got slower” rather than just “the test got slower” for example.
Everyone shares one shop
Create the test #
From the main menu, select Digital Experience, then Synthetic tests.
Select and choose Browser test.
Set the configuration slider at the top of the page to Advanced to see all test configuration options such as authentication and custom headers. We will not need all of these for this exercise.
In Name, enter:
text[NAME OF WORKSHOP]-[YOUR INITIALS]-checkoutIn Custom properties, add two key-value pairs by typing the following and hitting ENTER after each:
workshop:[NAME OF WORKSHOP]owner:[YOUR INITIALS]

Tip
workshop:[NAME OF WORKSHOP] instead of editing the chart each time somebody adds a test.Add the steps and transactions #
- Click .
- Change the name of the first synthetic transaction to Browse.
- Add a second synthetic transaction and label it Checkout.
- Add the below steps to each transaction.
For every step that uses a selector, set Selector type to CSS and paste the value from the table into the Selector path field. Make sure to update the Step name label on the left; naming steps and transactions gives us clearer, more readable results.
| # | Transaction | Step name | Step type | Selector value | Wait for navigation |
|---|---|---|---|---|---|
| 1 | Browse | Homepage loads | Go to URL | https://<YOUR SHOP URL>/ | — |
| 2 | Browse | Products load | Assert element visible | [data-cy="product-card"] | — |
| 3 | Browse | Select product | Click element | [data-cy="product-card"] | Yes |
| 4 | Browse | Product details | Assert element visible | [data-cy="product-add-to-cart"] | — |
| 5 | Checkout | Add to cart | Click element | [data-cy="product-add-to-cart"] | Yes |
| 6 | Checkout | Place order | Click element | [data-cy="checkout-place-order"] | Yes |
| 7 | Checkout | Confirm order | Assert text present, using contains | confirmation email | — |
Note
Based on our tolerance for slowness, we can adjust the wait time for certain steps. For example, on steps 2 and 4, set Wait up to 500 ms.

Tip
Best practices we’re using #
- Name every step in plain language. When this test fails at 03:00, the alert tells us “Order confirmed” failed. That is a sentence we can act on;
step 7is not. - Group steps into transactions. Without transactions we get one duration for the whole run. With them, we can tell a slow product page apart from a slow checkout.
- Assert the end goal, not the click. Step 6 only proves the button was clickable. Step 7 is the step that actually proves a customer got an order — which is why it is the step that will catch the
paymentservice breaking. - Prefer stable selectors.
[data-cy="product-card"]is an attribute the developers put there deliberately. A dynamically generated class name like.css-4t2fjlchanges the next time somebody rebuilds the front end, so if we use that our test fails due to its configuration instead of a real app issue.
See more best practices on Splunk Lantern’s Running Synthetic browser tests article .
Tip
Validate steps #
- Click at the top of the page. The test runs immediately and shows us each step’s result.
- Work through any step that reports an error. The usual cause is a selector typo, or a missing Wait for navigation on a step that changes the page. If we want to accept a slow app, increase the wait times.
Quick check
Your Try now run failed at step 7. Is your test broken?
Configure how and where the test runs #
Click at the top of the page. In the Details section:
- Locations — choose one or two public locations, ideally near us. More locations means more data, but in a shared workshop org it also means more noise for everyone.
- Device - leave as
Default Desktop. If changing the device type, best practice is to re-capture the target elements with the appropriate viewport width as elements can change between screen sizes. - Frequency — 5 minutes. In real life, a critical journey like this would typically run every 1 to 5 minutes.
- Auto retries — leave on. A test that retries once before reporting a failure will not page us because of a single dropped packet or anomaly that’s less likely to be affecting end users.
- Round-robin scheduling — leave on, so the test alternates between locations. Turning this off will test from every location at the same time.
In the Security section:
- Leave TLS/SSL validation at its default. If the instructor says the workshop shop uses a self-signed certificate, turn it off — otherwise every run fails on the certificate before it ever reaches the checkout.
Click at the bottom of the screen to create the Browser Test.
Try now vs. Run now
Try now runs are temporary: nothing is stored, no metrics are produced, and our uptime numbers are untouched. That is what makes it safe to use while we are still fixing selectors.
Run now, which we use in the next exercise, is permanent: results are stored, they count toward metrics and subscription usage, and they appear in the UI marked as Manual.
Learn more in Set up a browser test and Add synthetic transactions to your browser test .
