I am wondering if there is a way to permanently set a global variable from code. Here is my use case:
I’m storing a username and password of the application I’m testing as global variables. These are used for login tests as well as further tests where checks are added to determine if user is logged in before doing other actions. In my test collection I also have a test for changing passwords. In that test, I generate a random string and use it to for the new password. Since other tests will be performed later on, which may require login, I would need to update the global password variable to the new value, otherwise login won’t work.
So my question is, as in the title, is it possible to permanently set a global variable from a test case? If not, are there any plans to support such a functionality in near future? Are there any other good practices in Katalon Studio for how to work with such use cases?
Thank you, this works for running Test Suites as we’re directly changing the object I presume.
However, would it be possible to actually change the global variable in the Profiles listing, so that it’s changed outside the current execution. For example, if I change the password to a randomly generated string in a TS, but then want to manually use the account later or use it in a secondary TS, the repository with global variables will still hold the previous value.
Perhaps I should be looking towards a data approach for this use case, by using an Excel or MySQL DB for the accounts. In that case, I assume I could change the DB entry permanently (outside execution).