Forum Discussion
11 Replies
- ronrheContributorHi Allen,
thanks for your quick answer.
So now i have to start coding for many fields in my screen. This is not very userfriendly.
This will cost a lot of time. It's very common that not all fields in a screen need input.
To me this is really a severe shortcomming in testcomplete.
regards
ronald - ronrheContributorHi Louis,
A work around is the same as a bug.
Testcomplete claims to be complete, but it doesn't support a very simple issue like this one.
The solution by David works ok. Putting a ' in the field. But it still is not a nice good way to go. I good live with it to put the text null in these fields, so it's obvious what the meaning is.
To me a test must be as simple as possible to make sure you only find bugs in the application you want to test and not in the test itself.
In some cases scripting can be useful, but i want to use it as little as possible.
The only reason i transform my test to scripts is the huge difference in speed when the executes . Which, i think, also is a bug.
regards
ronald - RavikSuper ContributorHi David,
As you mention - In case Excel column cells have the text format, you can add an apostrophe in each empty cell of this column. but in our application does not allowed special character, so it is best for us to left the field are empty.
I thing TestComplete should give any mechanism for passing empty value
Hi David,
This is the way in which the Data-Driven feature and DB Table variables work: they use an OLE DB provider from Microsoft to retrieve data.
If you do not like this approach, you are free to work with Excel using COM. This is a slightly more complex way of reading Excel sheets, but you will not have to care about field types. Information on this approach can be found in the Working With Excel Files via COM help topic.
Hi Ronald,
In case Excel column cells have the text format, you can add an apostrophe in each empty cell of this column.
In case of other formats, you can apply the workarounds Allen has already mentioned.- LouisContributorI encountered this problem and agree it is a short coming. There is also an issue in changing the data type within the excel column e.g form letters to numbers. Working in keyword scripting myself, I tried all the various ways of formatting the data. Non of it worked. I ended up using logic functionality and replacing null fields and other problem cells with the excel data with unique values that when encountered caused test complete to run a "slave" script for the desired action. e.g within a column of numbers null was replaced with an unused number 888 when this value was encountered a script was run that just moved to the next action without entering the value. This was extra work and really time wasted but id did circumvent this problem.
Hi Ronald and Louis,
All the peculiarities you mention are connected with the functioning of Microsoft ODBC Driver, not TestComplete.The only reason i transform my test to scripts is the huge difference in speed when the executes
Try increasing the performance by following recommendations in the Automated Test Performance Tips article.- Ruhul_IkramOccasional Contributor
Hi,
I have a quick question, I am using TestComplete9 data driven from excel. In certain rows I have null value because its not needed all the time and when I hit playback shows exception mismatch, how should i handle null value coming from excel and dont fail the test. I am relatively new at TestComplete and I don't want to write any custom functions.
If I have to enter apostrophe in the excel cell which one to enter? Will it count as shoud be blank in TestComplete.
- Ruhul_IkramOccasional ContributorHere is an example: The blank fields are not required field and not all the people have middle or suffix. I have to test over 50 scenarios like with other fields similar situation
1. first name, last name, middle name, suffix name -- all are populated the first time
2. first name, last name, middle name, suffix name -- middle is blank value
3. first name, last name, middle name, suffix name -- suffix is blank value
4. first name, last name, middle name, suffix name -- middle and suffix is a blank value.
I am not too much familer with JScript, VBScript, or Delphi. If it was Java I had solution right away for that and I dont want to write custom function for it. Is there any other solution to since lot of peopleover the time had same issue.