I have a step in my test suite that calls a stored procedure and uses some parameters. Everything works just fine most of the time. The problem I am having is sometimes the data has not populated yet and the test suite will show as passed and a message saying:
Warning: The data source is valid but contains zero data rows
After that it will proceed on. How can I make it so if no data rows are found then it will stop the test suite?
Stop if no rows available
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Stop if no rows available
Hi,
In this test case add a user code module, or a recording mit a user code action.
Add the following user code to the user code module/action:
Regards,
Tobias
Ranorex Team
You can perform this, by adding a test case after the data-driven test case.byonush wrote:How can I make it so if no data rows are found then it will stop the test suite?
In this test case add a user code module, or a recording mit a user code action.
Add the following user code to the user code module/action:
if (TestSuite.Current.GetTestCase("<TestCase>").DataContext.Source.Rows.Count <= 0) Report.Failure("No Data Rows in Data Source");whereas <TestCase> is the name of the data driven test case.
Regards,
Tobias
Ranorex Team