You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sharmila Renganathan <sh...@gmail.com> on 2012/08/23 16:40:54 UTC

Need help: Very urgent : When a variable is send to a request as input parameter, + is replaced with %2B, '/' is replaced as '%2F' and '=' as %3D

Hi,

In a response data,i have a value 'net+work'.I am using regular expression
extractor and getting the value in the variable var1.
When i use this variable in my next request, it is getting replaced as
'net%2Bwork' .
When i analzed, %2B is the ascii value for the '+'. (refer:
http://web.cs.dal.ca/~jamie/cs4173/examples/XHTML/entities/ASCII.html )
Similarly '/' is replaced as '%2F' and '=' as %3D.
So my request is getting failed. I dont get the proper response.
I used bean shell sampler to replace '%2B' with + and i put the new value
in a variable var_new.
When i used this var_new as input to another request, Its again replacing
with '%2B'
Its a show stopper issue for me to proceed further.
Can any one please come with a solution for this.

Regards,
Sharmila R

Re: Need help: Very urgent : When a variable is send to a request as input parameter, + is replaced with %2B, '/' is replaced as '%2F' and '=' as %3D

Posted by Shaba K <sh...@gmail.com>.
@Madhu,

http://automationwithselenium.blogspot.co.uk/2012/02/regular-expression-extractor-testing.html


have a look at this blog

Hope it helps you

cheers,
s

On Thu, Aug 23, 2012 at 4:34 PM, sharmila Renganathan <sharmila1.r@gmail.com
> wrote:

> Extracted value is the one got from regular expression extractor.
> Say , i extract a value and store it in a variable say Var1.
> I use this variable in my next request as an input parameter  ${var1}.
> There will be encode option for every input parameter.
> We need to uncheck the encode checkbox corresponding parameter (where u
> enter ${var1})
>
> Regards,
> Sharmila R
>
> On Thu, Aug 23, 2012 at 11:14 AM, madhu sekhar <madhuvchandana@gmail.com
> >wrote:
>
> >  Sharmila,
> >
> > What is extrcted value here?
> >
> > On Thu, Aug 23, 2012 at 8:42 PM, sharmila Renganathan <
> > sharmila1.r@gmail.com
> > > wrote:
> >
> > > Hey Niraj,
> > >
> > > Thnx a lot. Its working now !!!
> > >
> > > Regards,
> > > Sharmila R
> > >
> > > On Thu, Aug 23, 2012 at 10:49 AM, Niraj <ni...@gmail.com>
> > wrote:
> > >
> > > > Second solution will be
> > > >
> > > > Reg will return: ${extarctedvalue}
> > > >
> > > > You'll have to Uncheck "Encode" column of the row where
> > ${extarctedvalue}
> > > > is used
> > > >
> > > > - Niraj
> > > >
> > > > On Thu, Aug 23, 2012 at 8:10 PM, sharmila Renganathan <
> > > > sharmila1.r@gmail.com
> > > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > In a response data,i have a value 'net+work'.I am using regular
> > > > expression
> > > > > extractor and getting the value in the variable var1.
> > > > > When i use this variable in my next request, it is getting replaced
> > as
> > > > > 'net%2Bwork' .
> > > > > When i analzed, %2B is the ascii value for the '+'. (refer:
> > > > >
> > http://web.cs.dal.ca/~jamie/cs4173/examples/XHTML/entities/ASCII.html)
> > > > > Similarly '/' is replaced as '%2F' and '=' as %3D.
> > > > > So my request is getting failed. I dont get the proper response.
> > > > > I used bean shell sampler to replace '%2B' with + and i put the new
> > > value
> > > > > in a variable var_new.
> > > > > When i used this var_new as input to another request, Its again
> > > replacing
> > > > > with '%2B'
> > > > > Its a show stopper issue for me to proceed further.
> > > > > Can any one please come with a solution for this.
> > > > >
> > > > > Regards,
> > > > > Sharmila R
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > madhu kk
> >
>

Re: Need help: Very urgent : When a variable is send to a request as input parameter, + is replaced with %2B, '/' is replaced as '%2F' and '=' as %3D

Posted by sharmila Renganathan <sh...@gmail.com>.
Extracted value is the one got from regular expression extractor.
Say , i extract a value and store it in a variable say Var1.
I use this variable in my next request as an input parameter  ${var1}.
There will be encode option for every input parameter.
We need to uncheck the encode checkbox corresponding parameter (where u
enter ${var1})

Regards,
Sharmila R

On Thu, Aug 23, 2012 at 11:14 AM, madhu sekhar <ma...@gmail.com>wrote:

>  Sharmila,
>
> What is extrcted value here?
>
> On Thu, Aug 23, 2012 at 8:42 PM, sharmila Renganathan <
> sharmila1.r@gmail.com
> > wrote:
>
> > Hey Niraj,
> >
> > Thnx a lot. Its working now !!!
> >
> > Regards,
> > Sharmila R
> >
> > On Thu, Aug 23, 2012 at 10:49 AM, Niraj <ni...@gmail.com>
> wrote:
> >
> > > Second solution will be
> > >
> > > Reg will return: ${extarctedvalue}
> > >
> > > You'll have to Uncheck "Encode" column of the row where
> ${extarctedvalue}
> > > is used
> > >
> > > - Niraj
> > >
> > > On Thu, Aug 23, 2012 at 8:10 PM, sharmila Renganathan <
> > > sharmila1.r@gmail.com
> > > > wrote:
> > >
> > > > Hi,
> > > >
> > > > In a response data,i have a value 'net+work'.I am using regular
> > > expression
> > > > extractor and getting the value in the variable var1.
> > > > When i use this variable in my next request, it is getting replaced
> as
> > > > 'net%2Bwork' .
> > > > When i analzed, %2B is the ascii value for the '+'. (refer:
> > > >
> http://web.cs.dal.ca/~jamie/cs4173/examples/XHTML/entities/ASCII.html)
> > > > Similarly '/' is replaced as '%2F' and '=' as %3D.
> > > > So my request is getting failed. I dont get the proper response.
> > > > I used bean shell sampler to replace '%2B' with + and i put the new
> > value
> > > > in a variable var_new.
> > > > When i used this var_new as input to another request, Its again
> > replacing
> > > > with '%2B'
> > > > Its a show stopper issue for me to proceed further.
> > > > Can any one please come with a solution for this.
> > > >
> > > > Regards,
> > > > Sharmila R
> > > >
> > >
> >
>
>
>
> --
> madhu kk
>

Re: Need help: Very urgent : When a variable is send to a request as input parameter, + is replaced with %2B, '/' is replaced as '%2F' and '=' as %3D

Posted by madhu sekhar <ma...@gmail.com>.
 Sharmila,

What is extrcted value here?

On Thu, Aug 23, 2012 at 8:42 PM, sharmila Renganathan <sharmila1.r@gmail.com
> wrote:

> Hey Niraj,
>
> Thnx a lot. Its working now !!!
>
> Regards,
> Sharmila R
>
> On Thu, Aug 23, 2012 at 10:49 AM, Niraj <ni...@gmail.com> wrote:
>
> > Second solution will be
> >
> > Reg will return: ${extarctedvalue}
> >
> > You'll have to Uncheck "Encode" column of the row where ${extarctedvalue}
> > is used
> >
> > - Niraj
> >
> > On Thu, Aug 23, 2012 at 8:10 PM, sharmila Renganathan <
> > sharmila1.r@gmail.com
> > > wrote:
> >
> > > Hi,
> > >
> > > In a response data,i have a value 'net+work'.I am using regular
> > expression
> > > extractor and getting the value in the variable var1.
> > > When i use this variable in my next request, it is getting replaced as
> > > 'net%2Bwork' .
> > > When i analzed, %2B is the ascii value for the '+'. (refer:
> > > http://web.cs.dal.ca/~jamie/cs4173/examples/XHTML/entities/ASCII.html)
> > > Similarly '/' is replaced as '%2F' and '=' as %3D.
> > > So my request is getting failed. I dont get the proper response.
> > > I used bean shell sampler to replace '%2B' with + and i put the new
> value
> > > in a variable var_new.
> > > When i used this var_new as input to another request, Its again
> replacing
> > > with '%2B'
> > > Its a show stopper issue for me to proceed further.
> > > Can any one please come with a solution for this.
> > >
> > > Regards,
> > > Sharmila R
> > >
> >
>



-- 
madhu kk

Re: Need help: Very urgent : When a variable is send to a request as input parameter, + is replaced with %2B, '/' is replaced as '%2F' and '=' as %3D

Posted by sharmila Renganathan <sh...@gmail.com>.
Hey Niraj,

Thnx a lot. Its working now !!!

Regards,
Sharmila R

On Thu, Aug 23, 2012 at 10:49 AM, Niraj <ni...@gmail.com> wrote:

> Second solution will be
>
> Reg will return: ${extarctedvalue}
>
> You'll have to Uncheck "Encode" column of the row where ${extarctedvalue}
> is used
>
> - Niraj
>
> On Thu, Aug 23, 2012 at 8:10 PM, sharmila Renganathan <
> sharmila1.r@gmail.com
> > wrote:
>
> > Hi,
> >
> > In a response data,i have a value 'net+work'.I am using regular
> expression
> > extractor and getting the value in the variable var1.
> > When i use this variable in my next request, it is getting replaced as
> > 'net%2Bwork' .
> > When i analzed, %2B is the ascii value for the '+'. (refer:
> > http://web.cs.dal.ca/~jamie/cs4173/examples/XHTML/entities/ASCII.html )
> > Similarly '/' is replaced as '%2F' and '=' as %3D.
> > So my request is getting failed. I dont get the proper response.
> > I used bean shell sampler to replace '%2B' with + and i put the new value
> > in a variable var_new.
> > When i used this var_new as input to another request, Its again replacing
> > with '%2B'
> > Its a show stopper issue for me to proceed further.
> > Can any one please come with a solution for this.
> >
> > Regards,
> > Sharmila R
> >
>

Re: Need help: Very urgent : When a variable is send to a request as input parameter, + is replaced with %2B, '/' is replaced as '%2F' and '=' as %3D

Posted by Niraj <ni...@gmail.com>.
Second solution will be

Reg will return: ${extarctedvalue}

You'll have to Uncheck "Encode" column of the row where ${extarctedvalue}
is used

- Niraj

On Thu, Aug 23, 2012 at 8:10 PM, sharmila Renganathan <sharmila1.r@gmail.com
> wrote:

> Hi,
>
> In a response data,i have a value 'net+work'.I am using regular expression
> extractor and getting the value in the variable var1.
> When i use this variable in my next request, it is getting replaced as
> 'net%2Bwork' .
> When i analzed, %2B is the ascii value for the '+'. (refer:
> http://web.cs.dal.ca/~jamie/cs4173/examples/XHTML/entities/ASCII.html )
> Similarly '/' is replaced as '%2F' and '=' as %3D.
> So my request is getting failed. I dont get the proper response.
> I used bean shell sampler to replace '%2B' with + and i put the new value
> in a variable var_new.
> When i used this var_new as input to another request, Its again replacing
> with '%2B'
> Its a show stopper issue for me to proceed further.
> Can any one please come with a solution for this.
>
> Regards,
> Sharmila R
>