Running a Data Driven Test using multiple Keywords and scripts
I have a data driven test setup using a Keyword test and scripts included in the main Keyword Test 1.
It works, but it will get longer with time, and I'm afraid it may be hard to manage (modify)
I am not sure if this is the efficient way of doing it. Other suggestions?
Can I do the date driven test in the Execution Plan without having all the scripts inside Keyword Test 1?
Some scripts rely on the data entered from Keyword Test 1.
Here is my scenario:
Keyword Test 1 < Here I define the data driven and then create the data loop >
Keyword Test 2
Keyword Test 3
Keyword Test 4
Script 6 < adds the data into a spreadsheet>
Script 7 <last script to run with the first data before jumping back to Keyword Test 1 for the next data entry>
Solved! Go to Solution.
The Execution Plan is used for organizing test items. It doesn't run test items of its own.
Are you concerned with the individual tests being too long or that Keyword Test 1 will have a large number of scripts and keyword inside it? If you give the scripts and keyword tests names that are useful, it should not take long to find the place you need to edit.
Yes that is what it is doing, and I am wondering if there are other methods of doing this than just keep adding scripts or keywords into the master keyword test. (Keyword Test 1).
I am sorry. I missed read your question before. I am reading from a spreadsheet where the data to be added to my test scenario and my results (i,e, timestamps, generated ID and so on) are being added to another spreadsheet.
Ah ok. That's fine then!
When you say "It works, but it will get longer with time, and I'm afraid it may be hard to manage (modify)", what makes you think it will become difficult to manage? Is it the keyword tests, scripts tests or data?
Maybe not hard just that I don't want to create a very long test in one. So I was just wondering if there are other methods I can use, if not I can live with a big script.
There is a workflow the user needs to go through within the software once he creates an order, so that order is taken through several stages in the software to get the order close, so in my case each stage contains several (scripts/keywords) tests and so on. I am using data driven data to create many orders so at the end the results can be checked in the spreadsheet.
I put out the question if in case someone had come up with other ways of doing Data Driven verifications.
Understand. I guess in certain situation, like yours, there's no easier solution. I can only suggest to insert suitable comments, make the coding as readable as possible, and make functions not too complicated.
Even the example from SmartBear, https://services.smartbear.com/samples/TestComplete15/smartstore, follows similar process.
At some point, you have to have a master test. Breaking tests into smaller and smaller groups ends up making things more difficult over time. Name your tests clearly, whether scripts or keyword tests, and it will work out fine.