# Adding journey to synthetic monitor and running steps and not skipping when failure

**URL:** https://discuss.elastic.co/t/adding-journey-to-synthetic-monitor-and-running-steps-and-not-skipping-when-failure/316826
**Category:** Elastic Observability
**Created:** [October 17, 2022, 8:32pm UTC](https://discuss.elastic.co/t/adding-journey-to-synthetic-monitor-and-running-steps-and-not-skipping-when-failure/316826 "2022-10-17T20:32:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kris\_MacKay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kris_mackay/32/108978_2.png) [@Kris\_MacKay](https://discuss.elastic.co/u/Kris_MacKay)
#### Post date: [October 17, 2022, 8:32pm UTC](https://discuss.elastic.co/t/adding-journey-to-synthetic-monitor-and-running-steps-and-not-skipping-when-failure/316826/1 "2022-10-17T20:32:48Z")

</div>

**Problem:**  
Our automation scripts were originally written in Playwright for Windows and Linux. They used "test" instead of "step" for each section.  
I'm using the following environment:

- Elastic using a synthetic monitor
- Browser monitor type
- Inserting steps using "Inline Script"

With Playwright, if 1 test fails, the others can run  
With Elastic inline scripting, if 1 step fails, the others are skipped.  
Note: I've tried using journeys within the inline script, but I'm having problems with the proper syntax.  
I look forward to your feedback and advice.

==============

**Example 1 - Using Playwright and "test".**  
_It runs 4 times. If the first test fails, the other 7 will still run._

```auto
for (let user in userProfiles)
{
test('Enter Educator site'+user,async ({ page }) => {
await page.goto(urlLocation);
await page.locator('[placeholder="School/District"]').fill(userProfiles[user].domain);
await page.locator('[placeholder="Username"]').fill(userProfiles[user].user);
await page.locator('[placeholder="Password"]').fill(userProfiles[user].password);
await page.locator('button:has-text("Login")').click();
await expect(page.locator(userProfiles[user].location)).toContainText(userProfiles[user].schoolArea);
});

test('Logout'+user, async ({ page }) => {
await page.goto(urlLocation + "/Account/LogOff");
await page.waitForTimeout(3000);
expect(page.url().includes(urlLocationExit)).not.toEqual(false);
});
}

```

====================

**Example 2 - Using Elastic inline with synthetic monitor and “step”.**  
_This will run 8 steps. If the 1 step fails, the other 7 are skipped._

```auto
for (let user in userProfiles)
{
step('Launch Educator site'+user,async () => {
await page.goto(urlLocation);
});

step('Login - '+userProfiles[user].lastName,async () => {
await page.locator('[placeholder="School/District"]').fill(userProfiles[user].domain);
await page.locator('[placeholder="Username"]').fill(userProfiles[user].user);
await page.locator('[placeholder="Password"]').fill(userProfiles[user].password);
await page.locator('button:has-text("Login")').click();
element = await page.innerText(userProfiles[user].location);
expect(element.includes(userProfiles[user].schoolArea)).not.toEqual(false);
});

step('Logout - '+userProfiles[user].lastName, async () => {
await page.goto(urlLocation + "/Account/LogOff");
await page.waitForTimeout(3000);
expect(page.url().includes(urlLocationExit)).not.toEqual(false);
});
}

```

---

<div class="post-metadata">

### Author: ![Kris\_MacKay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kris_mackay/32/108978_2.png) [@Kris\_MacKay](https://discuss.elastic.co/u/Kris_MacKay)
#### Post date: [October 27, 2022, 4:15pm UTC](https://discuss.elastic.co/t/adding-journey-to-synthetic-monitor-and-running-steps-and-not-skipping-when-failure/316826/2 "2022-10-27T16:15:28Z")

</div>

Case ID #01034972

---

<div class="post-metadata">

### Author: ![JoelDuff](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@JoelDuff](https://discuss.elastic.co/u/JoelDuff)
#### Post date: [November 5, 2025, 1:35am UTC](https://discuss.elastic.co/t/adding-journey-to-synthetic-monitor-and-running-steps-and-not-skipping-when-failure/316826/3 "2025-11-05T01:35:35Z")

</div>

Hi Kris, did you ever get an update on this topic? This functionality would be extremely useful for my work and as far as I can find it was never implemented.
