Role based login using Worksoft Certify

Creating a login utility for any application using Worksoft Certify is not a big deal. However, the way of using the Login utility for any integration is important. Many of you must be knowing about the Role based login concept in Worksoft Certify. For those who are not aware of this concept this blog will help you understand the same.

Role based login concept means to login to the application based on Role. This Role based login concept is applicable for any kind of application which requires login credentials to login to it. Now let’s understand how to implement this Role based login concept.

For Role based login concept, we need to have a Login utility which will consist of the necessary steps related to login to the application. In the Login utility Layout/Recordset we need to maintain a variable let say ‘Role’ which will have Roles like Trainer, Learner, Advisor, Admin etc. In main integration Layout/Recordset we need to maintain this Role variable and put the required Role value for that particular integration.

Now let say an integration requires to login with multiple Roles in the flow, then we can maintain different Role variables like Role#1, Role#2 etc. in the integration Layout/Recordset and before the Login utility step in integration we need to set that particular Role variable as Role#1=Role, Role#2=Role etc.

Coming to the recordset filter part, in the Login utility step in integration we need to put filter criteria as Role=Role so that Role of integration Layout/Recordset matches with Role of Login utility Layout/Recordset. Note: If you are testing the integration in different environments, then in addition to the Role filter you need to put Environment criteria similarly, where you may put values of Environment such as QA/Dev/Prod etc.

Below there is an example of Role based Login to Web Account Manager Sample application.

Step-1 : Maintain a variable ‘Role’ in Login utility Layout/Recordset and add values like Trainer, Learner, Advisor, Admin etc.

Web Account Manager app

Step-2 : Maintain a variable ‘Role’ in main integration Layout/Recordset and put a value example-Learner

Main integration Layout

Step-3 : Attach Login utility Layout/Recordset to the Login utility and put filter criteria as Role=Role

Attach log in utility

Step-4 : Execute the process, in this example since we have put Role=Learner in main integration Layout/Recordset as shown in step-2, so it will login with Role=Learner and Username=TESTUSER2 as reflecting in 2nd row of Login utility Layout/Recordset in step-1

Execute the process

Step-5 : Successfully Logged in to Web Account Manager Sample application

Web Account Manager log in

Leave a Reply

Your email address will not be published. Required fields are marked *