You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by oh...@yahoo.com.INVALID on 2019/07/02 10:52:31 UTC

Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Hi,

I couldn't get the approach that I was trying in the earlier "Help get OCSP responder load test working?" thread, where I was trying to generate the OCSP request programatically, so I changed my approach. 

Now, I use an OS Process Sampler to run an "openssl ocsp" command, and that seems to be working, but I would like to have an assertion checking the response message for the string "revoked".

I tried adding a Response Assertion, but that doesn't seem to be firing at all, even if I "attach it" to the OS Process Sampler itself.

So is there a way to include an assertion in the Jmeter test plan that would check for the string "revoked" in the response message?  And, if so, how do I do that?

Thanks,
Jim

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


Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 Hi,

I should clarify what I said below.

In my BeanShell Sampler code, I am able to get the response string that results from the openssl command:

0x3732: revoked This Update: Jul 2 15:11:23 2019 GMT Reason: superseded Revocation Time: Sep 2 20:37:53 2016 GMT 

But, I cannot get that response string in the BeanShell Assertion, so I think that I need to somehow pass that string from the BeanShell Sampler to the *associated* BeanShell Assertion, but how do I do that?

Can I pass it via a variable? Would that variable be unique per-thread? 

If the variable is not unique per-thread, then I think that would work for passing the string from the Sampler to the Assertion, so is there another method to do that?

Thanks,
Jim


     On Tuesday, July 2, 2019, 11:14:10 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  Hi,

Ok, I know that I am "all over the place", but I am trying to use a BeanShell Sampler and BeanShell Assertion rather than the OS Process Sampler and Response Assertion.

I got code for a test BeanShell Sampler working based on this:

https://stackoverflow.com/questions/24514413/executing-shell-commands-through-beanshell-in-jmeter

So now I am trying to write the code for the BeanShell Assertion.

However, I cannot figure how to get the ResponseData in that BeanShell Assertion code?

I tried using:

String body= new String(ResponseData);

but it looks like the "body" is empty.

So does anyone know how I can access the actual message (from stdout) ?


Thanks,
Jim


    On Tuesday, July 2, 2019, 9:25:40 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  Is there a way to enable debug logging to see what Jmeter is doing for the Response Assertion matching?

Thanks,
Jim


    On Tuesday, July 2, 2019, 9:11:37 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  Also, according to this:

http://www.sqaforums.com/forums/blogs/ronak/220-understanding-jmeter-element-os-process-sampler.html

"Standard error (stderr) - Name of output file for standard error (STDERR). If omitted, output is captured and returned as the response data."

So it seems like the output from the "openssl ocsp" SHOULD be returned in the response data, even if it is going to STDERR?

Jim


    On Tuesday, July 2, 2019, 9:06:02 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  If I add that to the end of the command parameters in the os process sampler, I get the following in the response:

ocsp: Use -help for summary.

:(...

Jim


    On Tuesday, July 2, 2019, 8:55:44 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 It should work if you redirect stderr to stdout so
2>&1

Ivan

On Tue, Jul 2, 2019 at 2:53 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> If the output of "openssl ocsp" is going to STDERR, then dos that mean
> that there is no way to get the Response Assertion to work?
>
> Jim
>
>
>      On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  1.
> If you try it, you will probably need to set a few headers, such as
> --header='Content-Type:application/ocsp-request'
>
> 2.
> Assuming you are testing on linux. I vaguely remember, but have not time to
> try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
> Maybe you can try from bash, redirecting to a file, and seeing what's in
> the file
>
>
>
>
> On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:
>
> >  Hi,
> >
> > Re. 1: That is an interesting approach! I will try it if I have some
> time.
> >
> > Re. 2: If I use "Text Response", it looks like the Response Assertion
> > doesn't even fire (doesn't appear in the results tree). So far, only
> > checking "Response message" in the Response Assertion causes the Response
> > Assertion to appear in results, but I still am not able to get the
> > assertion to match.
> >
> > I have tried both "Contains" "revoked" and "substring" "revoked", but
> > neither succeeds.
> >
> > Thanks,
> > Jim
> >
> >
> >      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> > ivan.rancati@gmail.com> wrote:
> >
> >  Two ideas
> >
> > 1
> > If you are testing with a limited number of certificates:
> > You could manually prepare one (or more) ocsp response file with openssl,
> > then use the normal HTTP Sampler to POST that request
> >
> > openssl ocsp -issuer <ca certificate> -cert <your certificate to be
> tested>
> > -reqout <the file you will POST>
> >
> >
> > 2
> > I have a couple of test plans with OS Process Sampler and assertion. I
> use
> > "Text Response" in "Field to Test"
> > Make sure you use "Contains" if you need a regex in "Pattern to test", I
> > think "Substring" will not expand the regex
> >
> > best,
> > Ivan
> >
> >
> >
> >
> > On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
> >
> > > Hi,
> > >
> > > I couldn't get the approach that I was trying in the earlier "Help get
> > > OCSP responder load test working?" thread, where I was trying to
> generate
> > > the OCSP request programatically, so I changed my approach.
> > >
> > > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > > that seems to be working, but I would like to have an assertion
> checking
> > > the response message for the string "revoked".
> > >
> > > I tried adding a Response Assertion, but that doesn't seem to be firing
> > at
> > > all, even if I "attach it" to the OS Process Sampler itself.
> > >
> > > So is there a way to include an assertion in the Jmeter test plan that
> > > would check for the string "revoked" in the response message?  And, if
> > so,
> > > how do I do that?
> > >
> > > Thanks,
> > > Jim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>
       

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 Hi,

