Sunday, 9 October 2016

ServiceNow Automation using Selenium

Hello Friends, This week we will see something popular and simple to automate in Tech Ops area - ServiceNow

ServiceNow is a cloud based application. ServiceNow is a Software as a Service (SaaS). ServiceNow application is created using Angular.JS. ServiceNow is useful for Tech Ops, for primarily handling Tasks like Incident, Problem, Change, Configuration, Environment etc. ServiceNow has many other modules however we will consider only above mentioned modules for automation.

ServiceNow application is accessed using Webbrowser. Selenium web driver can be used to automate ServiceNow, however the application requires high amount of data hence the data driven and modular approach would be helpful. This kind of approach is hybrid approach for automating ServiceNow application.

Few more details of ServiceNow application: Incident is logged in ServiceNow if any service does not work as expected. For example the password does not work. Incidents are closed as soon as service is provided. For example password is reset. All such incidents require analysis to find out reducing future occurances and hence the Problem is created. Problem will be only closed after the analysis is done.  

Change is requested in case the software, hardware or network changes are required. For example if network socket needs to be changed then the change request will be raised. The change approval board will sit together and decide the approval and timelines of change. This is called as CAB approval process. When the application configuration is requested it may partially or completely affect some of the services. Configuration approval will be given only on technical details of configuration. The last one in our list is Environment. Environment like SIT, UAT, Production etc requires updates and for code drop and configuration these environments will not be available for some time as specified in request. Hence Environment ticket raised will be dealt with utmost care especially for Pre-Production and Production environment.

The above describes the ServiceNow application modules which we will automating in following sections.

Incident module is simple to automate but requires more data. Some of the information is who is raising the ticket, is it for him or for someone else or for group. His location, category, subcategory, incident description, its priority etc. Problem is comparatively simple with less data. Change has more sections and has approval process hence with more data we need more steps to executes. Also change has more test scenarios.  Configuration and Environment are simple compared to Change, the data is limited and test scenarios are also limited.

Before starting automation one more key thing is user access and previlleges. Ideally we should have user access and admin access. The user access will be used to create issues and admin to approve or resolve the issues.

As we have discussed above we will be handling more data and test scenarios, so we need to create data sheet accordingly. Once we have created data sheet as per the mandatory fields we will move on and create the common functionalities.

The last thing is to create test runner after creating driver for data sheet. Simple!

ServiceNow automation using Selenium is very simple. Isn't it?

Happy Automating ServiceNow!

1 comment: