# Read test data file into a variable in postman

**URL:** <https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901>\
**Category:** Help Hub\
**Tags:** variables, jsondatafile\
**Created:** [August 11, 2020, 9:45am UTC](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901 "2020-08-11T09:45:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balakrishna.Mandala](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Balakrishna.Mandala](https://community.postman.com/u/Balakrishna.Mandala)\
**Post date:** [August 11, 2020, 9:45am UTC](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901/1 "2020-08-11T09:45:17Z")

</div>

I have a test data file in json format. How can we read it into a variable. I am trying to compare my test data against the response.

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [August 11, 2020, 11:36am UTC](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901/2 "2020-08-11T11:36:44Z")

</div>

Welcome to the community @Balakrishna.Mandala 👋!

Do you have just a single request worth of data in the test file, or do you have multiple runs worth of data?

The answer might vary based on your use case.

---

<div class="post-metadata">

**Author:** ![Balakrishna.Mandala](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Balakrishna.Mandala](https://community.postman.com/u/Balakrishna.Mandala)\
**Post date:** [August 11, 2020, 12:08pm UTC](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901/3 "2020-08-11T12:08:18Z")

</div>

Hi Allen,

I have multiple runs worth of data.

Thanks,  
Balakrishna M.

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [August 11, 2020, 12:19pm UTC](https://community.postman.com/t/read-test-data-file-into-a-variable-in-postman/14901/4 "2020-08-11T12:19:54Z")

</div>

Perfect, Postman has an amazing feature designed to do exactly what you want.

[Importing Data Files](https://learning.postman.com/docs/running-collections/working-with-data-files/)