Ok, I know that I am "all over the place", but I am trying to use a BeanShell Sampler and BeanShell Assertion rather than the OS Process Sampler and Response Assertion.

I got code for a test BeanShell Sampler working based on this:

https://stackoverflow.com/questions/24514413/executing-shell-commands-through-beanshell-in-jmeter

So now I am trying to write the code for the BeanShell Assertion.

However, I cannot figure how to get the ResponseData in that BeanShell Assertion code?

I tried using:

String body= new String(ResponseData);

but it looks like the "body" is empty.

So does anyone know how I can access the actual message (from stdout) ?


Thanks,
Jim


     On Tuesday, July 2, 2019, 9:25:40 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  Is there a way to enable debug logging to see what Jmeter is doing for the Response Assertion matching?

Thanks,
Jim


    On Tuesday, July 2, 2019, 9:11:37 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  Also, according to this:

http://www.sqaforums.com/forums/blogs/ronak/220-understanding-jmeter-element-os-process-sampler.html

"Standard error (stderr) - Name of output file for standard error (STDERR). If omitted, output is captured and returned as the response data."

So it seems like the output from the "openssl ocsp" SHOULD be returned in the response data, even if it is going to STDERR?

Jim


    On Tuesday, July 2, 2019, 9:06:02 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  If I add that to the end of the command parameters in the os process sampler, I get the following in the response:

ocsp: Use -help for summary.

:(...

Jim


    On Tuesday, July 2, 2019, 8:55:44 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 It should work if you redirect stderr to stdout so
2>&1

Ivan

On Tue, Jul 2, 2019 at 2:53 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> If the output of "openssl ocsp" is going to STDERR, then dos that mean
> that there is no way to get the Response Assertion to work?
>
> Jim
>
>
>      On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  1.
> If you try it, you will probably need to set a few headers, such as
> --header='Content-Type:application/ocsp-request'
>
> 2.
> Assuming you are testing on linux. I vaguely remember, but have not time to
> try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
> Maybe you can try from bash, redirecting to a file, and seeing what's in
> the file
>
>
>
>
> On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:
>
> >  Hi,
> >
> > Re. 1: That is an interesting approach! I will try it if I have some
> time.
> >
> > Re. 2: If I use "Text Response", it looks like the Response Assertion
> > doesn't even fire (doesn't appear in the results tree). So far, only
> > checking "Response message" in the Response Assertion causes the Response
> > Assertion to appear in results, but I still am not able to get the
> > assertion to match.
> >
> > I have tried both "Contains" "revoked" and "substring" "revoked", but
> > neither succeeds.
> >
> > Thanks,
> > Jim
> >
> >
> >      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> > ivan.rancati@gmail.com> wrote:
> >
> >  Two ideas
> >
> > 1
> > If you are testing with a limited number of certificates:
> > You could manually prepare one (or more) ocsp response file with openssl,
> > then use the normal HTTP Sampler to POST that request
> >
> > openssl ocsp -issuer <ca certificate> -cert <your certificate to be
> tested>
> > -reqout <the file you will POST>
> >
> >
> > 2
> > I have a couple of test plans with OS Process Sampler and assertion. I
> use
> > "Text Response" in "Field to Test"
> > Make sure you use "Contains" if you need a regex in "Pattern to test", I
> > think "Substring" will not expand the regex
> >
> > best,
> > Ivan
> >
> >
> >
> >
> > On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
> >
> > > Hi,
> > >
> > > I couldn't get the approach that I was trying in the earlier "Help get
> > > OCSP responder load test working?" thread, where I was trying to
> generate
> > > the OCSP request programatically, so I changed my approach.
> > >
> > > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > > that seems to be working, but I would like to have an assertion
> checking
> > > the response message for the string "revoked".
> > >
> > > I tried adding a Response Assertion, but that doesn't seem to be firing
> > at
> > > all, even if I "attach it" to the OS Process Sampler itself.
> > >
> > > So is there a way to include an assertion in the Jmeter test plan that
> > > would check for the string "revoked" in the response message?  And, if
> > so,
> > > how do I do that?
> > >
> > > Thanks,
> > > Jim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>
      

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 Is there a way to enable debug logging to see what Jmeter is doing for the Response Assertion matching?

