I’m creating test filters using a custom field I created:
After each run, I post the results to the runs. API:
const data =
{
"data": {
"type": "runs",
"attributes": {
"instance-id": testInstance,
"custom-fields": { "---f-185629": "0.8" },
},
"steps": {
"data": [
{
"name": `${test.title}`,
"expected-results": `${test.expectedStatus}`,
"status": `${result.status.toUpperCase()}`,
"description": "Test step's description",
}
]
}
}
}
//Post test run results to Practitest
try {
await this.instance.post(`${process.env.PRACTITEST_RUNS_URL}`, data, {
headers: {
'PTToken': `${process.env.PRACTITEST_KEY}`,
'Content-type': 'application/json'
}
});
console.log('Success', data);
} catch (error) {
console.log('Error', error)
}
I’d expect the filter to display all of the tests that have the custom field I created, but the actual test instance isn’t getting updated. It updates the last run and run status but not the custom field.
Why is it not updating the test with the custom field value so that it gets picked up by the filter I’ve created?