Avoid duplicating SpiraTestConfiguration annotation

Tuesday, July 16, 2019
Avatar

Hi, 

I'm trying to report my tests result back using selenium, java and testng.

I found out that in order to do that, I should repeat the following code on ALL my test classes:

@SpiraTestConfiguration( url = "https://demo.spiraservice.net/xxxxxx", login = "administrator", password = "xxxxxxxx", projectId = 5, runner= RunnerName.TestNG )

 

is there any way to avoid this? and just using this annotation once in the class where I have the after and before hooks?

1 Replies
Monday, July 22, 2019
Avatar
re: daiana.lopez Tuesday, July 16, 2019

The sample code uses annotations, so I don't think it's possible (unlike .NET attributes, which can be variables).

You can modify the jUnit plugin source code too get its mapping from another source (e.g. JSON) file if that is preferable. We ship the full source code.

Regards

David

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Tuesday, July 16, 2019
  • Last Reply: Monday, July 22, 2019
  • Replies: 1
  • Views: 3865