Thanks,
Jim


     On Tuesday, July 2, 2019, 9:11:37 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  Also, according to this:

http://www.sqaforums.com/forums/blogs/ronak/220-understanding-jmeter-element-os-process-sampler.html

"Standard error (stderr) - Name of output file for standard error (STDERR). If omitted, output is captured and returned as the response data."

So it seems like the output from the "openssl ocsp" SHOULD be returned in the response data, even if it is going to STDERR?

Jim


    On Tuesday, July 2, 2019, 9:06:02 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  If I add that to the end of the command parameters in the os process sampler, I get the following in the response:

ocsp: Use -help for summary.

:(...

Jim


    On Tuesday, July 2, 2019, 8:55:44 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 It should work if you redirect stderr to stdout so
2>&1

Ivan

On Tue, Jul 2, 2019 at 2:53 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> If the output of "openssl ocsp" is going to STDERR, then dos that mean
> that there is no way to get the Response Assertion to work?
>
> Jim
>
>
>      On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  1.
> If you try it, you will probably need to set a few headers, such as
> --header='Content-Type:application/ocsp-request'
>
> 2.
> Assuming you are testing on linux. I vaguely remember, but have not time to
> try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
> Maybe you can try from bash, redirecting to a file, and seeing what's in
> the file
>
>
>
>
> On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:
>
> >  Hi,
> >
> > Re. 1: That is an interesting approach! I will try it if I have some
> time.
> >
> > Re. 2: If I use "Text Response", it looks like the Response Assertion
> > doesn't even fire (doesn't appear in the results tree). So far, only
> > checking "Response message" in the Response Assertion causes the Response
> > Assertion to appear in results, but I still am not able to get the
> > assertion to match.
> >
> > I have tried both "Contains" "revoked" and "substring" "revoked", but
> > neither succeeds.
> >
> > Thanks,
> > Jim
> >
> >
> >      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> > ivan.rancati@gmail.com> wrote:
> >
> >  Two ideas
> >
> > 1
> > If you are testing with a limited number of certificates:
> > You could manually prepare one (or more) ocsp response file with openssl,
> > then use the normal HTTP Sampler to POST that request
> >
> > openssl ocsp -issuer <ca certificate> -cert <your certificate to be
> tested>
> > -reqout <the file you will POST>
> >
> >
> > 2
> > I have a couple of test plans with OS Process Sampler and assertion. I
> use
> > "Text Response" in "Field to Test"
> > Make sure you use "Contains" if you need a regex in "Pattern to test", I
> > think "Substring" will not expand the regex
> >
> > best,
> > Ivan
> >
> >
> >
> >
> > On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
> >
> > > Hi,
> > >
> > > I couldn't get the approach that I was trying in the earlier "Help get
> > > OCSP responder load test working?" thread, where I was trying to
> generate
> > > the OCSP request programatically, so I changed my approach.
> > >
> > > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > > that seems to be working, but I would like to have an assertion
> checking
> > > the response message for the string "revoked".
> > >
> > > I tried adding a Response Assertion, but that doesn't seem to be firing
> > at
> > > all, even if I "attach it" to the OS Process Sampler itself.
> > >
> > > So is there a way to include an assertion in the Jmeter test plan that
> > > would check for the string "revoked" in the response message?  And, if
> > so,
> > > how do I do that?
> > >
> > > Thanks,
> > > Jim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>
     

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 Also, according to this:

