# Writing smart Tests using Dynamic Variables and functions!

**URL:** <https://community.postman.com/t/writing-smart-tests-using-dynamic-variables-and-functions/18475>\
**Category:** Help Hub\
**Tags:** variables, dynamic-variable, functions, soap, tests\
**Created:** [December 15, 2020, 5:06am UTC](https://community.postman.com/t/writing-smart-tests-using-dynamic-variables-and-functions/18475 "2020-12-15T05:06:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [December 15, 2020, 5:06am UTC](https://community.postman.com/t/writing-smart-tests-using-dynamic-variables-and-functions/18475/1 "2020-12-15T05:06:28Z")

</div>

Hello Folks 😊

Hope everyone is doing good and getting ready for 2021!!

While testing your API’s its advised to write more re-usable and efficient test cases. One such practice can be: Try to use more Dynamic variables instead of passing the static ones. But of course wherever possible, and you can have the user defined functions where it will easy for the validation of the end results. I have explained one such example with a SOAP request in the below article.

> **[Smart Tests using Postman!!](https://bpricilla.medium.com/smart-tests-using-postman-ea2d92f6f100)**
>
> When you are planning to write Tests for an API, make sure to write it in a way where the dynamic variables are used wherever possible…

Kindly read it, and try to implement the approach to your API Tests!!

Happie Testing 👋

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 12, 2024, 2:47pm UTC](https://community.postman.com/t/writing-smart-tests-using-dynamic-variables-and-functions/18475/2 "2024-12-12T14:47:59Z")

</div>

Closed on December 12, 2024, 2:47pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
