question

GregM avatar image
GregM asked GregM posted

Tip: Steps to creating response filter

Response filters are applied only to test case response, not to the sample responses in a response map file.  So the way to create a response filter and a response map is as follows:

 

1.       Have a test case that generates the desired response

2.       Create a response map for the step with the response

a.       Don’t bother saving a sample yet

b.      Don’t bother with mapping technology yet

3.       Create the response filter, but us the test case response to debug

4.       Now copy the filtered response from the test case response view to a sample in the response map

5.       Create your response map as usual in the response map editor

 

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

·
cocov avatar image
cocov answered cocov posted

Some of data in the responses have been broken by a carriage return so I have to create a response filter to exclude this character. Is there a way that I can set this filter global some where in iTest session profile? Currently, I have to set this filter in many steps under Step Properties/Reponse Filters.

 

For example, my response returns some thing as below and I just interest to the number 208116108252603, however this number sometimes is seperated by "\n"

 

"TEA_TEA";"ISTATUS";[COMMAND]="START CALL";[STATUS]="OK";[INFO]="Command Id : 1234 Started OK";"TEA_TEA";"DSTATUS";[COMMAND]="START CALLING";[STATUS]="OK";[INFO]="2 Modems available, 1 Network adapters available, 3 used : MS1:20811610
8252603 MS2 MS3:208116108252562 ";

2 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 ·

You can set the response filter at different levels:

1. A step in a testcase

2. Testcase itself (this will apply to all steps)

3. Session profile (these filters will apply to all steps which use this session profile)

4. Response map

0 Likes 0 ·
dclaar avatar image dclaar KumarS commented ·

It would be really hand if the response filter in the response map was applied to the samples. After all, you're probably adding the response filter because your DUT misbehaved, and it would be nice to grab that misbehaving sample and check the response filter against it. Otherwise, you have to run the test over and over, and--if the thing you are filtering out doesn't always happen--then that can be a pain!

 

 

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.