http://www.sqaforums.com/forums/blogs/ronak/220-understanding-jmeter-element-os-process-sampler.html

"Standard error (stderr) - Name of output file for standard error (STDERR). If omitted, output is captured and returned as the response data."

So it seems like the output from the "openssl ocsp" SHOULD be returned in the response data, even if it is going to STDERR?

Jim


     On Tuesday, July 2, 2019, 9:06:02 AM EDT, <oh...@yahoo.com.INVALID> wrote:  
 
  If I add that to the end of the command parameters in the os process sampler, I get the following in the response:

ocsp: Use -help for summary.

:(...

Jim


    On Tuesday, July 2, 2019, 8:55:44 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 It should work if you redirect stderr to stdout so
2>&1

Ivan

On Tue, Jul 2, 2019 at 2:53 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> If the output of "openssl ocsp" is going to STDERR, then dos that mean
> that there is no way to get the Response Assertion to work?
>
> Jim
>
>
>      On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  1.
> If you try it, you will probably need to set a few headers, such as
> --header='Content-Type:application/ocsp-request'
>
> 2.
> Assuming you are testing on linux. I vaguely remember, but have not time to
> try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
> Maybe you can try from bash, redirecting to a file, and seeing what's in
> the file
>
>
>
>
> On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:
>
> >  Hi,
> >
> > Re. 1: That is an interesting approach! I will try it if I have some
> time.
> >
> > Re. 2: If I use "Text Response", it looks like the Response Assertion
> > doesn't even fire (doesn't appear in the results tree). So far, only
> > checking "Response message" in the Response Assertion causes the Response
> > Assertion to appear in results, but I still am not able to get the
> > assertion to match.
> >
> > I have tried both "Contains" "revoked" and "substring" "revoked", but
> > neither succeeds.
> >
> > Thanks,
> > Jim
> >
> >
> >      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> > ivan.rancati@gmail.com> wrote:
> >
> >  Two ideas
> >
> > 1
> > If you are testing with a limited number of certificates:
> > You could manually prepare one (or more) ocsp response file with openssl,
> > then use the normal HTTP Sampler to POST that request
> >
> > openssl ocsp -issuer <ca certificate> -cert <your certificate to be
> tested>
> > -reqout <the file you will POST>
> >
> >
> > 2
> > I have a couple of test plans with OS Process Sampler and assertion. I
> use
> > "Text Response" in "Field to Test"
> > Make sure you use "Contains" if you need a regex in "Pattern to test", I
> > think "Substring" will not expand the regex
> >
> > best,
> > Ivan
> >
> >
> >
> >
> > On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
> >
> > > Hi,
> > >
> > > I couldn't get the approach that I was trying in the earlier "Help get
> > > OCSP responder load test working?" thread, where I was trying to
> generate
> > > the OCSP request programatically, so I changed my approach.
> > >
> > > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > > that seems to be working, but I would like to have an assertion
> checking
> > > the response message for the string "revoked".
> > >
> > > I tried adding a Response Assertion, but that doesn't seem to be firing
> > at
> > > all, even if I "attach it" to the OS Process Sampler itself.
> > >
> > > So is there a way to include an assertion in the Jmeter test plan that
> > > would check for the string "revoked" in the response message?  And, if
> > so,
> > > how do I do that?
> > >
> > > Thanks,
> > > Jim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>
    

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 If I add that to the end of the command parameters in the os process sampler, I get the following in the response:

ocsp: Use -help for summary.

