You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Noel O'Brien <no...@newbay.com> on 2009/08/24 11:42:22 UTC

Re: How to extract or match a response inside the Downloadable file of response to a HTTP hit?

Is the file being downloaded a text or binary file? Do file have arbitrary content of will there be markers in the file (e.g. headers in binary files)? 

For example, a PDF file is binary but has a header in the file which can be asserted on to prove it's a PDF. 

Regards, 
Noel 

----- "indireddysankar" <in...@gmail.com> wrote: 
> Hi all, 
> I am doing functionality test using Jmeter.I am a problem in 
> matching response assertion. 
> 
> The repsonse content Type is "plain/X-USSD-request" and the response is 
> coming as a downloadable file , inside which i need to match the assertion. 
> 
> Please guide me how i can achieve this...It seems we can achieve using 
> Beanshell asstertion but i am good at coding. 
> 
> Is there any simple way to test this..? 
> 
> 
> Thanks in Advance , 
> -Siva 
> 

Re: How to extract or match a response inside the Downloadable file of response to a HTTP hit?

Posted by indireddysankar <in...@gmail.com>.
Ok Sebb ,
             I will try using Beanshell assertions...I think this the time i
need to learn Beanshell scripting..
Thanks for ur help

On 8/24/09, sebb <se...@gmail.com> wrote:
>
> On 24/08/2009, indireddysankar <in...@gmail.com> wrote:
> > Hi,
> >
> >  Thanks for quick reply ,
> >
> >  My response is just a text file as ussd.jsp  having content like "Please
> >  tell your favorite pet name"
> >
> >  I need to match this using an assertion.
> >
> >  Can i crosscheck the content of the files saved using
> >  Save_Responses_to_a_file , across the assertions ? because i have lot of
> >  files filed up .I can not check these many manually.
> >
> >      Please help me in this.
>
>
> It's not possible using standard JMeter Assertions.
>
> The intended usage of Save Responses in this case is to use an
> external script or utility to compare the downloaded files with a set
> of expected results.
>
> If you know some Java, you could use the BeanShell Assertion to check
> the contents of the saved file.
>
>
> >
> >
> >
> >  On 8/24/09, sebb <se...@gmail.com> wrote:
> >  >
> >  > The
> >  >
> >  >
> >  >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file
> >  >
> >  > test element may be useful here.
> >  >
> >  > Run the test, and check the resulting file against the expected data.
> >  >
> >  >
> >  >
> >  > On 24/08/2009, Noel O'Brien <no...@newbay.com> wrote:
> >  > > Is the file being downloaded a text or binary file? Do file have
> >  > arbitrary content of will there be markers in the file (e.g. headers
> in
> >  > binary files)?
> >  > >
> >  > >  For example, a PDF file is binary but has a header in the file
> which can
> >  > be asserted on to prove it's a PDF.
> >  > >
> >  > >  Regards,
> >  > >
> >  > > Noel
> >  > >
> >  > >
> >  > >  ----- "indireddysankar" <in...@gmail.com> wrote:
> >  > >  > Hi all,
> >  > >  > I am doing functionality test using Jmeter.I am a problem in
> >  > >  > matching response assertion.
> >  > >  >
> >  > >  > The repsonse content Type is "plain/X-USSD-request" and the
> response
> >  > is
> >  > >  > coming as a downloadable file , inside which i need to match the
> >  > assertion.
> >  > >  >
> >  > >  > Please guide me how i can achieve this...It seems we can achieve
> using
> >  > >  > Beanshell asstertion but i am good at coding.
> >  > >  >
> >  > >  > Is there any simple way to test this..?
> >  > >  >
> >  > >  >
> >  > >  > Thanks in Advance ,
> >  > >  > -Siva
> >  > >  >
> >  >
> >  >
> >
> > > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >  >
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How to extract or match a response inside the Downloadable file of response to a HTTP hit?

Posted by sebb <se...@gmail.com>.
On 24/08/2009, indireddysankar <in...@gmail.com> wrote:
> Hi,
>
>  Thanks for quick reply ,
>
>  My response is just a text file as ussd.jsp  having content like "Please
>  tell your favorite pet name"
>
>  I need to match this using an assertion.
>
>  Can i crosscheck the content of the files saved using
>  Save_Responses_to_a_file , across the assertions ? because i have lot of
>  files filed up .I can not check these many manually.
>
>      Please help me in this.

It's not possible using standard JMeter Assertions.

The intended usage of Save Responses in this case is to use an
external script or utility to compare the downloaded files with a set
of expected results.

