Extract multiple values in one Custom Extraction Rule  
Author Message
Lewis Horowitz





PostPosted: Visual Studio Team System - Testing, Extract multiple values in one Custom Extraction Rule Top

Is there a way to extract multiple text values in one custom extraction rule Our website requires a number of parameters for subsequent calls (some which could be blank) however I don't want to add 10 different extraction rules to each response. An example of the data to get would be:

FileNumber=102103041

TransactionNumber=A934993434

RecordNumber=423443553

ClientNumber=49230

ClientDivision=50403

PolicyNumber=32452

AccountRecord=

AdditionalData=X543F43D345W342345

(VB Code please)

Thanks in advance.



Visual Studio Team System33  
 
 
ChrisPat MSFT





PostPosted: Visual Studio Team System - Testing, Extract multiple values in one Custom Extraction Rule Top

In order to use the built in databinding in the ui you would have to put each value in it's own context parameter.

I suppose if you were going to execute a coded web test you could use an extraction rule that added a bunch of context parameters and then pull them out and bind them to the appropriate request parameters in your code.



 
 
fodnick96





PostPosted: Visual Studio Team System - Testing, Extract multiple values in one Custom Extraction Rule Top

a custom extraction rule would work... but I am not sure how to remove text from response like the built in extract text works... I think it uses regular expressions but I am not sure... anyway know code to extract text from a html response using a starts with and ends with would be nice.

~Todd

 
 
ChrisPat MSFT





PostPosted: Visual Studio Team System - Testing, Extract multiple values in one Custom Extraction Rule Top

The current extract text rule lets you specify a starts with and ends with string. This will extract the text between the to delimiters and place it into a context parameter.