kkyy Super Contributor.
Super Contributor.

Project attributes for session login

Hi All,

We are planning to do GUI-Level Testing for our load project.  When we model our script, there is option for "Use project attributes for session login" .   It will generate the code like below.

AttributeGetString ("Username", sUser)

AttributeGetString ("Password", sPasswd)

StInitSession(sUser, sPasswd, nColor)

If we plan not to get the username and password from attribute setting, can we read it directly from a file?  How this can be done?  Any code example.  We just like to have different user/password for different sessions.


Thank you!



1 Reply
Micro Focus Expert
Micro Focus Expert

Re: Project attributes for session login

Hi @kkyy.

You can use custom data from a CSV file and then use it to call the StInitSession method with different values.

Please check Customization of form data from script using a csv file, where you can also find a video with step-by-step instructions to create parameters from an input file and to use each value for a different VUser.

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.