Jump to content
WAPT Forum
Sign in to follow this  
Guest venkat

Authentication

Recommended Posts

Guest venkat

Hi,

 

In my application user should be allowed to access using the user name and passward. Using WAPT 5.0 i have opted for 20 users and for 20 iteration.

 

My doubt is whether all the 20 users having the same username and password?????

 

Thanks in advance

 

Regards

Share this post


Link to post
Share on other sites
Guest angela

Hello,

 

In order to provide an individual login for each user you can use the function "Ordered list" which enables to set different login values\passwords for different users. This function returns the first element of the list (for instance, username) for the first virtual user, the second element for the second user and so on.

 

For example, this function can be used to provide each virtual user with the individual user name and password.

 

Syntax:

 

$LOrder(0|1,{file_name}|value1[,{value2},…])

 

0 stands for iterations, 1 stands for users.

 

Example:

 

$LOrder(1,John,Mike,Bob)

 

It results in sending the following HTTP requests:

 

First virtual user:

POST /login.do

username=John&...

 

Second virtual user:

POST /login.do

username=Mike&...

 

Third virtual user:

POST /login.do

username=Bob&...

 

Also, you can create files with logins\passwords and use them with the above function.

 

You can also use "User number" function ($clid(prefix,postfix)) for this purpose. This function returns the concatenation of prefix string, the ordinal number of the current virtual user and postfix string. So you can use it if usernames and passwords have uniform structure like TestUser1, TestUser2 and so on.

 

For more information on using certain functions, see "Parameter Value Dynamic Calculation" topic in built-in Help.

 

You can add login page to Initial test sequence to set WAPT perform this operation once at the beginning of the test (Main test sequence is repeated several times equal to the number of iterations). Do not forget to remove login page from the Main test sequence.

 

P.S. In the attachment please see some examples of using functions and variables, and of setting different names and passwords for different users.

DifferentUsernames_PasswordSample.zip

Functions_VariablesUsageExample.zip

Share this post


Link to post
Share on other sites
Guest vinger

Hi,

 

Learn a lot here, thanks a lot first.

 

I've download the "DifferentUsernames_PasswordSample.zip" and "Functions_VariablesUsageExample.zip".

and I can open the "DifferentUsernames&PasswordSample.wpp",

 

but I can't open the 'Functions&VariablesUsageExample.wps' used the current WAPT 5.0.

 

would you please give any suggestion? thanks.

Share this post


Link to post
Share on other sites
Guest alec whittington
still cannot open the scenario sample file.

 

Would it be too much to ask to get these files updated for WAPT Pro? None of the ones listed can be opened with WAPT Pro

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...