Forum Discussion
Thanks for all the replies! But I should of said that I'm new to the product and I had been only working for couple of days. I am not very technical and I am only working with creating keyword tests. Is there a more simple way of doing this? Thanks
This can be done in Keyword tests...
Basically, use the "Set Variable Value" operation, select a variable on your project level (or create one), and set the value to the credential value you wish to store. Then, in your test case where you want to use the value, set the parameter for the operation (like the Keys operation) to the project variable.
- Marsha_R9 years ago
Champion Level 3
Okay, that's where tristaanogre and I got confused then. It sounded to us like you were generating a user id inside your first test and then storing it in Excel for use in other tests.
Let's backup a bit. Could you set up your tests like this? Then you would be leveraging the DDT loop instead of trying to go around it. This would read a record from Excel, do stuff with it, then loop around and get a new record and do the same stuff with the new data, again and again until it's out of lines in Excel.
DDT loop on Excel file
test for adding user
test for login with new user
other tests
DDT next
- romanmfs9 years agoFrequent Contributor
Thanks, can you tell me more in detail how do I set or add variable value and set the parameter for the operation. I am confused if I still will have to use Excel file as my source of user names and passwords etc. Thanks!
- Marsha_R9 years ago
Champion Level 3
You said you have a part of your test that's creating a user id and login, right? Are you then writing that to your Excel file?
- romanmfs9 years agoFrequent Contributor
yes, there is one row of data that has user and password, then in keyword testing I created a datadriven test which pulls those credentials from Excel and fills in the fields on the site. So all I need to is have many rows of different data and be able to pull it one at a time in an order.
- Marsha_R9 years ago
Champion Level 3
romanmfs wrote:
The reason why I need to use different username and password every time because I also run a separate test beforehead to create a user and then I have to use the same credentials to log on. And every time a new test runs I run it with a different new user name and password, then again I use them to log in.
So you are not creating the Excel data in this separate test. You're using it to create a user record in your application and then in the next step you want to login with that user. Right?
- romanmfs9 years agoFrequent Contributor
Yes, thats right!