question

HoneyComb avatar image
HoneyComb asked HoneyComb posted

Compare values with file.txt

Hello,

I will write an example what I would like to do.

 

My response in iTest is:  94 01 22 53 67 95

 

and my file.txt is build like this: 

 

01 = Subnet Mask
02 = Time Offset
67 = Router

 

So, how could now I compare these numbers with numbers in file.txt? In response I would like to see list of all matched numbers, with the text from file.txt,

like in this case result should be:

 

01 = Subnet Mask

67 = Router 

 

Thank you for any answers!

 

 

 

 

iTest
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
msandeep avatar image
msandeep answered msandeep posted

Hi AG,

 

We could save the iTest response in a list variable and later by list index we could comapre each value in the list with each value in the text file.

 

Could you pleaase attach the test file with which you want to compare, we could help you in acheiving the scenario.

 

Thank You!

 

4 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

HoneyComb avatar image HoneyComb commented ·

ok, here is my test file, you can edit it as you want.

 

 

Thank you,

 

AG

 

 

 

 

0 Likes 0 ·
Parameter.txt (409 B)
msandeep avatar image msandeep HoneyComb commented ·

Hi AG,

 

I have created the sample test case as per the requirement. I did small modifications in the text file of your with some values to match more values in the scenario.

 

I am attaching the test case, response map, parameter.txt and the test report for your reference.

 

The variable "mat" shows the desired values. Please let us know how it goes!

 

0 Likes 0 ·
HoneyComb avatar image HoneyComb msandeep commented ·

it works great!

 

Thank you a lof for help is so short time!

 

AG

0 Likes 0 ·
msandeep avatar image msandeep HoneyComb commented ·

welcome :)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.