Test Automation: A faster, simpler way to test your recipes

Table of Contents

Testing: a hard-to-scale must-do

In the fast-paced and highly competitive tech industry, delivering software rapidly and reliably has become a strategic imperative. To keep up with the ever-increasing demands for faster releases and higher quality, organizations are wholeheartedly embracing test automation as part of their Continuous Integration (CI) and Continuous Delivery (CD) efforts.

Gone are the days when testing was solely reliant on manual efforts, a time-consuming and error-prone process. Manual testing can’t keep up with the accelerated release cycles and intricate software systems of today. 

This is where our new test automation capability steps in, revolutionizing the way organizations approach testing. By automating the testing process, we enable teams to address key challenges such as test scalability, regression testing, and comprehensive coverage. With our cutting-edge test automation feature, users can expedite their testing efforts, ensure accuracy, and enhance the overall software quality, ultimately enabling them to achieve faster time-to-market and gain a competitive edge in the industry.

Test automation, now on Workato

With test automation, you can now test recipes directly on Workato with mock or simulated data, eliminating the need to prepare test data on other apps. 

There are also automated checks, which allow you to check the output value of any step against your expected outcome, automatically!

example of test automation

What a recipe with a test case looks like.
Two steps will be tested with mock data, and one has an automated check set up.

Why we’re excited about test automation

#1 Managing many test cases gets easier

There are many test scenarios to consider when testing, like edge cases and error conditions. Managing these test cases on your own can be overwhelming. That’s where test automation comes in, allowing you (and your team) to easily set up and keep track of the many test cases needed for comprehensive coverage.

#2 Consistent and accurate testing

With multiple test cases and recipe iterations, manual checks are overwhelming, tedious, and prone to human error (no matter how hard we try).

By automating the recipe testing process, we can achieve greater accuracy at scale. Now, builders simply need to set up conditions for checking key steps. From there, these checks can be done automatically, surfacing errors instantly, over and over, whenever you need them done.

automated checks

Here, we’ve set up checks for this step to make sure its output matches the “Value” indicated.

#3 Your app data stays clean

Test automation gives you the option of using mock data to simulate scenarios your recipes might face. This means you no longer have to manipulate data stored in external apps for the purpose of testing. As a result, your app data stays clean, reducing any confusion or distortion.

This frees builders to confidently create and run test cases, since it’s mock data they’re handling.

mock data test automation

In this example, we’ve chosen to manually add a JSON file as our mock data.
This simulates the addition of a new/updated issue in Jira.

#4 A speedier way to scale

Last but not least, automating your testing process shortens it. With our “Checks” feature (more on that below), your data is instantly validated for you, no manual checks needed. This makes it possible for you to scale your testing efforts with ease, reducing this process from weeks to days.

How test automation works

To give you a quick rundown of the four core components that make up our Test Automation feature:

Test cases (or scenarios)

Start by navigating to the “Test cases” tab of your recipe, and create a new test case. To simulate a test case or scenario, you can choose which steps to use mock data for, and when automated checks should be run.

Create as many as 100 test cases per recipe, and choose a unique name and description for each test case so they’re organized from the get-go.

test cases test automation

What your test cases could look like

Mock data for quick simulations

After building or editing a recipe, it’s key to check that your recipe runs smoothly in different scenarios. A trigger or action often ingests or produces output that varies, so you’ll want to anticipate these scenarios and simulate them with mock data. 

Automated checks to surface errors

Adding automated checks to specific steps, where you need it, allows you to surface errors with ease. To create an automated check, simply define your condition and the output’s expected value. This quick feedback feature allows you to iterate on your recipe’s logic easily and quickly, shortening your recipe design and production process.

automate checks

In this recipe step, we’re expecting the message to be “10”. This automated check feature will notify us if the condition or expectation is not met.

Simulate errors too

Finally, you’ll want to make sure your recipe is able to respond to and recover from errors in your recipes. To help you build recipes that can handle errors, choose to “Throw error” after activating “Mock step.”  By simulating errors, you can verify that these happen as expected:

  • Error blocks get triggered
  • Error messages are presented
  • Error recovery steps are executed
throw an error

Here, we’re simulating an error for the step “Log message to Job report”

Run test automations with APIs

We briefly demonstrated how our test automation feature can be used in our Workato UI. But if you’re wondering if API endpoints are available for test automation, we’re thrilled to share that they are ready for use.

Start by creating a manifest for the package that you’re going to deploy (manually or automatically). After that, use test automation APIs to run your recipes’ test cases in the manifest. 

GET-request

An example of a GET request that triggers the running of test cases for all recipes in the specified export manifest.

Looking at the results from your GET request, you can make a decision if your recipes are good to deploy. Once the package is deployment-ready, go ahead and import it to your target environment.

Create your first test case

Take a moment to create your first test case for one of your recipes. Setting it up may seem like extra work at first, but as you iterate your recipe’s logic or design, you’ll soon realize that this initial time spent can save you effort in the long run.

Go ahead and try test automation, and let us know how we can improve it for you. We want our customers to be happier, more productive builders.

Was this post useful?

Get the best of Workato straight to your inbox.

Table of Contents