Page tree
Skip to end of metadata
Go to start of metadata

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 (https://www.mozilla.org/en-US/firefox/new/). 
  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

(tick)

LoginTest.test001loginWithCorrectCredentialsTest()

Login test with correct credentials

 

Scenario 2

(tick)

LoginTest.test002loginWithIncorrectUsernameTest()

Attempt to log in with incorrect name

 

Scenario 3

(tick)

LoginTest.test003loginWithoutUsernameTest()

Attempt to log in without user name
 

Scenario 4

(tick)

LoginTest.test004loginWithIncorrectPasswordTest()

Attempt to log in with incorrect password
 

Scenario 5

(tick)

LoginTest.test005loginWithoutPasswordTest()

Attempt to log in without password

Simple User Tests

Scenario 1

(tick)

SimpleUserTests.test001createUserWithUserNameOnlyTest()

Create new user with user name value only
 Scenario 2(tick)SimpleUserTests.test002createUserWithAllFieldsTest()Create new user with all user details fields
 Scenario 3(tick)SimpleUserTests.test003editUserTest()Update user information test

 

Scenario 4

(tick)

SimpleUserTests.test004cancelUserUpdateTest()

Cancel user update and check data are not changed.
 

Scenario 5

(tick)

SimpleUserTests.test005createUserWithEmptyFieldsTest() Attempt to create a new user without user name
 Scenario 6(tick)SimpleUserTests.test006createUserWithExistingNameTest()Attempt to create a user with already existing user name value
 Scenario 7(tick)SimpleUserTests.test007deleteUserTest()Delete existing user
End User TestsScenario 1(tick)EndUserTests.test001createEndUserTest()Create user, assign End user role to this user.
 Scenario 2(tick)EndUserTests.test002loginAsEnduserTest()Log in to midPoint as user from the previous test
 Scenario 3(tick)EndUserTests.test003changePasswordAndLoginTest()Log in as user with End user role assigned, reset password and relogin with new password
Super User TestsScenario 1(tick)SuperUserTests.test001createSuperUserTest()Create user, assign Superuser role to created user
 Scenario 2(tick)SuperUserTests.test002loginAsSuperuserTest()Log in to the system with user with Superuser role assigned
 Scenario 3(tick)SuperUserTests.test003disableSuperuserAndLoginTest()Disable user with Superuser role assigned, attempt to log in with disabled status
 Scenario 4(tick)SuperUserTests.test004enableSuperuserAndLoginTest()Enable user with Superuser role assigned, log in to the system.
Basic Role TestsScenario 1(tick)RoleTests.test001createRoleTest()Create new role through Roles -> New role page
 Scenario 2(tick)RoleTests.test002updateRoleTest()Update the role fields values
 Scenario 3(tick)RoleTests.test003deleteRoleTest()Delete the role
Basic Organization Tests   Scenario 1(tick)OrganizationTests.test001createOrganisationTest() Create new organization through Users -> New organization page
 Scenario 2(tick)OrganizationTests.test002createSubOrganizationTest()  Create sub organization for organization created in the Scenario 1
 Scenario 3(tick)OrganizationTests.test003updateOrganizationTest()  Update organization created in the Scenario 1
 Scenario 4(tick)OrganizationTests.test004deleteOrganizationTest()Delete organization created in the Scenario 1
Basic CSV Account Tests   Scenario 1(tick)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(question)ResourceUserAccountTests.test001importResourceTest() 

Import OpenDJ resource from

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

 Scenario 2(question)ResourceUserAccountTests.test002checkResourceConnectionTest()  Test imported resource connection
 Scenario 3(question)ResourceUserAccountTests.test003createAccountTest()  Create user, add account with imported resource to this user
 Scenario 4(question)ResourceUserAccountTests.test004updateAccountAttributesTest()  Update account attributes (Common Name, Surname), check if user's attributes are updated as well
Organization Structure Tests Scenario 1(question)OrganizationStructureTests.test001importOrganizationStructureFromFileTest()

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

 Scenario 2(question)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(question)OrganizationStructureTests.test003unassignOrgUnitTest()

Unassign organization from user. Check if ser was unassigned.

Object Template Tests Scenario 1(question)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:
(tick) - fully implemented
(question) - partially implemented, work in progress
(error) - not implemented at all

  • No labels