How to: Finding and using capabilities/sets for permissions for QA

Introduction:

In non-Eureka test cases we have permission displayNames specified in Preconditions. For example:

image-20240725-125925.png

On Eureka environments, permissions are replaced with capabilities and capability sets. It is possible to find capabilities/sets for any specific permission (at least this is expected). Found capabilities/sets now should be assigned to a test user instead of permissions.

Below is the guide on how to find and assign capabilities/sets to execute a test case with certain permissions specified.

 

Guide:

  1. Login to target Eureka environments as an admin user

(Create authorization role for your test user:)

  1. Go to “Settings” → “Authorization roles“

  2. Click on “New“ button

  3. Fill role name with any unique value → Click on “Save & close“ button

  4. Search for created role name and open it

  5. Click on “Assign/Unassign“ button

  6. Find your test user and select a checkbox for it

  7. Click “Save” in modal

(Prepare test user role for update:)

  1. Click on “Actions“ → Select “Edit” option

  2. Click on “Select application“ button

  3. Select all available applications → Click on “Save” in modal

(Find capabilities/sets and assign them to test user role:)

  1. Open a new browser tab

  2. Login to target Eureka environments as an admin user

  3. Go to “Settings” → “Developer“ → “Can I haz capabilities?“

  4. Make sure that permissionDisplayName is selected in “Search by” dropdown

  5. For each permission name from test case Preconditions:

    1. Paste it into search input field

    2. Click on “Search” button

image-20240725-133313.png

 

 

c. Note the following values for each found entry in “Capabilities“ and “Capability Sets“ sections of the results:

type

resource

action

d. Go to the first browser tab with previously created test user role.

e. Find capability set checkboxes for found “Capability Sets“ entries:

Look into “Capability sets“ accordion

type corresponds to the name of the table

resource corresponds to the value in Resource column

action corresponds to the name of one of the checkbox columns (“View”, “Edit”, “Create”, etc.)

h. Select checkboxes for each found capability set

i. Find capability checkboxes for found “Capability“ entries:

Look into “Capabilities“ accordion

Find checkboxes the same way as for capability sets

Select checkboxes for each found capability

  1. After capabilities/sets for each required permission are found and assigned to a test user role, save the role by clicking “Save & close“ button

  2. Login as a test user which was assigned to test user role (see Step 7)

  3. Execute the test case

Before executing the next test case, deselect all capability/set checkboxes from test user role, and assign new capabilities/sets per Steps above. The same role can be re-used for all tests.

 

Notes

  1. If for a certain permission we find a capability and a capability set with exactly the same type/resource/action values, using only capability set is enough. For example, in a case shown below, found capability set provides necessary abilities and it is enough to only use this capability set and ignore found capability.