You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Anjaneyulu Aerrolla <aa...@sapient.com> on 2007/05/19 15:27:26 UTC

_StringFromFile problem

Hi 
 
I'm using _StringFromFile function to read values from a file 
 
_StringFromFile(file.dat)  is working fine 
 
_StringFormFile(file#'.'dat,var,1,2,3)  is failed, according to j-meter
documentation it should read from files file1.dat ...file3.dat
 
In the jmeter log I found that it's trying to read from a file
file#.dat  
 
Is there any setting I need to be made, this thing to work?
 
 
Regards ,
_________________________________________________________
Anjan | Associate Technology | Sapient | Bangalore, India
aaerrolla@sapient.com | +91 80 41047003 (work) | +91 9886619293 (cell)
 

Re: How to maintain sessions in a test plan?

Posted by sebb <se...@gmail.com>.
On 21/05/07, manoj laghuvaram <ma...@3i-infotech.com> wrote:
> Now My testplan is simple like this sebb
> +Test plan
> ++thread group
> ++Sampler
> ++Listener
>
> even if cookie manager is added then also it is not working
> +Test plan
> ++thread group
> ++cookie manager
> ++Sampler
> ++Listener
>
> Am trying to use Http url redirect, but am not knowing what to enter in the
> Session argument name filed!

With only one sampler, it's not possible to use cookies or URL
redirection, as these both rely on the response to the previous
sampler.

> I tried with username field I entered in http sampler page but no use!
> I even tried to enter session ID  which I took by cookie manager even then
> no use
> What should I actually enter there?

No idea - that depends on the web application.

>
>
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Monday, May 21, 2007 4:56 PM
> To: JMeter Users List
> Subject: Re: How to maintain sessions in a test plan?
>
> On 21/05/07, manoj laghuvaram <ma...@3i-infotech.com> wrote:
> >
> >
> > Hi
> >
> > How can I maintain sessions in a test plan, though am using a cookie
> > manager, seems it is not working fine!!!
> >
> > Here is my scenario
> > I want to check the performance of a .net application for x number of
> > users while logging in
> >
> > I provided all these in a HTTP sampler IP 10.1.101.245( ip of server
> > machine from where am accessing the
> > application)
> > Path /I-Pariksha/adminhome.aspx( the page to be shown with the given
> > parameters)
> > Parameters( username and password)
> > Method post
> >
> > My testplan structure is like this
> > Testplan
> >        |->Thread group
> >                |->http Cookie manager (nothing included in it
> > specially, it is just added with cookie policy as compatibility thats it)
> >                        |->http sampler
>
> The sampler should not be a child of the Cookie Manager.
>
> >                                |-> listener
>
> The Listener might be better at the same level as the sampler.
>
> > And when executed it is showing the custom error page
>
> So I assume the login is failing?
>
> As there is only a single sampler, the cookie manager won't be used.
>
> The test plan should probably look like:
>
> TestPlan
> + Thread Group
> + + Cookie Manager
> + + HTTP Defaults (optional)
> + + Header Manager (optional - might be needed to set User-Agent) HTTP
> + + Sampler - login HTTP Sampler - something that requires a login Tree
> + + View Listener
>
> The cookies will sent by the server in response to the login page, and then
> included in any further samples with the appropriate domain etc.
>
> >
> > ---
> > This e-mail message may contain confidential, proprietary or legally
> privileged information. It should not be used by anyone who is not the
> original intended recipient.If you have erroneously received this message,
> please delete it immediately and notify the sender. The recipient
> acknowledges that 3i Infotech or its subsidiaries and  associated companies,
> (collectively "3i Infotech"), are unable to exercise control or ensure or
> guarantee the integrity of/over the contents of the information contained in
> e-mail transmissions and further acknowledges that any views expressed in
> this message are those of the individual sender and no binding nature of the
> message shall be implied or assumed unless the sender does so expressly with
> due authority of 3i Infotech. Before opening any attachments please check
> them for viruses and defects.
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
>
>
>
>
> ---
> This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and  associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects.
>
>
> ---------------------------------------------------------------------
> 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 maintain sessions in a test plan?

Posted by manoj laghuvaram <ma...@3i-infotech.com>.
Now My testplan is simple like this sebb 
+Test plan
++thread group
++Sampler
++Listener

even if cookie manager is added then also it is not working
+Test plan
++thread group
++cookie manager
++Sampler
++Listener

Am trying to use Http url redirect, but am not knowing what to enter in the
Session argument name filed!
I tried with username field I entered in http sampler page but no use!
I even tried to enter session ID  which I took by cookie manager even then
no use
What should I actually enter there?




-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Monday, May 21, 2007 4:56 PM
To: JMeter Users List
Subject: Re: How to maintain sessions in a test plan?

On 21/05/07, manoj laghuvaram <ma...@3i-infotech.com> wrote:
>
>
> Hi
>
> How can I maintain sessions in a test plan, though am using a cookie 
> manager, seems it is not working fine!!!
>
> Here is my scenario
> I want to check the performance of a .net application for x number of 
> users while logging in
>
> I provided all these in a HTTP sampler IP 10.1.101.245( ip of server 
> machine from where am accessing the
> application)
> Path /I-Pariksha/adminhome.aspx( the page to be shown with the given
> parameters)
> Parameters( username and password)
> Method post
>
> My testplan structure is like this
> Testplan
>        |->Thread group
>                |->http Cookie manager (nothing included in it 
> specially, it is just added with cookie policy as compatibility thats it)
>                        |->http sampler

The sampler should not be a child of the Cookie Manager.

>                                |-> listener

The Listener might be better at the same level as the sampler.

> And when executed it is showing the custom error page

So I assume the login is failing?

As there is only a single sampler, the cookie manager won't be used.

The test plan should probably look like:

TestPlan
+ Thread Group
+ + Cookie Manager
+ + HTTP Defaults (optional)
+ + Header Manager (optional - might be needed to set User-Agent) HTTP 
+ + Sampler - login HTTP Sampler - something that requires a login Tree 
+ + View Listener

The cookies will sent by the server in response to the login page, and then
included in any further samples with the appropriate domain etc.

>
> ---
> This e-mail message may contain confidential, proprietary or legally
privileged information. It should not be used by anyone who is not the
original intended recipient.If you have erroneously received this message,
please delete it immediately and notify the sender. The recipient
acknowledges that 3i Infotech or its subsidiaries and  associated companies,
(collectively "3i Infotech"), are unable to exercise control or ensure or
guarantee the integrity of/over the contents of the information contained in
e-mail transmissions and further acknowledges that any views expressed in
this message are those of the individual sender and no binding nature of the
message shall be implied or assumed unless the sender does so expressly with
due authority of 3i Infotech. Before opening any attachments please check
them for viruses and defects.
>
>
> ---------------------------------------------------------------------
> 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







---
This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and  associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects.


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


Re: How to maintain sessions in a test plan?

Posted by sebb <se...@gmail.com>.
On 21/05/07, manoj laghuvaram <ma...@3i-infotech.com> wrote:
>
>
> Hi
>
> How can I maintain sessions in a test plan, though am using a cookie
> manager, seems it is not working fine!!!
>
> Here is my scenario
> I want to check the performance of a .net application for x number of users
> while logging in
>
> I provided all these in a HTTP sampler
> IP 10.1.101.245( ip of server machine from where am accessing the
> application)
> Path /I-Pariksha/adminhome.aspx( the page to be shown with the given
> parameters)
> Parameters( username and password)
> Method post
>
> My testplan structure is like this
> Testplan
>        |->Thread group
>                |->http Cookie manager (nothing included in it specially, it
> is just added with cookie policy as compatibility thats it)
>                        |->http sampler

The sampler should not be a child of the Cookie Manager.

>                                |-> listener

The Listener might be better at the same level as the sampler.

> And when executed it is showing the custom error page

So I assume the login is failing?

As there is only a single sampler, the cookie manager won't be used.

The test plan should probably look like:

TestPlan
+ Thread Group
+ + Cookie Manager
+ + HTTP Defaults (optional)
+ + Header Manager (optional - might be needed to set User-Agent)
+ + HTTP Sampler - login
+ + HTTP Sampler - something that requires a login
+ + Tree View Listener

The cookies will sent by the server in response to the login page, and
then included in any further samples with the appropriate domain etc.

>
> ---
> This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and  associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects.
>
>
> ---------------------------------------------------------------------
> 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


How to maintain sessions in a test plan?

Posted by manoj laghuvaram <ma...@3i-infotech.com>.
 

Hi

How can I maintain sessions in a test plan, though am using a cookie
manager, seems it is not working fine!!!

Here is my scenario 
I want to check the performance of a .net application for x number of users
while logging in

I provided all these in a HTTP sampler
IP 10.1.101.245( ip of server machine from where am accessing the
application)
Path /I-Pariksha/adminhome.aspx( the page to be shown with the given
parameters)
Parameters( username and password)
Method post

My testplan structure is like this
Testplan
	|->Thread group
		|->http Cookie manager (nothing included in it specially, it
is just added with cookie policy as compatibility thats it)
			|->http sampler
				|-> listener

And when executed it is showing the custom error page 



---
This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and  associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects.


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


RE: database result set

Posted by manoj laghuvaram <ma...@3i-infotech.com>.
Hope u tuned ur query to show only the rows which contains the needed data
If u did so then to the sampler add 
-a response assertion to check the needed data
-a view results tree listener to verify for all records

-----Original Message-----
From: Sireesha Sridhara [mailto:ssridhara@avolent.com] 
Sent: Sunday, May 20, 2007 11:13 PM
To: JMeter Users List
Subject: Re:database result set

 
Hi All,
I have the following scenarios. I need to connect to database and execute a
query. From the result set, I have to validate for each row form result set
if that data is present on the application page.
Basically I would like to know after using a JDBC sampler and executing the
query, I can get access to result set.
Thank you

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







---
This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and  associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects.


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


Re:database result set

Posted by Sireesha Sridhara <ss...@avolent.com>.
 
Hi All,
I have the following scenarios. I need to connect to database and
execute a query. From the result set, I have to validate for each row
form result set if that data is present on the application page.
Basically I would like to know after using a JDBC sampler and executing
the query, I can get access to result set.
Thank you

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


Re: _StringFromFile problem

Posted by sebb <se...@gmail.com>.
On 19/05/07, Anjaneyulu Aerrolla <aa...@sapient.com> wrote:
> Hi
>
> I'm using _StringFromFile function to read values from a file
>
> _StringFromFile(file.dat)  is working fine
>
> _StringFormFile(file#'.'dat,var,1,2,3)  is failed, according to j-meter
> documentation it should read from files file1.dat ...file3.dat

That's not the correct syntax - it only accepts start and end sequence
numbers, not a sequence, see:

http://jakarta.apache.org/jmeter/usermanual/functions.html#__StringFromFile

Try:

__StringFromFile(file#'.'dat,var,1,3)

> In the jmeter log I found that it's trying to read from a file
> file#.dat
>
> Is there any setting I need to be made, this thing to work?

Yes, see above.

>
> Regards ,
> _________________________________________________________
> Anjan | Associate Technology | Sapient | Bangalore, India
> aaerrolla@sapient.com | +91 80 41047003 (work) | +91 9886619293 (cell)
>
>

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