Christian_Schuster Absent Member.
Absent Member.
3494 views

Windows Credentials

Jump to solution

I have the following challenge:
I should create a loadtest with a simple WEB-Application, but...
The application has no login-mechanism, but it is necessary to use 50 different windows users.
The application uses the windows credentials to identify the user. Any idea
how this loadtest could be run with this 50 users?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Windows Credentials

Jump to solution

Hi Christian,

When using a Browser Driven approach, the authentication function (BrowserSetAuthentication) will only be recorded when a user is actually prompted for the credentials during login.

It is possible however to force Internet Explorer to request the credentials if necessary by going to TOOLS | INTERNET OPTIONS | SECURITY tab | CUSTOM LEVEL button.  At the bottom of the list is the User Authentication setting – this should be changed to Prompt for user name and password.

If you record a new script you should then be able to parameterise the values in the BrowserSetAuthentication function.

Regards,

Neil

0 Likes
7 Replies
droman Absent Member.
Absent Member.

RE: Windows Credentials

Jump to solution

This may seem like a very basic answer so I apologize in advance if you have already tried what I will suggest.

When you model the script and perform all the actions you want to test isn't there an area in the BDL that shows your username and encrypted password?  Have you tried searching in your script for the windows credential captured?  What I do in my script is create a .csv file with rows of login information (in my case 50 users as well) and place that in the Custom Data folder.  I then add that file as a data file.  In the script I find the login name that was captured, select it, right click on the highlighted text and select "Customize Selected String".  From there a wizard will appear that will allow you to create a parameter with the .csv file that you imported into the project.

0 Likes
Christian_Schuster Absent Member.
Absent Member.

RE: Windows Credentials

Jump to solution

I recorded the script as a WBD-project, but I will record again protocoll based and look for the user credentials.

0 Likes
Micro Focus Contributor
Micro Focus Contributor

RE: Windows Credentials

Jump to solution

Hi Christian

It sounds like your application is using ntlm authentication which is when your windows username and password are passed to the application to authenticate, except this happens automatically by the browser behind the scenes and as such users don't know its happening.  

When you record the scenario you should see a comment with the function WebSetUserAuthNTLM.  Uncomment it and add your domain username and password like this:

WebSetUserAuthNTLM("DOMAIN\\USERNAME","PASSWORD");

Note the \\ which is required.

Usually you can disable this type of authentication in the browser and it will instead prompt you for a username and password.  Go to IE, internet options, advanced and uncheck enable integrated windows authentication.  You dont need to do this it is just for demonstration purposes to prove this is what is happening.  

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Windows Credentials

Jump to solution

Hi Christian,

When using a Browser Driven approach, the authentication function (BrowserSetAuthentication) will only be recorded when a user is actually prompted for the credentials during login.

It is possible however to force Internet Explorer to request the credentials if necessary by going to TOOLS | INTERNET OPTIONS | SECURITY tab | CUSTOM LEVEL button.  At the bottom of the list is the User Authentication setting – this should be changed to Prompt for user name and password.

If you record a new script you should then be able to parameterise the values in the BrowserSetAuthentication function.

Regards,

Neil

0 Likes
Christian_Schuster Absent Member.
Absent Member.

RE: Windows Credentials

Jump to solution

Hi Jonny,

this works with protocol based loadtest. Is it possible to mix WBD and protocol like this:

  WebSetUserAuthNtlm("sdvrz\\u00schu", "geheim");

   BrowserNavigate("d00wtn63/.../");

0 Likes
Micro Focus Contributor
Micro Focus Contributor

RE: Windows Credentials

Jump to solution

No, thats a protocol level function.  In bdlt use BrowserSetAuthentication as Neil suggested.

0 Likes
Christian_Schuster Absent Member.
Absent Member.

RE: Windows Credentials

Jump to solution

without changing the configuration of IE BrowserSetAuthentication does not work

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.