:(...

Jim


     On Tuesday, July 2, 2019, 8:55:44 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 It should work if you redirect stderr to stdout so
2>&1

Ivan

On Tue, Jul 2, 2019 at 2:53 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> If the output of "openssl ocsp" is going to STDERR, then dos that mean
> that there is no way to get the Response Assertion to work?
>
> Jim
>
>
>      On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  1.
> If you try it, you will probably need to set a few headers, such as
> --header='Content-Type:application/ocsp-request'
>
> 2.
> Assuming you are testing on linux. I vaguely remember, but have not time to
> try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
> Maybe you can try from bash, redirecting to a file, and seeing what's in
> the file
>
>
>
>
> On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:
>
> >  Hi,
> >
> > Re. 1: That is an interesting approach! I will try it if I have some
> time.
> >
> > Re. 2: If I use "Text Response", it looks like the Response Assertion
> > doesn't even fire (doesn't appear in the results tree). So far, only
> > checking "Response message" in the Response Assertion causes the Response
> > Assertion to appear in results, but I still am not able to get the
> > assertion to match.
> >
> > I have tried both "Contains" "revoked" and "substring" "revoked", but
> > neither succeeds.
> >
> > Thanks,
> > Jim
> >
> >
> >      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> > ivan.rancati@gmail.com> wrote:
> >
> >  Two ideas
> >
> > 1
> > If you are testing with a limited number of certificates:
> > You could manually prepare one (or more) ocsp response file with openssl,
> > then use the normal HTTP Sampler to POST that request
> >
> > openssl ocsp -issuer <ca certificate> -cert <your certificate to be
> tested>
> > -reqout <the file you will POST>
> >
> >
> > 2
> > I have a couple of test plans with OS Process Sampler and assertion. I
> use
> > "Text Response" in "Field to Test"
> > Make sure you use "Contains" if you need a regex in "Pattern to test", I
> > think "Substring" will not expand the regex
> >
> > best,
> > Ivan
> >
> >
> >
> >
> > On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
> >
> > > Hi,
> > >
> > > I couldn't get the approach that I was trying in the earlier "Help get
> > > OCSP responder load test working?" thread, where I was trying to
> generate
> > > the OCSP request programatically, so I changed my approach.
> > >
> > > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > > that seems to be working, but I would like to have an assertion
> checking
> > > the response message for the string "revoked".
> > >
> > > I tried adding a Response Assertion, but that doesn't seem to be firing
> > at
> > > all, even if I "attach it" to the OS Process Sampler itself.
> > >
> > > So is there a way to include an assertion in the Jmeter test plan that
> > > would check for the string "revoked" in the response message?  And, if
> > so,
> > > how do I do that?
> > >
> > > Thanks,
> > > Jim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>
  

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by Ivan Rancati <iv...@gmail.com>.
It should work if you redirect stderr to stdout so
2>&1

Ivan

On Tue, Jul 2, 2019 at 2:53 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> If the output of "openssl ocsp" is going to STDERR, then dos that mean
> that there is no way to get the Response Assertion to work?
>
> Jim
>
>
>      On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  1.
> If you try it, you will probably need to set a few headers, such as
> --header='Content-Type:application/ocsp-request'
>
> 2.
> Assuming you are testing on linux. I vaguely remember, but have not time to
> try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
> Maybe you can try from bash, redirecting to a file, and seeing what's in
> the file
>
>
>
>
> On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:
>
> >  Hi,
> >
> > Re. 1: That is an interesting approach! I will try it if I have some
> time.
> >
> > Re. 2: If I use "Text Response", it looks like the Response Assertion
> > doesn't even fire (doesn't appear in the results tree). So far, only
> > checking "Response message" in the Response Assertion causes the Response
> > Assertion to appear in results, but I still am not able to get the
> > assertion to match.
> >
> > I have tried both "Contains" "revoked" and "substring" "revoked", but
> > neither succeeds.
> >
> > Thanks,
> > Jim
> >
> >
> >      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> > ivan.rancati@gmail.com> wrote:
> >
> >  Two ideas
> >
> > 1
> > If you are testing with a limited number of certificates:
> > You could manually prepare one (or more) ocsp response file with openssl,
> > then use the normal HTTP Sampler to POST that request
> >
> > openssl ocsp -issuer <ca certificate> -cert <your certificate to be
> tested>
> > -reqout <the file you will POST>
> >
> >
> > 2
> > I have a couple of test plans with OS Process Sampler and assertion. I
> use
> > "Text Response" in "Field to Test"
> > Make sure you use "Contains" if you need a regex in "Pattern to test", I
> > think "Substring" will not expand the regex
> >
> > best,
> > Ivan
> >
> >
> >
> >
> > On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
> >
> > > Hi,
> > >
> > > I couldn't get the approach that I was trying in the earlier "Help get
> > > OCSP responder load test working?" thread, where I was trying to
> generate
> > > the OCSP request programatically, so I changed my approach.
> > >
> > > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > > that seems to be working, but I would like to have an assertion
> checking
> > > the response message for the string "revoked".
> > >
> > > I tried adding a Response Assertion, but that doesn't seem to be firing
> > at
> > > all, even if I "attach it" to the OS Process Sampler itself.
> > >
> > > So is there a way to include an assertion in the Jmeter test plan that
> > > would check for the string "revoked" in the response message?  And, if
> > so,
> > > how do I do that?
> > >
> > > Thanks,
> > > Jim
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 Hi,

