Data driven data with blank optional fields
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2012
06:50 AM
11-01-2012
06:50 AM
Data driven data with blank optional fields
I'm new to TestComplete. I have set up a NameMapping test and have included a Data-Driven Loop which I populate with data from an Excel spreadsheet. I was able to get this to work fine for my first set of data.
I then added additional lines of data to load into the test. In our application some data fields are optional and therefor the values in the cells for those fields are blank. When I run the test with the data with blank fields I get error messages. I've read a number of the forum discussions about using Excel for data and I am aware of the limitation that all values in a column must be the same type of data.
I was able to switch my data source to a CSV file easily, but I still get an exception "Type mismatch" on the first blank field in the data.
Blank optional fields are valid in my application. How can I use data driven loops to load those records?
I then added additional lines of data to load into the test. In our application some data fields are optional and therefor the values in the cells for those fields are blank. When I run the test with the data with blank fields I get error messages. I've read a number of the forum discussions about using Excel for data and I am aware of the limitation that all values in a column must be the same type of data.
I was able to switch my data source to a CSV file easily, but I still get an exception "Type mismatch" on the first blank field in the data.
Blank optional fields are valid in my application. How can I use data driven loops to load those records?
4 REPLIES 4
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2012
01:22 AM
11-12-2012
01:22 AM
Use Empty (I used in vb) keyword within the if condition for all of optional field.
Let say if Mobile is optional, following code will do for you
If (DDT.CurrentDriver.Value("Mobile")<> Empty) Then
your code to enter set/enter mobile number
End If
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2012
02:49 AM
11-14-2012
02:49 AM
Thanks for responding. I was hoping to find a solution that could be implemented without using scripting.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2012
03:45 AM
11-14-2012
03:45 AM
Anthony, I know you don't want to use scripting, but it will make everything much easier / more customizable. Give it a try if you ever get a chance! 🙂
-Sean
-Sean
I’m not a member of the SmartBear Support Team, I’m just helping users in this community.
Any views or opinions expressed do not necessarily represent those of SmartBear Software.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2012
05:27 PM
11-14-2012
05:27 PM
Hi Anthony,
Are you taking part in our DDT webinar? Maybe this question will be discussed there.
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
