question

nitinrastogi avatar image
nitinrastogi asked nitinrastogi posted

Help with Pattern Mapping

Hi...

 

I am working on a test case where i have to login some users.Now there are two scenerios

 

1. User gets log in successfully

2. User does not get login successfully.

 

in any case the follwing line always comes in the response

                parsing [User-Name="abc"]

and when there is some problem in user login then response contains  Did not get any response in 100 milli seconds

I have created a pattern response map that has 2 queries :-

1. username()   {key}

2. success()

Now what i want is to write some query that can extract username based upon its success (pass or fail).

But when i am creating resposne map then although i have made username as the key field, but still the resposne map wizard is not making any query like success_by_username(username)

can anyone tell me please how to do that??

iTestresponse map
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

·
PatrickH avatar image
PatrickH answered PatrickH posted

Send us the response map file as an attachment and we'll take a look.

5 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.

KumarS avatar image KumarS commented ·

Sometimes response map wizard is not intelligent enough to generate the right query. In those cases, you can look at the "Structure" view and create your own query in the response map by looking at the XML.

0 Likes 0 ·
nitinrastogi avatar image nitinrastogi commented ·

Hi Patrick,

 

Attached is the response map file for yopur reference.

0 Likes 0 ·
ulogin.ffrm (303.4 KiB)
PatrickH avatar image PatrickH nitinrastogi commented ·

The problem here is that you have two patterns that are essentially independent of each other, and you want a query that correlates the two.  This won't work as you currently have it set up.

 

I would replace the two patterns with one that spans all the lines of text between the Parsing ... and the did [not] ... lines. You can do this by setting the Raw mode under "Describe how to search". Now your two queries should be working off the same match, and therefore it should be able to properly use one of the values as a key.

0 Likes 0 ·
nitinrastogi avatar image nitinrastogi PatrickH commented ·

Patrick,

 

Sorry,I dont really get what you are saying..do you mean that i should enclose my entire response between parsing username.....Did not get any reply.  or is it that  by setting the Raw mode under "Describe how to search" it would be automatically done???

 

Would it be possible for you to send me with a sample response map by the way you are suggesting?

 

Thanks.

0 Likes 0 ·
SumithaR avatar image SumithaR nitinrastogi commented ·

Hi Patrick/Nitin,

 

could you please help on the above one... even i have landed in the same problem.

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.