Go 1.25で増えるtesting.T.Attrメソッドについて
#Go
https://go.dev/doc/go1.25#testingpkgtesting
The new methods T.Attr, B.Attr, and F.Attr emit an attribute to the test log. An attribute is an arbitrary key and value associated with a test.
For example, in a test named TestAttr, t.Attr("key", "value") emits:
=== ATTR TestAttr key value
https://pkg.go.dev/testing#T.Attr
Attr emits a test attribute associated with this test.
The key must not contain whitespace. The value must not contain newlines or carriage returns.
The meaning of different attribute keys is left up to continuous integration systems and test frameworks.
Test attributes are emitted immediately in the test log, but they are intended to be treated as unordered.
Go1.25 リリースを網羅する
T.Attr、B.Attr、F.Attr
テストログに属性を出力します。
testing: structured output for test attributes · Issue #43936 · golang/go
test2jsonが関係していそう
testing: add Attr (662437) · Gerrit Code Review
https://github.com/golang/go/commit/3cc8b532f9d561397dd0c66496e1e1a82667c926
近頃の気になるGo testingパッケージ - Speaker Deck
15ページ以降
go test -json そして testing.T.Attr / Kyoto.go #63 - Speaker Deck
日本語の情報があんまりないので自分で調べた
https://notebooklm.google.com/notebook/c63be61a-6547-40e7-870f-8326f99b417d