Is there a best practice for securely storing test users' passwords used in automated test?
Is it better to connect to a DB and query for each user's credentials as needed? Then where should I store the DB connection credentials? Still on my same repo? That won't stop an unwanted person from getting the passwords, once they've gained access to the repo/code.
Is it better to store the creds in a props file, and chmod it to be read-only for specific users running the tests? Can't anyone just chmod it back, and gain access?
Or I could create a password-protected file, and write code to look for the password as an environment variable. It would require anyone running the test to know the password, and set the var in their env.
Is there any better way?