If you know some Java, you could use the BeanShell Assertion to check
the contents of the saved file.

>
>
>
>  On 8/24/09, sebb <se...@gmail.com> wrote:
>  >
>  > The
>  >
>  >
>  > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file
>  >
>  > test element may be useful here.
>  >
>  > Run the test, and check the resulting file against the expected data.
>  >
>  >
>  >
>  > On 24/08/2009, Noel O'Brien <no...@newbay.com> wrote:
>  > > Is the file being downloaded a text or binary file? Do file have
>  > arbitrary content of will there be markers in the file (e.g. headers in
>  > binary files)?
>  > >
>  > >  For example, a PDF file is binary but has a header in the file which can
>  > be asserted on to prove it's a PDF.
>  > >
>  > >  Regards,
>  > >
>  > > Noel
>  > >
>  > >
>  > >  ----- "indireddysankar" <in...@gmail.com> wrote:
>  > >  > Hi all,
>  > >  > I am doing functionality test using Jmeter.I am a problem in
>  > >  > matching response assertion.
>  > >  >
>  > >  > The repsonse content Type is "plain/X-USSD-request" and the response
>  > is
>  > >  > coming as a downloadable file , inside which i need to match the
>  > assertion.
>  > >  >
>  > >  > Please guide me how i can achieve this...It seems we can achieve using
>  > >  > Beanshell asstertion but i am good at coding.
>  > >  >
>  > >  > Is there any simple way to test this..?
>  > >  >
>  > >  >
>  > >  > Thanks in Advance ,
>  > >  > -Siva
>  > >  >
>  >
>  >
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>

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


Re: How to extract or match a response inside the Downloadable file of response to a HTTP hit?

Posted by indireddysankar <in...@gmail.com>.
Hi,

Thanks for quick reply ,

My response is just a text file as ussd.jsp  having content like "Please
tell your favorite pet name"

I need to match this using an assertion.

Can i crosscheck the content of the files saved using
Save_Responses_to_a_file , across the assertions ? because i have lot of
files filed up .I can not check these many manually.

     Please help me in this.



On 8/24/09, sebb <se...@gmail.com> wrote:
>
> The
>
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file
>
> test element may be useful here.
>
> Run the test, and check the resulting file against the expected data.
>
>
>
> On 24/08/2009, Noel O'Brien <no...@newbay.com> wrote:
> > Is the file being downloaded a text or binary file? Do file have
> arbitrary content of will there be markers in the file (e.g. headers in
> binary files)?
> >
> >  For example, a PDF file is binary but has a header in the file which can
> be asserted on to prove it's a PDF.
> >
> >  Regards,
> >
> > Noel
> >
> >
> >  ----- "indireddysankar" <in...@gmail.com> wrote:
> >  > Hi all,
> >  > I am doing functionality test using Jmeter.I am a problem in
> >  > matching response assertion.
> >  >
> >  > The repsonse content Type is "plain/X-USSD-request" and the response
> is
> >  > coming as a downloadable file , inside which i need to match the
> assertion.
> >  >
> >  > Please guide me how i can achieve this...It seems we can achieve using
> >  > Beanshell asstertion but i am good at coding.
> >  >
> >  > Is there any simple way to test this..?
> >  >
> >  >
> >  > Thanks in Advance ,
> >  > -Siva
> >  >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How to extract or match a response inside the Downloadable file of response to a HTTP hit?

Posted by sebb <se...@gmail.com>.
The

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Save_Responses_to_a_file

test element may be useful here.

Run the test, and check the resulting file against the expected data.


On 24/08/2009, Noel O'Brien <no...@newbay.com> wrote:
> Is the file being downloaded a text or binary file? Do file have arbitrary content of will there be markers in the file (e.g. headers in binary files)?
>
>  For example, a PDF file is binary but has a header in the file which can be asserted on to prove it's a PDF.
>
>  Regards,
>
> Noel
>
>
>  ----- "indireddysankar" <in...@gmail.com> wrote:
>  > Hi all,
>  > I am doing functionality test using Jmeter.I am a problem in
>  > matching response assertion.
>  >
>  > The repsonse content Type is "plain/X-USSD-request" and the response is
>  > coming as a downloadable file , inside which i need to match the assertion.
>  >
>  > Please guide me how i can achieve this...It seems we can achieve using
>  > Beanshell asstertion but i am good at coding.
>  >
>  > Is there any simple way to test this..?
>  >
>  >
>  > Thanks in Advance ,
>  > -Siva
>  >

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