Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > SpiraTeam Issues & Questi... > Recording testcase via RE...
I'm currently looking at how to get our pipeline unit tests recorded in Spira.
I'm using the test-runs/record endpoint, and it seems to be working, but I have a question.
I want to store the 'dump' from the test tool (Jest) somewhere. One option is to use the
'RunnerStackTrace' field. But another option is to add it as an attachment. However, it is not entirely clear how to do this based on the documentation provided.
On the one hand, there is the Documents endpoint that should allow me to associate an artifact with an attachment. On the other hand, the test-runs/record endpoint has an argument AutomationAttachmentId which suggests I can directly attach an already existing Document to the created Test Run. However, the JSON skeleton in the documentation lists "AutomationAttachmentId":null, suggesting you need to provide a string instead of an artifact ID. How is this supposed to work?
The data structures are common across several different methods. That particular field "AutomationAttachmentId" is not meant to be for sending back an attachment result, it is when you have an automated test case in Spira and you want to download it.
So you should use the Documents POST API instead.