how to run mutiple test cases in the same excel?
Now we have longer test script with mutiple lines and finding it hard to maintain.Planning to break down to small test cases but keep it on the same excel sheet on the same tab.
In test complete how will we run each test cases if its in the same excel?
Team dont want to keep it in the different excels as it becomes difficult for them to search.
Solved! Go to Solution.
Hi @GAutomation,
I'm glad to hear that the solution was found. Please make the best answer in this thread (accept it as a solution).
How do you run it now?
I'm not sure what you mean by running multiple test cases on same excel tab. The DDT driver for Excel does exactly that. Each row in an excel sheet is a data record that can be used to drive or execute a test case. Test cases for data driven testing in TestComplete are not one test case per sheet but one test case per row.
If you can describe better how you're executing it now (as @Marsha_R asks), we can perhaps suggest a better re-write.
Martha,
I found the solution for it by giving a emprty row in between the each test case.
But again i have an issue with finding rows counts.
i used obdriversheet.usedrange.rows.count which is giving me the row count of the whole excel shset till the end of data.
but can you give me a code to find the last empty row count . before the next line starts.
i tried obdriversheet.range('A" &rows.count).End(xlup).row am getting unknow runtime error
we are using VB script and obdriversheet is defined already. it is the excel and sheet we are using .
Wouldn't the last empty row be the one before the actual last row? Just calculate it.
Or, for that matter... why bother with trying to have all the test cases on that single tab? Why not just split the test case out into multiple tabs, one for each of the new test cases, and simply adjust your execution code to look for the new tabs?
Robert,
The manual Team wants it to be in the single sheet.
All i need to find is a method that can find an empty row before the next test case starts which i can use instead of usedrange which solves my issue.
imho, the manual team is wasting your time. They will never spend as much time searching as you are trying to fix this.
@GAutomation wrote:
Robert,
The manual Team wants it to be in the single sheet.
All i need to find is a method that can find an empty row before the next test case starts which i can use instead of usedrange which solves my issue.
You are operating at cross-purposes. The manual testing team has certain needs that are not necessarily compatible with an easily maintainable and adaptable automation framework. While it is admirable that you are trying to simplify things so that there is one source of data, that should not be the driver. Automation testing needs are, by their very nature, different than manual testing. They have needs for plain language... you have needs for easily adaptable data. They aren't 100% incompatible but you need to decide the ROI. You are spending time trying to get this code to work simply because you are trying to use their spreadsheets. Instead, you could go and create your own framework where the data you use for running your automation is stored separately from the documented manual test cases. That way you don't need to adapt your code every time they change the way they format their test cases.
I would suggest that this is best practice: separate the data sources. One data source for manual, another data source for automation, both of them have a COMMON root in the requirements and specification documentation from development.
Martha And Robert,
I found the solution. Written a code to exit IF the particluar cell in the coluumn is null .
Subject | Author | Latest Post |
---|---|---|