Linh Hoang
Linh Hoang

Reputation: 61

Postman tests hang when running from Azure DevOps

When running postman/newman test collection from Azure DevOps, the tests hang. The output says:

[debug]INPUT_SCRIPT: 'newman run CVueAPITests.postman_collection.json -k -e QME.postman_environment.json -d CVUEAPIAliveData_1.csv --reporters junit --reporter-junit-export Results\junitReport.xml'
[debug]INPUT_WORKINGDIRECTORY: 'D:\DEV_agent\_work\7\s\Postman\CVue'
[debug]Asserting container path exists: 'D:\DEV_agent\_work\7\s\Postman\CVue'
Generating script.
Script contents:
newman run CVueAPITests.postman_collection.json -k -e QME.postman_environment.json -d CVUEAPIAliveData_1.csv --reporters junit --reporter-junit-export Results\junitReport.xml
[debug]AGENT_VERSION: '2.149.2'
[debug]AGENT_TEMPDIRECTORY: 'D:\DEV_agent\_work\_temp'
[debug]Asserting container path exists: 'D:\DEV_agent\_work\_temp'
[debug]Asserting leaf path exists: 'C:\Windows\system32\cmd.exe'
========================== Starting Command Output ===========================
[debug]Entering Invoke-VstsTool.
[debug] Arguments: '/D /E:ON /V:OFF /S /C "CALL "D:\DEV_agent\_work\_temp\1c3a85e8-d01b-4df3-b6b0-322239c48093.cmd""'
[debug] FileName: 'C:\Windows\system32\cmd.exe'
[debug] WorkingDirectory: 'D:\DEV_agent\_work\7\s\Postman\CVue'
[command]"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\DEV_agent\_work\_temp\1c3a85e8-d01b-4df3-b6b0-322239c48093.cmd""

I have no issues running the test collection when I execute this exact same command locally on the build server:

newman run CVueAPITests.postman_collection.json -k -e QME.postman_environment.json -d CVUEAPIAliveData_1.csv --reporters junit --reporter-junit-export Results\junitReport.xml

Upvotes: 0

Views: 554

Answers (1)

Hugh Lin
Hugh Lin

Reputation: 19401

I tested it according to this blog , and finally I can successfully get the test results. You can refer to it for detailed guide.

Here I give a detailed configuration,you can see where it is different from yours.Hope can help you.

enter image description here enter image description here enter image description here

enter image description here

Upvotes: 1

Related Questions