Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SOAVIRT_9.10.8_CTP_3.1.4

This topic explains how Virtualize groups messages together in the "Generate Parameterized Messages from Traffic" wizard. The way that messages are groups determines what responders are generated (one responder is generated for each message group)Virtualize generates a responder for each message, so the groupings are important for determining which responders are generated.  

Sections include:

Table of Contents
maxLevel1

Understanding Grouping

The way that Virtualize groups messages by operation/type is influenced by both a) Virtualize’s Virtualize's analysis of the given traffic and b) the grouping criteria that you choose to apply affect how Virtualize groups messages. Recommended grouping strategies are automatically selected; these recommendations can be adjusted and overridden as you see fit. , but you can adjust and override them as necessary. 

Traffic is analyzed and processed Virtualize takes the approach of analyzing the traffic in two stages: first it recommends what

  1. First, Virtualize recommends which grouping strategies should be enabled

...

  1. .
  2. Next, Virtualize applies the selected strategies to divide the messages into groups.

When creating PVAs, one responder is generated for each group.

...

For example, if the traffic contains the following HTTP URL paths (omitting HTTP methods, URL parameters and other factors for brevity) 


Code Block
/service/order/v1/1/summary 
/service/order/v1/2/summary 
/service/order/v1/2/summary
/service/customer/v1/a/contact 
/service/customer/v1/b/contact 
/Foo
/Foo

 


Virtualize will create three responders in the generated PVA:

...

Virtualize configures URL path segment indexes when creating a new PVA so that each group (responder) can respond to the same requests with varying URL Path values. It configures URL path parameters by providing a segment index. For example, given the following URLs 


Code Block
/rest/api/2/version/1234/relatedIssueCounts 
/rest/api/2/version/4568/relatedIssueCounts 
/rest/api/2/version/4567/relatedIssueCounts

...


Virtualize will designate the fifth path segment (the one with the 4 digit number) to be parameterized with a data source. Response data for each of these IDs can then be data-driven without the need to edit the PVA.

...

For example, if the traffic contains the following URL parameters 


Code Block
?oid=1&category=women
?oid=2&category=women
?oid=1&category=babies
?ssn=1234567890&state=CA&category=silver 
?ssn=1234567891&state=CA&category=gold

...


Virtualize will split the responders in the generated PVA based on the presence of oid, ssn and state parameters as follows (each responder to have the following responder correlation criteria)

...

For example, if the traffic contains the following URL parameters

 


Code Block
?oid=1&category=women
?oid=2&category=women
?oid=1&category=babies
?ssn=1234567890&state=CA&category=silver 
?ssn=1234567891&state=CA&category=gold

 


Virtualize will split the responders in the generated PVA based on the following responder correlation criteria:

...

For example, given the following messages in the traffic file

 


Code Block
GET /service/order/v1/1/summary?oid=1&category=women
GET /service/order/v1/2/summary?oid=1&category=women
GET /service/order/v1/2/summary?oid=1&category=babies
POST /service/customer/v1/a/contact?ssn=1234567890&state=CA&category=silver 
POST /service/customer/v1/b/contact?ssn=1234567891&state=CA&category=gold 
POST /Foo
POST /Foo

...


Virtualize will group them into responders based on the following criteria for each responder/group:

 


Group/ResponderHTTP MethodsURL PathsURL Parameter PresenceRequest Body Content
1GETsummaryoid 
2POSTcontactssn, state 
3POSTFoo 
child 1 of Body = myOperation