Annotations are compile time. You cannot add attributes to them or set values to them at runtime (without going through hacks).
You should consider adding this arbitrary information as attributes to the ITestResult object.
Would they show up in the reports? I am not sure. You may have to give it try and see what you find.
Thanks & Regards
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
From: <[hidden email]> on behalf of Hanasaki Jiji <[hidden email]>Reply-To: <[hidden email]>Date: Wednesday, May 16, 2018 at 2:46 AMTo: testng-users <[hidden email]>Subject: [testng-users] howto ? : Adding metainfo that is in CSV, HTML, XML and JUnit XML reports
How can arbitrary information be added to the TestNG run (per class, per method)? Prefer in an annotation.
examples: requirements number, reference number, some external info
Want the data to show up in:
-- You received this message because you are subscribed to the Google Groups "testng-users" group.To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].To post to this group, send email to [hidden email].Visit this group at https://groups.google.com/group/testng-users.For more options, visit https://groups.google.com/d/optout.