3 Ways Subtests Can Improve Your API Monitoring and Testing

Have you ever wished you could reuse a set of tests and avoid that pesky duplication? Well, with the addition of Subtest Steps , now you can and it’s as easy as pie!

Subtest Steps

For starters, let’s take a look at the most common use cases for using subtests:

  • Reuse Common Functionality

Need to generate a refresh token on each test run? Now you can create a test to generate a token and use that test as a step in other tests. When the token generation process changes, you only need to update it in one place .

  • Setup/Teardown Steps

If your tests need to set up data before running, or clean up after themselves, subtests can group the required API calls for setup and teardown into a single, reusable step.

  • Organize Your Tests into Suites

Running a set of related tests as a group is now possible. Create suites of related tests and run them all together as a unit, with notifications for the result of the whole suite.

You can find the Subtest Step option in your Test Editor under “+Add Step”:

And this is what it will look like:

You can specify the test’s Bucket , Name , and Environment to be used as a subtest, and you can position it anywhere in your Steps workflow.

Subtests are a powerful tool to help you create a more robust set of tests, while also simplifying your workflow. To make things even better, you can also pass dynamic data from other steps to subtests , and extract data from the result to use in subsequent steps.

In the next weeks, we’ll be showing a few use cases for how you can use subtests to improve your API tests workflow. If there’s anything specific you would like to see, please let us know by reaching out to us on Twitter @Runscope , or email us [email protected]

If you’re new to API testing, learn more about Runscope’s cloud-based API testing solution and sign up for your free trial account .

Related Resources

Categories:announcements, product

稿源:Runscope Blog (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合技术 » 3 Ways Subtests Can Improve Your API Monitoring and Testing

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录