Search code examples
postmanazure-pipelinesnewmanazure-repos

Test Script is running in Postman but got unexpected token '<' at 1:1 when ran in Azure pipeline using Newman


I have tried to integrate Postman collection in Azure as per the instructions on Medium post I have my Postman tests running under newman however i am seeing error. I have tried both the newman addon and command line tasks.

Error message


Solution

  • The error says 403 ip forbidden , it means the the server from which you are running script is not authorized to access the api

    Azure App Service Deploy returns (403) Forbidden with IP restriction

    Refer to this answer .

    And about the json error you are getting is from

        pm.response.json()
    

    As the response is html so it cannot be parsed .