Testing

Before you go live with a workflow, give it try!

MESA's Test feature is an excellent way to test out your workflow before turning it on. This feature allows you to test using recent data, example data, or custom data. In this article, we're going to walk you through testing options and share helpful testing tips.

Running a Test

After installing a pre-built workflow template or building your own workflow, you'll want to take your workflow for a test drive. To get started, you'll want to select Test either at the bottom of the workflow actions or in the top right of the workflow title.

Once selected, the Test menu will appear on the right-hand side. In this menu, there will be options to test with Live Data Samples, Example Data, or use the Advanced feature to test with custom data.

When testing a workflow that has a Shopify trigger, only 250 of the latest records will be displayed. In some cases, "No matches found" will appear if no results can be found.

Testing with Live Data Samples

This is the most popular data selection for testing. Based on your trigger, your store's live data for the workflow is available under the search bar in the testing menu. Choose the live data sample you would like to test with or select the three dots to the right of the record to View advanced data to review the payload of the sample (aka JSON or raw text).

Hold up! What is a payload you might ask. It refers to the data that is used to trigger the workflow. Here is an example of the Preview data when you select View.

You don't have to open view advanced data to test. No payload wizardry is needed! If you see the record you want to test with, then simply select it and move forward with your testing.

Click on the Start Test button in the bottom-right corner to begin your automation testing!

When you run a test in MESA, it will run as if the workflow is turned on, which means the impact of the workflow test will be live. Make sure you are comfortable with running a test on the record selected. If you're feeling a bit unsure, check out our testing tips and tricks below.

Testing with Example Data

By selecting Example data, MESA will use pre-defined data that you can use to test your workflow.

🤖 Send that example data on down!

Heads up! The example data follows a standard format for every MESA trigger and doesn't reflect real-time data from your store. So, when running a test, keep in mind there might be hiccups depending on your workflow steps with example data.

Example data shines when your workflow test does not rely on obtaining data from your store. For instance, if you were trying to send a Slack message every time a product was created then the example data would work well.

After you select, Example Data, click on the Start Test button in the bottom-right corner to initiate your test!

Advanced Options

Got a custom job - we got you! When selecting Advanced, MESA will let you paste your custom data to run a test. Access to data and familiarity with your trigger's data structure are recommended when using this method to test successfully.

Once Advanced is selected in the test menu you'll be prompted to enter JSON or raw text to run your test with custom data. Once added, click on the Start Test button in the bottom-right corner to start your test!

Tips and Tricks

You've got this! But if you're still feeling nervous about testing we have a few tips to help you feel more at ease.

What is the best way to test?

Testing works best when you have an existing example to run through the workflow. For example, if you want to test a workflow that filters for Shopify Orders that have a total price of over $100, you'll want to ensure you know which order meets that criteria.

If you're building a workflow that targets customers or products, you can create a test customer or test product. BOOM, you have a real record to test with that doesn't impact your live customer or live product data.

Edit the data before running a test

Yes, you read the headline correctly. MESA allows you to modify the data in the record selected for testing so you can change information before running the test. Let us tell you how!

  • Select the record you want to test with

  • Next to the record, choose View advanced data to jump into the payload/JSON

  • Find the data label you want to change and hover over until the +, pencil, or red x icons appear

  • To delete the data: select the red x icon

  • To edit the value next to the specific data, open the pencil icon and change the value. Once changed, don't forget to hit the check mark to save your update.

  • The + icon allows for advanced usage to add keys (names) and values to objects

Pause a workflow with Approvals by MESA

MESA has a built-in app called, Approvals by MESA, which can pause the workflow until you manually approve or reject the data going to the next step. It's super handy for many reasons, for testing, it can pause the workflow before an action impacts live data.

Below, the Approval step is placed after the filter before the order tag is added. If the test is approved, it will tag the order. If the test is rejected, it will stop the workflow and the order tag will not be added.

Once the test has been initiated, the workflow will run through its steps and pause once it reaches the Approval step. Next up, you can head to the Approvals tab in your workflow to Accept the workflow and let it run to the next step, or Reject the workflow to stop it completely.

You have the power to decide what to do next with Approvals by MESA, and that power should feel good.

We can hear you already, what if the test fails...what do I do? Come with us to the next article!

Last updated