Link in testreport ignores rownum

Problem description

Since the implementation of #267344 (closed), the test report tab now links to the file referenced in the failure report. However, the line number (which is present in junit reports for example) is not taken into account. This results in a link to the file in general, but it would be very helpful to link directly to the failing row by adding #L<rownum> at the end of the url.

This is also requested in the forum a year ago: https://forum.gitlab.com/t/gitlab-junit-report-not-parsing-line-numbers-in-merge-request/118508

Proposal

If there is a line number present in the report, add it as a suffix #L<rownum> to the file link so the user can navigate directly to the correct line.

Edited by 🤖 GitLab Bot 🤖