If the output of "openssl ocsp" is going to STDERR, then dos that mean that there is no way to get the Response Assertion to work?

Jim


     On Tuesday, July 2, 2019, 8:34:46 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 1.
If you try it, you will probably need to set a few headers, such as
--header='Content-Type:application/ocsp-request'

2.
Assuming you are testing on linux. I vaguely remember, but have not time to
try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
Maybe you can try from bash, redirecting to a file, and seeing what's in
the file




On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> Re. 1: That is an interesting approach! I will try it if I have some time.
>
> Re. 2: If I use "Text Response", it looks like the Response Assertion
> doesn't even fire (doesn't appear in the results tree). So far, only
> checking "Response message" in the Response Assertion causes the Response
> Assertion to appear in results, but I still am not able to get the
> assertion to match.
>
> I have tried both "Contains" "revoked" and "substring" "revoked", but
> neither succeeds.
>
> Thanks,
> Jim
>
>
>      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  Two ideas
>
> 1
> If you are testing with a limited number of certificates:
> You could manually prepare one (or more) ocsp response file with openssl,
> then use the normal HTTP Sampler to POST that request
>
> openssl ocsp -issuer <ca certificate> -cert <your certificate to be tested>
> -reqout <the file you will POST>
>
>
> 2
> I have a couple of test plans with OS Process Sampler and assertion. I use
> "Text Response" in "Field to Test"
> Make sure you use "Contains" if you need a regex in "Pattern to test", I
> think "Substring" will not expand the regex
>
> best,
> Ivan
>
>
>
>
> On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
>
> > Hi,
> >
> > I couldn't get the approach that I was trying in the earlier "Help get
> > OCSP responder load test working?" thread, where I was trying to generate
> > the OCSP request programatically, so I changed my approach.
> >
> > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > that seems to be working, but I would like to have an assertion checking
> > the response message for the string "revoked".
> >
> > I tried adding a Response Assertion, but that doesn't seem to be firing
> at
> > all, even if I "attach it" to the OS Process Sampler itself.
> >
> > So is there a way to include an assertion in the Jmeter test plan that
> > would check for the string "revoked" in the response message?  And, if
> so,
> > how do I do that?
> >
> > Thanks,
> > Jim
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>
  

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by Ivan Rancati <iv...@gmail.com>.
1.
If you try it, you will probably need to set a few headers, such as
--header='Content-Type:application/ocsp-request'

2.
Assuming you are testing on linux. I vaguely remember, but have not time to
try now, the output of "openssl ocsp ..." is sent to stderr and not stdout.
Maybe you can try from bash, redirecting to a file, and seeing what's in
the file




On Tue, Jul 2, 2019 at 2:16 PM <oh...@yahoo.com.invalid> wrote:

