This is a migrated thread and some comments may be shown as answers.

Removed dots from IP address while data driven test

3 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Veteran
Paul asked on 08 Jun 2020, 03:54 PM

Hi,

i've a problem with typing in of IP adresses while using CSV / data driven testing.

The first tiny "bug" is, that the setting "ClearCurrentText" almost never clears the complete field. This is in this case a big problem, because the IP has a specified length and cannot by typed in at full length.  The auto-clear removes only several chars of the text. In the case of the IP address 5...7 chars remains.
This makes it necessery for some textboxes to add additional steps to crear the boxes manually.

 

The main problem:   the dot's in the IP address are not typed in.  I've tried severel settings - but nothing changes.

Used value - 1:1 copy of the address from my CSV file:   192.168.61.155

Typed in text in silverlight app in internet explorer:           19216861155   (see screenshots)

I've tried then several other chars behind the address and found one which makes this working:   when "=" iss added somewhere in the string the dots are correctly entered. The equal sign itself is NOT typed in by test  studio.  The position in the string does not matter - it can also stand in the middle of the IP address.

Actually i have to type in IP addresses in CSV this way to have it working:          ....,192.168.61.157=,....    (see screenshots)

Best regards

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Plamen Mitrev
Telerik team
answered on 11 Jun 2020, 11:40 AM

Hi Paul,

I am sorry to hear about the encountered misbehavior with data driven tests and CSV external source and I will try to help you with that.

The IP address trimming is actually a known issue. The reason why this is happening is because of the Ole DB driver, which TestStudio is using under the hood. In details Ole DB is asked to create in-memory DataTable. The first row becomes the 'columns' the second and so on are the actual data. As each column/row value are scanned a data type is extrapolated.

Since all rows are IPs - 192.168.0.1 and based on the Windows Culture settings, where the "." is a decimal separator, the DB driver matches this to 'numeric' value and trims it to "192.168".

So even if this is valid CSV:

    UserName,Password,IP
    user1,pass1,192.168.1.1

The way Ole DB is reading it is:

    Column('UserName') Column('Password') Column('IP')
    (string)user1 (string)pass1 (decimal/numeric)192.168

In order to get around this the IP values must be escaped:

    UserName,Password,IP
    user1,pass1,"192.168.1.1"

Adding the double quotation marks will force the DB driver to read it as string. Note this needs to be applied to each row, if a single row is not escaped this way, the whole column will be interpreted as 'numeric'. Please go ahead and add the necessary double quotations around all numeric values, so that they are not trimmed unnecessarily.

As for the "ClearCurrentText" functionality, I understand that you have found a workaround and the issues is not consistent for all fields. I will appreciate, if you can share a project and sample application that reproduces the misbehavior, so I can explore and investigate it on my end.

I hope the above details will help you automate the test scenario with data binding. Please do not hesitate to contact us again, if you need further assistance, or you have follow up questions.

Regards,
Plamen Mitrev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Paul
Top achievements
Rank 1
Veteran
answered on 15 Jun 2020, 07:18 AM

"Adding the double quotation marks will force the DB driver to read it as string. Note this needs to be applied to each row, if a single row is not escaped this way, the whole column will be interpreted as 'numeric'."

Thanks a lot!  :)   The IP was the only field failed, because the other are real numeric or pure text fields. I will add qutes to all non-numeric fields.

0
Plamen Mitrev
Telerik team
answered on 15 Jun 2020, 08:00 AM

Hi Paul,

I am glad to know that surrounding the IP values with double quotes helped you with the test execution. If there is anything that concerns you, please do not hesitate to contact us again.

Wish you a great week ahead.

Regards,
Plamen Mitrev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Veteran
Answers by
Plamen Mitrev
Telerik team
Paul
Top achievements
Rank 1
Veteran
Share this question
or