Hi All,
I have two questions.
- How to hide or encrypt database password that use in Database connection string rather use it as it is?
2 I have connected the project with Global database connection, Project → Settings → Database. Can I use the global database connection to write test execution results to the database in after test suite in the Listener? if so, how to di it?
Thanks,
Thushar
I will defer to the experts to assist on this but could you please tell us what version of the product you are using? Thanks, S
Currently we use Katalon_Studio_Windows_64-8.5.0. Thanks!
To encrypt database password, use the below said reusable methods.
import com.kms.katalon.util.CryptoUtil as CryptoUtil
println encryptedText("TEST") // Output: ecg0QEv8dOk=
println decryptedText("ecg0QEv8dOk=") // Output: TEST
public static String encryptedText(String text) {
text = CryptoUtil.encode(CryptoUtil.getDefault(text))
return text
}
public static String decryptedText(String text) {
text = CryptoUtil.decode(CryptoUtil.getDefault(text))
return text
}