Cannot set execution time or last executed by

BarryTice
Messages : 10
Inscription : lun. mai 09, 2022 7:10 pm

Cannot set execution time or last executed by

Message par BarryTice »

Greetings.

I am trying to use the Squash API to maintain a history of tests automatically run by an external CI process. I have completed the process up to the point where I can generate an execution in Squash and then apply the desired execution_status, but I have not found what I need to do to set the last_executed_by or last_executed_on values.

It appears there is almost nothing you can set as you create the execution record. There is no "Request fields" section in the API documentation, and I have not found that anything I include in that JSON affects the result. So my process is to use the post to "/iteration-test-plan-items/{id}/executions" in order to create the execution, read the execution ID from the returned result, and then the patch to "/executions/{id}" to set the desired fields.

I expect that last_executed_by would accept a Squash user ID/login, since that value works for setting the assignment on the iteration test plan item. I also would expect that the time could be submitted in the same format it is displayed in: "2022-06-03T17:19:26.011+0000".

The "Request fields" section of the API documentation do not list either of these fields as addressable in this way, but I was hoping that was an oversight. Is there any way to affect these fields to indicate the timing and source of the execution result?

Thank you.

– Barry
BarryTice
Messages : 10
Inscription : lun. mai 09, 2022 7:10 pm

Re: Cannot set execution time or last executed by

Message par BarryTice »

It appears if I make sure the test stub in the "Test cases" section has at least one step on it, I can then access this execution step from the Campaigns domain and set a status on the execution step. If I do that, it sets the execution time and tester on the Test Plan Item.

Because my test cases are stored in Squash only as stubs (the actual test code is intermingled with our production code), I had not been creating steps for my test case stubs. After doing that, I am able to (indirectly) affect the tester and last run fields on the Test Plan Item.
Répondre

Revenir à « API Rest Test Management »