How to run 3 of 5 actions in a test for all rows of test data - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to run 3 of 5 actions in a test for all rows of test data (/Thread-How-to-run-3-of-5-actions-in-a-test-for-all-rows-of-test-data) |
How to run 3 of 5 actions in a test for all rows of test data - mharps - 04-07-2014 Hi All, I am new to UFt and am having a bit of a problem getting my head around the ability to run some but not all actions within a test, using tall the rows of test data imported at runtime into the Globals. The basic structure of the test is as follows: Test 1: - Action 1: Retrieve test data (into Globals) - Action 2: Start Browser and Log on to application - Action 3: Enter test data onto Screen 1 and press submit - Action 4: Enter test data onto Screen 2 and press Continue - Action 5: On Screen 3 verify the results then navigate back to Screen 1 - Action 6: Log off and close the Browser I want to run on all rows only for Actions 3, 4 and 5. Looking at the Run on all rows details we can set Test 1 to Run on all rows so all actions will be run for each row of test data. How can I set this up to just run on all rows of test data for the Actions 3, 4 and 5? Thanks in advance for your help, Mike RE: How to run 3 of 5 actions in a test for all rows of test data - mharps - 04-10-2014 Hi All, No responses so far but I have come up with a workaround. I have added two additional fields to the test data spreadsheet: - Login - Logout Actions 1 (Retrieve test data) and 2 (Start Browser and Login) check the "Login" value and if set to "Y", the code is performed. Action 6 (Log off and close the Browser) checks the "Logout" value and is set to "Y", the code is performed. This allows Actions 1, 2 and 6's code to be run when required and Actions 3, 4 and 5 code will always be run for each row of test data. Not sure is anyone will find this workaround helpful but it works for me. Cheers, Mike |