I’m trying to figure out how best to programmatically get a list of test failures. Rather than needing to copy/paste test failures from the CircleCI UI, I want to be able to pull them down and automate running them locally. I’m not sure of the best way to approach this, but one thought is to download the build output and parse out the failure messages. It doesn’t appear that the CircleCI API exposes the build output in any way, however. Another thought is to upload build output as an artifact, as it does look like the API does support downloading artifacts. Is there a better way to go about this?
I’m not sure whether you’re already using store_test_results
to upload your test results, but if so, then I agree — upload that same file using store_artifacts
and then you’ve got a nice parseable XML file ready to fetch via API.
1 Like
Yeah your approach of uploading test results to an artifact and grabbing artifacts via the API would be my recommendation.