# Best Practice when using a data file for a testsuite

**URL:** <https://community.postman.com/t/best-practice-when-using-a-data-file-for-a-testsuite/11094>\
**Category:** Help Hub\
**Created:** [February 28, 2020, 3:07pm UTC](https://community.postman.com/t/best-practice-when-using-a-data-file-for-a-testsuite/11094 "2020-02-28T15:07:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![vovky](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@vovky](https://community.postman.com/u/vovky)\
**Post date:** [March 4, 2020, 5:30pm UTC](https://community.postman.com/t/best-practice-when-using-a-data-file-for-a-testsuite/11094/4 "2020-03-04T17:30:46Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/e/ded4f034325b2e20ba8305ea73f8082792f0438c.png)

with data file:

```
[
    {
        "usernames":["user"],
        "parameter_tests":["1","2","3"],
        "expected":true
    },
    {
        "usernames":["","testing"],
        "parameter_tests":["","not","this","issa test"],
        "expected":false
    }
]

```

the failed tests in the second iteration is because even with nonsensical parameters the api returns 200 😃

just gonna post my prereq and tests as pics because thats how I learn best

![image](https://us1.discourse-cdn.com/getpostman/original/2X/e/e0c123fa1540a25fa56fe35398b6c1ce609ec9b4.png)

![image](https://us1.discourse-cdn.com/getpostman/original/2X/d/d7d690fe36da75414982d3d2ff18c349117ce04a.png)

cheers

---

_[View the full topic](https://community.postman.com/t/best-practice-when-using-a-data-file-for-a-testsuite/11094)._
