On 22 October 2013 18:02, kevin zeng <[email protected]> wrote: > Thanks a lot for your response. There are multiple reason for us to use junit > sampler, because 1. we already have a java api library written which will > handles authenticaiton and etc to enable client talking to serve; 2. within > the junit test case, we will need to maintain the session info. i.e. we first > make a bootstrap call to get the session id, and then make a post call to get > a list of things, and then make subsequent calls. > > Is it possible to use the other sampler to do the thing I mentioned above?
Yes, though you will have to write some Java code. I assume this is not an issue as you currently have to write the JUnit tests anyway. There are various ways to write code for JMeter. 1) Use a JSR223 sampler with a suitable scripting language 2) use the BeanShell Sampler 3) Implement the JavaSampler interface 4) Write your own stand-alone sampler You will need to decide how to cache the session id between samples; one way is to use a JMeter variable (which does not have to be a String). > >> Date: Thu, 17 Oct 2013 12:06:02 +0100 >> Subject: Re: How to have more granular time report in junit request sampler >> From: [email protected] >> To: [email protected] >> >> On 14 October 2013 17:13, kevin zeng <[email protected]> wrote: >> > Hi, >> > >> > I am new to JMeter. I would like to create a load test plan with a set of >> > junit request sampler. Each JUnit request sampler will contains a sequence >> > of user actions (i.e. login, view doc, and edit doc) to mimic a particular >> > user scenario. Currently, if I use graph result listener, it will report >> > time at the junit test case level. Is it also possible to report at the >> > action level too? I will need this, because if I see problem at the test >> > case level, then I will need to drill down to the action level. >> >> This is not possible with the JUnit sampler. >> You will have to break your tests down further, or add logging to them. >> >> However, I wonder why you are using JUnit for such testing - why not >> use an existing sampler? >> >> > Thanks a lot for your help! >> > >> > Kevin >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
