Score:0

GHA worklfow fails when a Postman Collection Run fails (newman)

bs flag

i'm using newman in github actions workflow to run a postman collection. i need the run results no matter if any number of requests fail. but the github action fails and i can't get them.

       - name: Collection_UID
         id: collection_UID
         run: echo ::set-output name=uid::$(curl https://api.getpostman.com/collections?apikey=${{ secrets.POSTMAN_API_KEY }} | jq -r '.collections[] | select(.name == "MyCollection").uid')

       - name: Run Newman
         id: run-newman
         run: newman run "https://api.postman.com/collections/${{ steps.collection_UID.outputs.uid }}?apikey=${{ secrets.POSTMAN_API_KEY }}" -r 'cli,junit' --reporter-junit-export mycollection.xml

/

    #    failure    detail 
                          
    01.  TypeError  Check if FAILED_POSTMAN_REQUEST_NAME is correct
                    Cannot read properties of undefined (reading '0')
                    at assertion:0 in test-script

    Error: Process completed with exit code 1.

is there a way to prevent the github action from failing when the postman request fails, and even add it to the export file?
thanks

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.