OIM's UI functionalities can be tested by automation tool like Selenium. There are lot of test cases we need to perform on OIM UI, after doing some developments or implementation (just to verify whether all existing functionalities are working fine). Some time it is very painful job to perform all per-defined test cases again and again. Using Selenium, all the UI based pre-defined test cases can be executed automatically with out any human intervention, and this way we can achieve automated testing on OIM, which is faster than manual testing, efficient and error free.
this blog will give an example of how we can build Selenium test script for OIM.
Selenium test script works on web element of an web page, like button, link etc. If we can identify those element, then it is not a very difficult job to build a test script for a scenario.
for example, I need to perform the below scenario on OIM PS3
************ As Requester ************************
1. Login to OIM identity console as requester.
2. Go to catalog and search for a disconnected application "".
3. Click on Add To cart and checkout.
4. Fill the application form.
5. Provide business justification and submit the request.
6. Logout from the OIM Identity console.
**************** As Approver *********************
7. Login to OIM identity console as approver.
8. Go to Pending Approval and search for the requested id generated by requester.
9. Select the request and approve the same.
10. Logout from OIM Identity console.
**************** As Implementer *******************
11. Login to OIM Identity console as implementer.
12. Go to Pending Fulfillment and Search for the request id generated by requester.
13. Select the request and complete the same.
14. Now go to Track Request and verify the status of the request.
If I need to perform the automated testing of the above test scenario, I have to convert each and every steps with selenium methods. for example I if need to click a button or enter text into a text field, I need to first get the XPath or Element id of those components. Then using those details selenium can identify those element in browser and perform action (like click or enter data).
in my case //*[@id=\"pt1:_pt_it1::content\"] is the XPath representation of User Login field of OIM login page. similarly //*[@id=\"pt1:_pt_cb1\"] is for Submit button, and so on.
Now here is the full Java code for Selenium Test. For basic of Selenium and how to setup environment refer Selenium HQ
Please check the below video for how the actual testing looks like.
Please note, all the XPaths mentioned in the above code, may not be exactly same for you (before running the test, verify all the XPaths form chrome browser).
this blog will give an example of how we can build Selenium test script for OIM.
Selenium test script works on web element of an web page, like button, link etc. If we can identify those element, then it is not a very difficult job to build a test script for a scenario.
for example, I need to perform the below scenario on OIM PS3
************ As Requester ************************
1. Login to OIM identity console as requester.
2. Go to catalog and search for a disconnected application "".
3. Click on Add To cart and checkout.
4. Fill the application form.
5. Provide business justification and submit the request.
6. Logout from the OIM Identity console.
**************** As Approver *********************
7. Login to OIM identity console as approver.
8. Go to Pending Approval and search for the requested id generated by requester.
9. Select the request and approve the same.
10. Logout from OIM Identity console.
**************** As Implementer *******************
11. Login to OIM Identity console as implementer.
12. Go to Pending Fulfillment and Search for the request id generated by requester.
13. Select the request and complete the same.
14. Now go to Track Request and verify the status of the request.
If I need to perform the automated testing of the above test scenario, I have to convert each and every steps with selenium methods. for example I if need to click a button or enter text into a text field, I need to first get the XPath or Element id of those components. Then using those details selenium can identify those element in browser and perform action (like click or enter data).
in my case //*[@id=\"pt1:_pt_it1::content\"] is the XPath representation of User Login field of OIM login page. similarly //*[@id=\"pt1:_pt_cb1\"] is for Submit button, and so on.
Now here is the full Java code for Selenium Test. For basic of Selenium and how to setup environment refer Selenium HQ
Please check the below video for how the actual testing looks like.
Please note, all the XPaths mentioned in the above code, may not be exactly same for you (before running the test, verify all the XPaths form chrome browser).