Hive Automate's recipe testing environment allows you to test your recipe before starting it. Testing ensures your automation's behavior and data processing are correct - you don't want to do a lot of clean-up later!
What is a test job?
A test job is a job that's conducted in Hive Automate's recipe testing environment or test mode. When you run a test job, Hive Automate uses new trigger data from the trigger application to test the un-skipped steps in your recipe.
What is 'test mode'?
Test mode picks up a single trigger event and proceeds through all un-skipped actions in the recipe. When finished, the test job is logged in the recipe's job history, and its details will be available for your review.
What trigger data is used to run test jobs?
The trigger event used to run a test job depends on the trigger type:
Polling triggers check for new events by periodically checking the connected app. The trigger event used to run a test job depends on the trigger's since/from date. If a trigger event is found, the earliest event - the event closest to the since/from date - is processed first. Subsequent tests will process the next trigger event in chronological order, and so on.
Real-time triggers receive events as they happen. Hive Automate will use the first event received by the trigger to execute the test job. For example, if using a webhook, you should create an event in the source application that sends a notification to the recipe trigger.
Recipe function triggers. You provide the trigger event data. If, for example, your trigger requires a user_id value as input, you'll need to provide a sample user_id value to run a test job.
What's the best way to use test mode?
When building your recipe, we recommend that you:
Build and test incrementally. Build your recipe incrementally and test at logical intervals. Building and testing small segments of the recipe ensures that the recipe flow is coherent and the datapills are mapped properly. It also makes debugging easier.
Build your recipes incrementally with skip step. The skip step feature allows you to ignore steps when running a recipe. Skipping steps can be useful when you’re building a recipe and only want to test a part of it.
Build and test for all possible scenarios. Recipes can contain multiple paths based on conditional logic. Testing allows you to check that all conditions in your recipe are present and correct.
Test all mapped data. To ensure data is processed correctly, ensure you test all data fields and mappings.
For example, let's say we're moving Title, Description, and Due-date data from a Hive action to a Hive project. During testing, we'd want to ensure that:
The fields on the action have valid data
The inputs in the project creation have correct values
Unexpected or missing values are accounted for if needed
How do I view test jobs?
To view test jobs from test mode, click the job time dropdown in the job results section. In the menu that displays, click See all test jobs:
You can also view all jobs (including tests) from the recipe page under the Jobs tab.
Can I repeat a test job?
Yes. Repeated jobs re-use the original job's trigger data but run on the latest recipe version.
To repeat a job from test mode, click Repeat job in the job results section:
To repeat a job from the job page, click Repeat this job in the top right corner of the page:
Successful jobs include the recipe path, input, and output:
Failed jobs include the recipe path, input, output, and debugging information.
Additionally, Hive Automate will highlight the step at which the error occurred. Click the step view details about the issue, including a description of the error:
No Jobs Found
If the test job doesn't find a trigger event, the test job may continue to run until you cancel it.
When trigger events aren't found, we recommend:
Checking the trigger's configuration. Some triggers allow you to specify the date from which records are picked up. Verify that this field is correctly configured.
Creating or updating a record in the trigger app and testing again. The recipe should pick up the trigger event if the trigger is configured correctly. If, for example, you know a trigger event happened on May 31, 2022, set the trigger date in the copied recipe to before this date. This guarantees that at least one trigger event is available to test the recipe.
Canceling Test Jobs
Cancel an in-progress test job by clicking Stop test (top right corner) or the Cancel job button.