You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Josh Feldman <jo...@eons.com> on 2006/07/06 18:53:40 UTC

Using multiple variable arrays for link validation

I am trying to validate links on a page. The page I am testing involves
different servers so I am using two regular expressions to capture both
the servers and the paths. The issue I am having is matching up the
positions of the arrays so that the right server matches the right path.
Below is my test script outline

 

Http request

            Regular expression: a\shref=".*?(dev|com)(/[^"]+)" to
capture path

Regular expression: ://([^"]+(dev|com))/ to capture server

For Each Controller:       input prefix- server          output-
returnVar

            Http request calling up returnVar

 

 

This script runs through all the servers on the page however I can't
figure out a way to match up the servers with the paths

 

A ForEach controller within a ForEach controller gives me too many
requests; it goes through each server with each path

 

I think if I incorporate a counter into the script it might work, but I
have been unsuccessful.

 

Any help would be great

Josh Feldman


Re: Using multiple variable arrays for link validation

Posted by sebb <se...@gmail.com>.
Try using two sets of brackets to capture both fields at the same
time, and then use the group field variables _g1, _g2 to refer to
them.

On 06/07/06, Josh Feldman <jo...@eons.com> wrote:
> I am trying to validate links on a page. The page I am testing involves
> different servers so I am using two regular expressions to capture both
> the servers and the paths. The issue I am having is matching up the
> positions of the arrays so that the right server matches the right path.
> Below is my test script outline
>
>
>
> Http request
>
>             Regular expression: a\shref=".*?(dev|com)(/[^"]+)" to
> capture path
>
> Regular expression: ://([^"]+(dev|com))/ to capture server
>
> For Each Controller:       input prefix- server          output-
> returnVar
>
>             Http request calling up returnVar
>
>
>
>
>
> This script runs through all the servers on the page however I can't
> figure out a way to match up the servers with the paths
>
>
>
> A ForEach controller within a ForEach controller gives me too many
> requests; it goes through each server with each path
>
>
>
> I think if I incorporate a counter into the script it might work, but I
> have been unsuccessful.
>
>
>
> Any help would be great
>
> Josh Feldman
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org