I need to add a custom attribute to existing @Test annotation like below.
@Test (description = "some description", newAttribute = "some value")
public void testMethod() {
// unit/integration test code
}
Where 'newAttribute' is the new attribute I have added to existing attributes of @Test. Later as part of reporting, I will read/scrap all files in the workspace for this new attribute and enumerate the tests/methods that use it.
Can it be done in Java? Any help/pointers will be appreciated. Any better way of getting all the tests that use a particular attribute/annotation?