question

RoyL avatar image
RoyL asked Spirent_Admin edited

Tip: When there are multiple response formats for a particular command

 

You might want to develop multiple response maps for a command that returns different responses in different conditions. For example:
  • A command returns five columns of data on one platform and only three columns on a different platform
  • Platform-independent teams must test features across several platforms and responses can vary widely
Key strategies
  • Develop a unique response map for each form of the response and let iTest choose which response map to apply (by keeping the maps together in a response map library).
  • Configure identical Applicability settings for each response map.
  • Ensure that iTest cycles through all applicable maps when attempting to map a response. With this setting, if mapping fails for one map, iTest generates an error and then tries the next applicable map. If any map ultimately succeeds in mapping the response, then iTest does not generate an error message.
For table maps: On the Table page of the Response Map editor, we check the
Required: Generate an error if the table is not found at least once check box.
For p attern maps: On the Pattern page of the Response Map editor, we check the
Generate an error if no matches are found check box.
For block maps: On the Block page of the Response Map editor, for all blocks
and containers,we check the
T his block/container must appear at least once check box.

 

 

iTestresponse mapblock mappattern 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

·
bbaker avatar image
bbaker answered bbaker posted

I have a pattern map that may or may not contain a certain output.  This forces me to disable the option "Generate an error if no matches are found".  I now have to update this map to handle two different formats for when the response does contain output.

 

How can you create a response map that supports multiple output formats, but not generate an error if there is no outupt?

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.

amresh avatar image amresh commented ·

Hi Bill,

We can create a response map for multiple output formats by adding multiple samples in a response map file.

We need to make sure that in a single response map file, we could use only Pattern and Table mapping (or) Block.We cannot use three in a single response map file at once.

Thanks,

0 Likes 0 ·
bbaker avatar image bbaker amresh commented ·

Yes, I have each format of output in a single response map as different samples.  I have then built one pattern for the first sample, and a second pattern for the other sample.  For each pattern I have disabled "Generate an error if no matches are found" because sometimes, the response may not contain the output, and because with two different sampels, one pattern will always generate an error for the sample it doesn't match.

 

My problem is when my output matches the second sample, and second pattern, iTest is still applying the first pattern.

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.