# Unable to execute data driven tests

**URL:** <https://community.postman.com/t/unable-to-execute-data-driven-tests/19430>\
**Category:** Help Hub\
**Tags:** tests, data-driven\
**Created:** [January 22, 2021, 11:54am UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430 "2021-01-22T11:54:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![linda\_zondi](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@linda\_zondi](https://community.postman.com/u/linda_zondi)\
**Post date:** [January 22, 2021, 11:54am UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/1 "2021-01-22T11:54:03Z")

</div>

Hi  
I have created a data-driven test case pulling data from a .csv file, every time it executes I get the below error with status 0, however, if I execute the same test manually it processes successfully. Am I missing something?

```auto
POST http://{{url}}/quote

Error: getaddrinfo ENOTFOUND {{url}}

```

Request Headers

```auto
x-request-id: ******

x-session-id: ******

x-requester-uid: *****

x-requester-ServiceProviderCode: SYK

Content-Type: application/json

User-Agent: PostmanRuntime/7.26.8

Accept: */*

Postman-Token: *****

Host: {{url}}

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

```

Request Body

```auto
The console only shows bodies smaller than 10 KB inline. To view the complete body, inspect it by clicking Open.

```

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 22, 2021, 4:33pm UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/2 "2021-01-22T16:33:20Z")

</div>

Hey @linda_zondi

Are you able to provide some more details about the issue, please?

Is this using the Desktop App or Postman on the Web? It looks like you’re using a variable with the request - Is these coming from an environment file?

Can you provide any screenshots of the problem to help us to see what you’re currently seeing?

---

<div class="post-metadata">

**Author:** ![linda\_zondi](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@linda\_zondi](https://community.postman.com/u/linda_zondi)\
**Post date:** [January 25, 2021, 9:26am UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/3 "2021-01-25T09:26:50Z")

</div>

Hi @danny-dainton

I am still new to postman and API testing so my lingo still needs some polishing.  
Yes I have an environment variable called “url” and another one called “contractRef”  
I need to call 2 endpoints “quote” to create a contract reference and “accept” to accept policy.  
1st I execute the “quote” endpoint which generates a “Contract Reference” I store that in a variable called “contractRef”  
2nd I execute “accept” endpoint, “contractRef” is passed as a path variable to the URL please see attached.

The process works fine when I execute the endpoints manually however, the moment I use .csv/.txt file and automate via collection runner, the 2nd endpoint fails and throws “socket hang up” error.

Thank you

 ![Accept error](https://us1.discourse-cdn.com/getpostman/original/3X/a/3/a360e5a00b967b4330b9ed32bdbe5f75e4f14ba1.png)

---

<div class="post-metadata">

**Author:** ![linda\_zondi](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@linda\_zondi](https://community.postman.com/u/linda_zondi)\
**Post date:** [January 25, 2021, 9:53am UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/4 "2021-01-25T09:53:51Z")

</div>

@danny-dainton

Error: socket hang up

▶Request Headers

x-request-id: \*\*\*

x-session-id: \*\*\*

x-requester-uid: \*\*\*

x-requester-ServiceProviderCode: SYK

Content-Type: application/json

User-Agent: PostmanRuntime/7.26.8

Accept: _/_

Cache-Control: no-cache

Postman-Token: \*\*\*\*

Host: s\*\*\*

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

▶

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 25, 2021, 12:02pm UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/5 "2021-01-25T12:02:59Z")

</div>

The main url doesn’t look complete as the path variable is missing.

Have you tried moving that `{{contractRef}}` directly into the URL to replace the `/: /` part and saving the changes?

---

<div class="post-metadata">

**Author:** ![linda\_zondi](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@linda\_zondi](https://community.postman.com/u/linda_zondi)\
**Post date:** [January 25, 2021, 12:27pm UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/6 "2021-01-25T12:27:09Z")

</div>

> [@danny-dainton](#):
>
> {{contractRef}}

@danny-dainton I have changed the variable and called it {{CR}} on the URL, its pulling data from .csv please see attached console log info, the {{CR}} variable is passed correctly however I keep getting “Socket” error.

 ![Console](https://us1.discourse-cdn.com/getpostman/original/3X/7/b/7b5b8d9bf1df54879c2284a25a5340b2d31d0719.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 25, 2021, 12:45pm UTC](https://community.postman.com/t/unable-to-execute-data-driven-tests/19430/7 "2021-01-25T12:45:57Z")

</div>

Contextually, I don’t know anything about that request and I can’t see what’s in front of you so anything I say will be guess work. 😁

How long does the request take to return, when you run it individually? There _could_ be a timeout issue happening.