>  Hi,
>
> Re. 1: That is an interesting approach! I will try it if I have some time.
>
> Re. 2: If I use "Text Response", it looks like the Response Assertion
> doesn't even fire (doesn't appear in the results tree). So far, only
> checking "Response message" in the Response Assertion causes the Response
> Assertion to appear in results, but I still am not able to get the
> assertion to match.
>
> I have tried both "Contains" "revoked" and "substring" "revoked", but
> neither succeeds.
>
> Thanks,
> Jim
>
>
>      On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <
> ivan.rancati@gmail.com> wrote:
>
>  Two ideas
>
> 1
> If you are testing with a limited number of certificates:
> You could manually prepare one (or more) ocsp response file with openssl,
> then use the normal HTTP Sampler to POST that request
>
> openssl ocsp -issuer <ca certificate> -cert <your certificate to be tested>
> -reqout <the file you will POST>
>
>
> 2
> I have a couple of test plans with OS Process Sampler and assertion. I use
> "Text Response" in "Field to Test"
> Make sure you use "Contains" if you need a regex in "Pattern to test", I
> think "Substring" will not expand the regex
>
> best,
> Ivan
>
>
>
>
> On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:
>
> > Hi,
> >
> > I couldn't get the approach that I was trying in the earlier "Help get
> > OCSP responder load test working?" thread, where I was trying to generate
> > the OCSP request programatically, so I changed my approach.
> >
> > Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> > that seems to be working, but I would like to have an assertion checking
> > the response message for the string "revoked".
> >
> > I tried adding a Response Assertion, but that doesn't seem to be firing
> at
> > all, even if I "attach it" to the OS Process Sampler itself.
> >
> > So is there a way to include an assertion in the Jmeter test plan that
> > would check for the string "revoked" in the response message?  And, if
> so,
> > how do I do that?
> >
> > Thanks,
> > Jim
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by oh...@yahoo.com.INVALID.
 Hi,

Re. 1: That is an interesting approach! I will try it if I have some time.

Re. 2: If I use "Text Response", it looks like the Response Assertion doesn't even fire (doesn't appear in the results tree). So far, only checking "Response message" in the Response Assertion causes the Response Assertion to appear in results, but I still am not able to get the assertion to match. 

I have tried both "Contains" "revoked" and "substring" "revoked", but neither succeeds.

Thanks,
Jim


     On Tuesday, July 2, 2019, 7:46:22 AM EDT, Ivan Rancati <iv...@gmail.com> wrote:  
 
 Two ideas

1
If you are testing with a limited number of certificates:
You could manually prepare one (or more) ocsp response file with openssl,
then use the normal HTTP Sampler to POST that request

openssl ocsp -issuer <ca certificate> -cert <your certificate to be tested>
-reqout <the file you will POST>


2
I have a couple of test plans with OS Process Sampler and assertion. I use
"Text Response" in "Field to Test"
Make sure you use "Contains" if you need a regex in "Pattern to test", I
think "Substring" will not expand the regex

best,
Ivan




On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:

> Hi,
>
> I couldn't get the approach that I was trying in the earlier "Help get
> OCSP responder load test working?" thread, where I was trying to generate
> the OCSP request programatically, so I changed my approach.
>
> Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> that seems to be working, but I would like to have an assertion checking
> the response message for the string "revoked".
>
> I tried adding a Response Assertion, but that doesn't seem to be firing at
> all, even if I "attach it" to the OS Process Sampler itself.
>
> So is there a way to include an assertion in the Jmeter test plan that
> would check for the string "revoked" in the response message?  And, if so,
> how do I do that?
>
> Thanks,
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
  

Re: Followup question to "Help get OCSP responder load test working?" - New approach using OS Process sampler

Posted by Ivan Rancati <iv...@gmail.com>.
Two ideas

1
If you are testing with a limited number of certificates:
You could manually prepare one (or more) ocsp response file with openssl,
then use the normal HTTP Sampler to POST that request

openssl ocsp -issuer <ca certificate> -cert <your certificate to be tested>
-reqout <the file you will POST>


2
I have a couple of test plans with OS Process Sampler and assertion. I use
"Text Response" in "Field to Test"
Make sure you use "Contains" if you need a regex in "Pattern to test", I
think "Substring" will not expand the regex

best,
Ivan




On Tue, Jul 2, 2019 at 12:52 PM <oh...@yahoo.com.invalid> wrote:

> Hi,
>
> I couldn't get the approach that I was trying in the earlier "Help get
> OCSP responder load test working?" thread, where I was trying to generate
> the OCSP request programatically, so I changed my approach.
>
> Now, I use an OS Process Sampler to run an "openssl ocsp" command, and
> that seems to be working, but I would like to have an assertion checking
> the response message for the string "revoked".
>
> I tried adding a Response Assertion, but that doesn't seem to be firing at
> all, even if I "attach it" to the OS Process Sampler itself.
>
> So is there a way to include an assertion in the Jmeter test plan that
> would check for the string "revoked" in the response message?  And, if so,
> how do I do that?
>
> Thanks,
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>