Load user-defined environment variables in QTP from external XML file
Step 1: Open notepad and copy & paste the following code
Step 3: Open a new test in QTP. In test flow section, right click your test and click “settings”.
Step 4: In Test Settings pop-up window, click “Environment”, and select Variable type as “User-Defined”.
Step 5: Check mark “Load variables and values from external file” checkbox and browse to load the file here. Now our xml file has been loaded successfully in QTP
Step 6: How to use these variables now:-
Step 2: Save this notepad file as “.XML” format.Database Location SQLServer2012 Username testuser123 Password testpass123 URL https://test123.com
Step 3: Open a new test in QTP. In test flow section, right click your test and click “settings”.
Step 4: In Test Settings pop-up window, click “Environment”, and select Variable type as “User-Defined”.
Step 5: Check mark “Load variables and values from external file” checkbox and browse to load the file here. Now our xml file has been loaded successfully in QTP
Step 6: How to use these variables now:-
username = Environment(“Username”) pass = Environment(“Password”) appurl = Environment(“URL”)
Comments
Post a Comment