Link to exact line in build from Test Analytics

I would love there to be a link from a test or test execution to the build with the exact container and line number. e.g.

https://buildkite.com/organizations/range-me/analytics/suites/rangeme-app-cuke/tests/24cbdd36-6395-8c01-bff2-2e8757b1bdf7?branch=master
—>
https://buildkite.com/range-me/web-tests/builds/111899#0191c18d-425c-4342-947c-8f264a0cd47a/217-1987

In fact, I think this used to exist so maybe I just can’t find it anymore. The test analytics are significantly less useful for me now since I can’t see the context for the test failure.

Hi @Abraham,

Welcome to the Buildkite Support Community! :wave:

We currently do not have a way to link from a test to an exact line number to a job from a build. However, we do have a link from a test run to the Build number from the UI as shown below from the screen shot.

Screenshot 2024-09-23 at 2.20.48 PM

But from a build’s job, there is the View in Test Analytics button and a Tests tab that provides test results and descriptions executed in that job.

Cheers!

Hi @lizette,

Thanks for looking into this and suggesting a workaround. Linking to the build is not too bad if the whole container failed and there aren’t too many failed containers to check :crossed_fingers:

But for a more extreme example, if there’s flaky test that was automatically retried then it’s not obvious which container contains this test. For example, in this execution: https://buildkite.com/organizations/range-me/analytics/suites/rangeme-app-cuke/runs/b53d32b0-1033-874c-aee8-a4d9b2b3e631/executions/69290f16-6f57-4597-917b-72dbf0bd4137

After clicking through to the build there’s no way to tell it was actually container 21 that had the issue (other than checking each one like I just did)
https://buildkite.com/range-me/web-tests/builds/112149#01920841-00a9-48f5-98f8-472469c6a800/218-1716

The execution probably already has access to the line number, since it’s displaying the actual line in the code block so hopefully it wouldn’t be difficult to also provide a link.

Hi @Abraham ,

Thanks for the added context and use case. I understand that a link back to the job with the failed test would be useful here. Let me raise this as a feedback to our product team.

Cheers!

Hey @abraham

We have an update from our Product Team that this is a known bug. Team is working on a fix and we shall keep you posted as soon as it rolled out.

Cheers,

Tom

Hi @abraham ,

Thanks for reporting this, and apologies for not updating you sooner.

We had a regression in some recent overhaul work where the links from an execution back to a build from Test Engine (formally known as Test Analytics) did not go to the correct job, e.g. container 21 in your example above.

We rolled out a fix for this regression on 2024-10-04, so those links should now take you to the correct job.

Just to reiterate @lizette 's comment above:

We currently do not have a way to link from a test to an exact line number to a job from a build.

As you mentioned, we show the error text from the test failure on the execution page, but this is collected independently from the job log text shown on the build page. Unfortunately we don’t currently have any way to connect those 2 together, so we can’t link directly to the exact line of the failure on the build page.

Thanks again for the post, and hopefully the navigation will be a little better for you now!

Malc