top of page

Overview

​

Use a Test Accounts section in a test case only if the number of tests accounts is relatively small and not shared among other scripts. Otherwise explore the other options that are available. During the Process Raw operation of the Performance Test Support process, Test Accounts within the test case take priority over all other options.

​

The Password column is available only if there are different passwords. Ideally there should be one password for all test accounts, in which case the Password column should be in place, but empty. The single password should be manually entered into the script and encrypted. Documenting passwords is a security risk, so ensure you read the methods available to mitigate that risk.

 

By default the Test Case Template document has a Test Accounts section already in place. Hence the Performance Test Support process will automatically create an empty section in any new test case, ready for you to populate.

​

The test accounts are implemented by the Process Raw operation of the Performance Test Support application using a standard text data file, populated automatically with the contents of the table. The column headings are converted to parameter names and the parameter representing the User ID column (iUserID) is configured as Unique / Once, on the assumption that the user can only have one login session at any one time.

​

The section heading is the target of bookmark P_xxxx_TestAccounts, where xxx is the Test Case ID. eg. P_TC001_TestAccounts.

 

The text between the heading and the table is ignored by the Performance Test Support application.

 

Although additional columns can be added, the table must have a minimum of two columns as shown here:

​

ParameterNames

Parameter Names

 

The User ID column is converted to parameter iUserID.

The Password column is converted to parameter iPassword.

​

Other columns that the scripter may add are also converted to parameter names using the following formula:

  • All spaces are removed

  • The letter i is prepended

  • The result is truncated to 30 characters

  • Example: First Name is converted to iFirstName.

 

Security

Security

 

Many organisations place clear-text passwords in the text data file used to apply test accounts to a script. This is obviously a security risk. Placing passwords into a document as described here is also a security risk and should only be done if each test account has a separate password and the security of the system is not a high priority.

​

If there is only one password for all User IDs, then it is preferable to leave the Password column empty. In this case the Process Raw operation of the Performance Test Support application will substitute the words EncryptMe as a dummy password. It can be assigned and parameterised as descibed in the How it works section below, but the scripter will need to change it and encrypt it.

 

HowItWorks

How it works

 

This example shows how the test accounts in a test case are automatically converted to text data file parameters in the script by the Process Raw operation of the Performance Test Support process.

​

In this example the test accounts are defined in a test case and the tester has found that three more attributes must be added to each rule. In this example they are:  First NameLast Name and Role. They are implemented as extra columns to the table as shown in the illustration here:

 

During the Process Raw operation of the Performance Test Support process, all attribute pairs are identified and placed into an Unassociated Name-Values collection. Similarly, the contents of the table in the Test Accounts section are placed into a Test Accounts collection.

 

Once this is complete, these two collections are presented as shown below.

​

 

All the scripter needs to do is open the Test Accounts tab on the right, identify the User Id in the left hand pane and its corresponding parameter in the right hand pane, then press the Associate All Values button (if the user ID value is clearly unique) or the Associate Displayed Only button (if there is the possibility it isn't unique).

 

Then repeat the process for the password and any other Test Account parameters (such as First Name, Last Name, and Role as shown in the example).

 

 

The two parameters should then be displayed in the bottom pane.

 

​

The Performance Test Support process configures the test accounts as follows:

 

1. A text file called iUserID.dat is created in the script folder and populated with the test accounts from the Test Accounts table in the test case using column headings converted to parameter names as specified above.

 

2. The parameter names are configured as a text file parameter using the new iUserID.dat file. The iUserID parameter is configured as Unique / Once, and all others are configured as Same line as iUsedID as shown in the illustration below.

​

​

3. The illustration below shows the values that you associated with the parameter names in the green screen above are replaced with the respective parameter name, and the original value is appended to the respective line as a comment.

​

​

Note: If all passwords are the same, then it is advisable to delete the comment associated with the password and manually encrypt the password itself.

 

SectionManagement

 

Section Management

 

A Test Accounts section may appear in two places:

  • The Test Case Template document

  • Any Test Case

 

It is optional. Unless you have deleted it from the Test Case Template document, it will be included in all new test cases you create.

​

Test Case section

​

The illustration below shows the minimal structure of the section as it will appear in a test case. It shows that three rules were manually entered.

 

Manually deleting or re-adding the section in a test case is relatively straightforward, but must be done with care. Make sure you follow the appropriate link above and review the methods described there before taking any action.

​

Deleting a section
Re-adding a section
TestCase

 

More attributes can be added to each rule by adding other columns as required. Their headings will be converted to parameter names. For example, First Name will be converted to iFirstName.

AddingColumns

​

Test Case Template

​

Manually deleting or re-adding it into the Test Case Template is relatively straightforward, but must be done with care.

 

To delete the section from the Test Case Template you only need to manually select it and delete it, and make sure you delete the appropriate bookmark. Then any new test case will not include it.

​

If you have deleted it from the Test Case Template and decide you need it, then you will need to re-add it manually.

​

TestCaseTemplate

 

Rule Management

 

Adding or deleting a test account from the Test Accounts section is simply a matter of adding or deleting the rows from the table. Make sure you don't leave any empty cells except the Password. If leaving any cell in the Password column empty, make sure all cells in it are empty.

​

Similarly, adding or deleting additional fields to each rule is simply a matter of adding or deleting the appropriate columns, remembering that the two columns headed User ID and Password must remain.

​

The last rule

​

Remember if deleting the last test account, make sure to leave the last row empty - do not delete the row itself - so that the table only consists of the heading row and the empty row. In this case you can leave the empty table there or delete the section altogether as described in Section Management above.

RuleManagement
bottom of page