You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Nguyen Cao Cuong <cu...@vips.com.vn> on 2006/05/19 09:39:37 UTC

How to set different username&pass for login request?

Hi, I' Cuong,

I've begin using Jmeter, and have a script like:

 |-> Thread

            |-> Login request

            |-> Request for task1

            .

I put 10 to Numbers of Threads field, How to set each thread that uses
different username & password for Login request when run test plan?

(assume that above script is created by record using Proxy server).

 

 Please help me!

Thanks and best regard! 

 

----------------------------------------------------------

QA team

Vietnam Image Partner System, Co., Ltd
7th Floor, No3 Do Hanh st, Hanoi, VietNam
Tel: (84-4) 9427720  Fax: (84-4) 9427721
URL:  <http://www.imagecity.jp/> www.imagecity.jp;
<http://www.vips.com.vn/> www.vips.com.vn
----------------------------------------------------------

 


RE: How to set different username&pass for login request?

Posted by Nguyen Cao Cuong <cu...@vips.com.vn>.
Hi,
I've configured successful!
Thank you very much.
Best regard!

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Saturday, May 20, 2006 3:52 PM
To: JMeter Users List; cuongnc8038@vips.com.vn
Subject: Re: How to set different username&pass for login request?

The CSV DataSet Config test element would be suitable here.

Create a file containing the names and passwords in CSV format:

name1,pass1
name2,pass2

etc.

Add the CSV DataSet element to the test plan.

Suppose you call the variables USER,PASS.

You can then use ${USER} and ${PASS} on the login page.

Note that the CSV file is shared between threads and iterations; each
time some data is fetched, the next line is read from the file.

S.
On 19/05/06, Nguyen Cao Cuong <cu...@vips.com.vn> wrote:
> Hi, I' Cuong,
>
> I've begin using Jmeter, and have a script like:
>
>  |-> Thread
>
>             |-> Login request
>
>             |-> Request for task1
>
>             .
>
> I put 10 to Numbers of Threads field, How to set each thread that uses
> different username & password for Login request when run test plan?
>
> (assume that above script is created by record using Proxy server).
>
>
>
>  Please help me!
>
> Thanks and best regard!
>
>
>
> ----------------------------------------------------------
>
> QA team
>
> Vietnam Image Partner System, Co., Ltd
> 7th Floor, No3 Do Hanh st, Hanoi, VietNam
> Tel: (84-4) 9427720  Fax: (84-4) 9427721
> URL:  <http://www.imagecity.jp/> www.imagecity.jp;
> <http://www.vips.com.vn/> www.vips.com.vn
> ----------------------------------------------------------
>
>
>
>
>


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


RE: How to set different username&pass for login request?

Posted by Nguyen Cao Cuong <cu...@vips.com.vn>.
Hi,
I tried doing steps that you introduced, but I don't know how to use ${USER}
and ${PASS} on login page, can you explain step by step?
I'm terrible sorry!

Thanks and regard!

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Saturday, May 20, 2006 3:52 PM
To: JMeter Users List; cuongnc8038@vips.com.vn
Subject: Re: How to set different username&pass for login request?

The CSV DataSet Config test element would be suitable here.

Create a file containing the names and passwords in CSV format:

name1,pass1
name2,pass2

etc.

Add the CSV DataSet element to the test plan.

Suppose you call the variables USER,PASS.

You can then use ${USER} and ${PASS} on the login page.

Note that the CSV file is shared between threads and iterations; each
time some data is fetched, the next line is read from the file.

S.
On 19/05/06, Nguyen Cao Cuong <cu...@vips.com.vn> wrote:
> Hi, I' Cuong,
>
> I've begin using Jmeter, and have a script like:
>
>  |-> Thread
>
>             |-> Login request
>
>             |-> Request for task1
>
>             .
>
> I put 10 to Numbers of Threads field, How to set each thread that uses
> different username & password for Login request when run test plan?
>
> (assume that above script is created by record using Proxy server).
>
>
>
>  Please help me!
>
> Thanks and best regard!
>
>
>
> ----------------------------------------------------------
>
> QA team
>
> Vietnam Image Partner System, Co., Ltd
> 7th Floor, No3 Do Hanh st, Hanoi, VietNam
> Tel: (84-4) 9427720  Fax: (84-4) 9427721
> URL:  <http://www.imagecity.jp/> www.imagecity.jp;
> <http://www.vips.com.vn/> www.vips.com.vn
> ----------------------------------------------------------
>
>
>
>
>


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


Re: How to set different username&pass for login request?

Posted by sebb <se...@gmail.com>.
The CSV DataSet Config test element would be suitable here.

Create a file containing the names and passwords in CSV format:

name1,pass1
name2,pass2

etc.

Add the CSV DataSet element to the test plan.

Suppose you call the variables USER,PASS.

You can then use ${USER} and ${PASS} on the login page.

Note that the CSV file is shared between threads and iterations; each
time some data is fetched, the next line is read from the file.

S.
On 19/05/06, Nguyen Cao Cuong <cu...@vips.com.vn> wrote:
> Hi, I' Cuong,
>
> I've begin using Jmeter, and have a script like:
>
>  |-> Thread
>
>             |-> Login request
>
>             |-> Request for task1
>
>             .
>
> I put 10 to Numbers of Threads field, How to set each thread that uses
> different username & password for Login request when run test plan?
>
> (assume that above script is created by record using Proxy server).
>
>
>
>  Please help me!
>
> Thanks and best regard!
>
>
>
> ----------------------------------------------------------
>
> QA team
>
> Vietnam Image Partner System, Co., Ltd
> 7th Floor, No3 Do Hanh st, Hanoi, VietNam
> Tel: (84-4) 9427720  Fax: (84-4) 9427721
> URL:  <http://www.imagecity.jp/> www.imagecity.jp;
> <http://www.vips.com.vn/> www.vips.com.vn
> ----------------------------------------------------------
>
>
>
>
>

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


RE: How to set different username&pass for login request?

Posted by Gaël LHEZ <gl...@glowria.fr>.
Here my solution (I use it, it does not mean it's the better)

You create two function, named getLoginName(key) and getLoginPassword(key).
The key is a variable (a counter in jmeter) that change for every user.

Then, when you call them : you load one user, and put it in an
ArrayList<User> (or a Map<Integer, User>, etc) and you use key to get the
user if it's in the container, else you load it from Database.

There is also the CSV solutions which might also work for you.

-----Message d'origine-----
De : Nguyen Cao Cuong [mailto:cuongnc8038@vips.com.vn] 
Envoyé : vendredi 19 mai 2006 09:40
À : jmeter-user@jakarta.apache.org
Objet : How to set different username&pass for login request?

Hi, I' Cuong,

I've begin using Jmeter, and have a script like:

 |-> Thread

            |-> Login request

            |-> Request for task1

            .

I put 10 to Numbers of Threads field, How to set each thread that uses
different username & password for Login request when run test plan?

(assume that above script is created by record using Proxy server).

 

 Please help me!

Thanks and best regard! 

 

----------------------------------------------------------

QA team

Vietnam Image Partner System, Co., Ltd
7th Floor, No3 Do Hanh st, Hanoi, VietNam
Tel: (84-4) 9427720  Fax: (84-4) 9427721
URL:  <http://www.imagecity.jp/> www.imagecity.jp; <http://www.vips.com.vn/>
www.vips.com.vn
----------------------------------------------------------

 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.1/343 - Release Date: 18/05/2006
 


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