You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitLab test output supports the (apparently non-standard?) file attribute, which enables tests to be linked to the files they came from:
I'll admit, I'm not entirely sure where this attribute comes from, as it's not mentioned in any of the official JUnit specs, nor does it even appear in GitLab's own documentation. But regardless, currently TAP::Formatter::JUnit does not add this attribute and it'd be very nice to have.
My current workaround for this is the exceptionally ugly:
mkdir tap
tar -f tap.tar.gz -C tap -zx
cd tap
for i in `find t xt -name '*.t'` ; do
perl -0777pe 's@(\s*)<testcase([^>]*)name="@\1<testcase\2file="'$i'" name="@sg' $i.junit.xml >> ../junit-raw.xml
done
cd ..
perl -0777pe 's@</testsuites>\s*<\?xml[^>]*\?>\s*<testsuites>@@sg' junit-raw.xml > junit.xml
(that is, unpacking the archive generated by prove --archive, adding the file attribute, then very much hackily concatenating the files all back together again)
Is this something you'd be open to adding? I'm happy to make a pull request that adds it to the output - as best as I can tell, it's just adding 3 lines to the relevant testcase objects.
The text was updated successfully, but these errors were encountered:
GitLab test output supports the (apparently non-standard?) file attribute, which enables tests to be linked to the files they came from:
I'll admit, I'm not entirely sure where this attribute comes from, as it's not mentioned in any of the official JUnit specs, nor does it even appear in GitLab's own documentation. But regardless, currently TAP::Formatter::JUnit does not add this attribute and it'd be very nice to have.
My current workaround for this is the exceptionally ugly:
(that is, unpacking the archive generated by
prove --archive
, adding the file attribute, then very much hackily concatenating the files all back together again)Is this something you'd be open to adding? I'm happy to make a pull request that adds it to the output - as best as I can tell, it's just adding 3 lines to the relevant testcase objects.
The text was updated successfully, but these errors were encountered: