aspose file tools*
The moose likes Testing and the fly likes Problem in using Regular Expression Extractor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Problem in using Regular Expression Extractor" Watch "Problem in using Regular Expression Extractor" New topic
Author

Problem in using Regular Expression Extractor

Raminder Singh
Ranch Hand

Joined: Mar 01, 2002
Posts: 72
hi all,
i'm providing details of problem i'm facing.
I have to extract values from a server response, save in a variable and pass along with URL of next HTTP request.
Lets say reqA generates resA. in reqB there is variable hotelNumber=1 append in URL.
Now i'm using Post-Processer Regular Expression Extractor to extract value from resA with Reference Name:HN/Regular Expression:hotelNumber=(.+?)/Template:$1$/Match No:1.
now in HTTP Request sampler, i'm using Pre-processer user parameters with name:hotelName/user_1:$HN(as reference name in Regular Expression Extractor ).
but value of hotelNumber not appending with reqB.
where am going wrong?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
May I ask how is this related to Testing? If it isn't, then I'd strongly suggest posting the question to the "Java in General (Advanced)" forum.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Raminder Singh
Ranch Hand

Joined: Mar 01, 2002
Posts: 72
I'm doing this all in JMeter.
What i asked, is part of writing test scripts in JMeter for my application.
Amit Tomer
Greenhorn

Joined: Jan 03, 2005
Posts: 1
Raminder,
I am also facing same problem in JMeter script. I have to process value of one variable from HTML response. If you were able to get through your problem, could you pls share it here.

Thanks
Amit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in using Regular Expression Extractor