Hi all, I'm looking to get some data back from fla...
# community-support
j
Hi all, I'm looking to get some data back from flaky tests in Develocity. Is there a way to search for a common failure across all the projects being scanned where the issue only appears during class setup/cleanup. I can drill into the particular failure for a test class but I want to see where the same failures have occurred in other tests/projects
v
You mean the same test class in different projects?
j
Same exception in different test classes in different projects
p
Hey Jonathan, unfortunately, there is no way to search tests by failure. This is a common request on our roadmap, but there is no timeline yet. I think the easiest way to surface such errors in future builds is to tag your scans when the error occurs. You could do something like this for a test report. Then, you could search for builds by this tag and analyze them further. Of course, you can't apply such tags retrospectively. If you want to search past builds for this error, you could craft a script using the Develocity Tests API and the Export API. You could first search for all failed/flaky test classes and the builds in which they occurred. After that, you can fetch the
ExceptionData
event for every build and keep builds with the exception you are looking for. This should work but it can be rather slow depending on the volume of builds you have. This can also put quite some load on your instance if you query a very large timeframe. Let me know if you have any further questions.
👍 1