I have written a TestNG Suite in Java that will be ran on another system using a test account. The credentials for this account are stored in a password vault and are obtained through an API. Each of the tests requires this login information, and every test class will call the password vault API. I have this as a step in the setup method of each test class.
I would like to reduce it to just a single API call if possible. Would it be possible to obtain the credentials at the beginning of the suite and pass those to each of the test classes?
I looked at this as a potential solution: How to add parameter at runtime in specific test
I would prefer to not modify the XML in this way, as I found this will expose the login information in TestNG’s results report.