GUI Testing

Last modified 15 Nov 2021 22:44 +01:00

For the automation of the MidPoint GUI testing, Selenide library is used (for more information, please, visit http://selenide.org/). It is a wrapper for Selenium WebDriver.

To start automation tests creating, please, follow the following steps:

  1. Install Mozilla Firefox.

  2. Install FireBug plugin for Firefox (FireBug is used just for specifying of the GUI element identifier, e.g. element path, name…​)

  3. Java is to be installed as well.

Project structure:

To separate all automation tests to the individual group, selenidetest module was created in the project. It is created as a child module of the testing one. So the full path to it within the project is midpoint/testing/selenidetest.

Change site url:

To change site url, edit midpoint/testing/selenidetest/testng.xml and site.url parameter.

Pom.xml:

To use Selenide library, maven dependency is to be added to pom.xml file.

Running the tests:

To run tests you can use one of the following way:

  1. Using cmd

    1. Run cmd and change dir to the …​/midpoint/testing/selenidetest.

    2. Run "mvn test -P guitest" command.

  2. Using IDEA IDE

    1. Select Run → Edit configurations menu item.

    2. Add New Configuration by clicking plus sign in the left upper corner.

    3. Select TestNG from the appeared list

    4. Set the following values:
      Select Suite radio button
      Suite: select path to the …​/midpoint/testing/selenidetest/testng.xml file
      Working directory: select path to the …​/midpoint/testing/selenidetest
      Use classpath of module: set "selenidetest"
      If there is no "selenidetest" module in the list of modules for "Use classpath of module" setting, please, follow the next steps: open File → Project Structure window. Select Modules view. Click on "+" sign to add new module, select Import Module. In the opened Select File or Directory to Import window, select midpoint/testing/selenidetest/pom.xml file. In the opened Import Module from Maven window, leave default settings to be applied and just click Next/Apply button. After selenidetest module is added to project structure, please, add it to "_Use classpath of module" _setting for Run Configuration.

    5. Save configuration

    6. Select created TestNG configuration from "Select Run/Debug Configuration" drop down list, click Run button

Basic scenarios:

To make sure that the system was installed successfully and it works, the suite of basic scenarios was created. It covers the very basic test cases within login, user’s, account’s, organization’s and role’s functionalities.

Category Scenario Status Implemented in Test description

Log in Tests

Scenario 1

🗸

LoginTest.test001loginWithCorrectCredentialsTest()

Login test with correct credentials

Scenario 2

🗸

LoginTest.test002loginWithIncorrectUsernameTest()

Attempt to log in with incorrect name

Scenario 3

🗸

LoginTest.test003loginWithoutUsernameTest()

Attempt to log in without user name

Scenario 4

🗸

LoginTest.test004loginWithIncorrectPasswordTest()

Attempt to log in with incorrect password

Scenario 5

🗸

LoginTest.test005loginWithoutPasswordTest()

Attempt to log in without password

Simple User Tests

Scenario 1

🗸

SimpleUserTests.test001createUserWithUserNameOnlyTest()

Create new user with user name value only

Scenario 2

🗸

SimpleUserTests.test002createUserWithAllFieldsTest()

Create new user with all user details fields

Scenario 3

🗸

SimpleUserTests.test003editUserTest()

Update user information test

Scenario 4

🗸

SimpleUserTests.test004cancelUserUpdateTest()

Cancel user update and check data are not changed.

Scenario 5

🗸

SimpleUserTests.test005createUserWithEmptyFieldsTest()

Attempt to create a new user without user name

Scenario 6

🗸

SimpleUserTests.test006createUserWithExistingNameTest()

Attempt to create a user with already existing user name value

Scenario 7

🗸

SimpleUserTests.test007deleteUserTest()

Delete existing user

End User Tests

Scenario 1

🗸

EndUserTests.test001createEndUserTest()

Create user, assign End user role to this user.

Scenario 2

🗸

EndUserTests.test002loginAsEnduserTest()

Log in to midPoint as user from the previous test

Scenario 3

🗸

EndUserTests.test003changePasswordAndLoginTest()

Log in as user with End user role assigned, reset password and relogin with new password

Super User Tests

Scenario 1

🗸

SuperUserTests.test001createSuperUserTest()

Create user, assign Superuser role to created user

Scenario 2

🗸

SuperUserTests.test002loginAsSuperuserTest()

Log in to the system with user with Superuser role assigned

Scenario 3

🗸

SuperUserTests.test003disableSuperuserAndLoginTest()

Disable user with Superuser role assigned, attempt to log in with disabled status

Scenario 4

🗸

SuperUserTests.test004enableSuperuserAndLoginTest()

Enable user with Superuser role assigned, log in to the system.

Basic Role Tests

Scenario 1

🗸

RoleTests.test001createRoleTest()

Create new role through Roles → New role page

Scenario 2

🗸

RoleTests.test002updateRoleTest()

Update the role fields values

Scenario 3

🗸

RoleTests.test003deleteRoleTest()

Delete the role

Basic Organization Tests

Scenario 1

🗸

OrganizationTests.test001createOrganisationTest()

Create new organization through Users → New organization page

Scenario 2

🗸

OrganizationTests.test002createSubOrganizationTest()

Create sub organization for organization created in the Scenario 1

Scenario 3

🗸

OrganizationTests.test003updateOrganizationTest()

Update organization created in the Scenario 1

Scenario 4

🗸

OrganizationTests.test004deleteOrganizationTest()

Delete organization created in the Scenario 1

Basic CSV Account Tests

Scenario 1

🗸

CsvAccountTests.test001createCsvAccount()

Create test user, import CSV resource with synchronization opportunity, create account for test user with CSV resource, check account

MidPoint GUI tests covering.

Extended test scenarios are described in the following table:

Category Scenario Status Implemented in Test description

Resource-User-Account Tests

Scenario 1

(?)

ResourceUserAccountTests.test001importResourceTest()

Import OpenDJ resource from"opendj-localhost-resource-sync-no-extension-advanced.xml" file

Scenario 2

(?)

ResourceUserAccountTests.test002checkResourceConnectionTest()

Test imported resource connection

Scenario 3

(?)

ResourceUserAccountTests.test003createAccountTest()

Create user, add account with imported resource to this user

Scenario 4

(?)

ResourceUserAccountTests.test004updateAccountAttributesTest()

Update account attributes (Common Name, Surname), check if user’s attributes are updated as well

Organization Structure Tests

Scenario 1

(?)

OrganizationStructureTests.test001importOrganizationStructureFromFileTest()

Import organization structure from "org-monkey-island-simple.xml" file

Scenario 2

(?)

OrganizationStructureTests.test002assignOrgUnitTest()

Assign organization to user. Check if organization was assigned to user on the User’s details page and on the Organizations Tree page

Scenario 3

(?)

OrganizationStructureTests.test003unassignOrgUnitTest()

Unassign organization from user. Check if ser was unassigned.

Object Template Tests

Scenario 1

(?)

ObjectTemplateTests.test001supplyUserAttributesByObjectTemplateTest()

Check if user’s credentials are updated according to User Template settings

Note: almost all tests use midPoint searches for different objects, e.g. search for user on Users page, search for resource in Select resource(s) window while adding account, etc. So there is no separate test for such functionality as it is tested within another tests.

Legend:
🗸 - fully implemented
(?) - partially implemented, work in progress
- not implemented at all

Was this page helpful?
YES NO
Thanks for your feedback