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!

Thursday, 29 September 2016

Simple Environment test using VB Script

Many times you may encounter a situation where you are responsible to test the web application in test environment and need to make sure that the test environment is up and running.

I have created a simple solution to help you test multiple environments and collect the results even before you start your work.

Steps to test different environment –

1. Open web browser
2. Enter URL
3. Search web page (Depending on project requirement)
4. Capture result (Pass if webpage loaded)
5. Send out email to all stake holders

We will create a VBS file, and then create a Task in windows scheduler to run it every morning or whenever it is required

Copy the following code to notepad and save it in Environment.VBS file-

‘This is EnvrionmentTest.VBS
 ‘This is to test if all the environments are up and running
Call Main
Function Main
    Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
    IE.Visible = True
    IE.Navigate ""
          WScript.Sleep (1000)
if err.number = 0 then sendEmail (IE.LocationName & vbCrLf & IE.LocationURL)
End Function

Function SendEmail(eMessage)
strTo= "" 'Enter your managers email id'
strFrom=""    'Enter your email id'
strSubject="Environment Test Results"
strAccountID="myaccountid"    'Enter your email account id
strPassword="myemailpwd"      'Enter your email account password

Set oEmail = CreateObject("CDO.Message")
'Message configuration
With oEmail.Configuration.Fields
.Item("") = 2
.Item("") = strSMTPServer
          .item("") = 1
.item("") = strAccountID
.item("") = strPassword
End With
'Message Building
With oEmail
.From = strFrom
.To = strTo
.Subject = strSubject
.TextBody = eMessage
End With
' send message
On Error Resume Next
If Err Then WScript.Echo "SendMail Failed:" & Err.Description
End If

You can store results in a variable for all the websites and pass it to Send an email as eMessage.

Now windows scheduler –

1. Click on Start => Control Panel
2. Click on System and Security => Administrative tools => Task Scheduler
3. Click on Create basic task in action pane
4. Select time to start a program
5. Program/Script Enter “cscript “ and file path
Click on finish.

After this setup you never need to inform about which environment is up and running. Every morning you will come to know which all environment are up and running and if anything is not working.   

Keep impressing!

Tuesday, 27 September 2016

Assistive Application Testing

Assistive applications are computer applications specifically designed for specialized hardware used by physically challenged people.

I got the opportunity to test such software during one of our migration project. I thought this information may be helpful so sharing with you all.
Following applications are specialized applications for special people. They are well suited for windows environment.

1. Dragon

The application is from Nuance. The complete name is called as Dragon-Naturally speaking. This application helps to create professional reports, spread sheet, Documentation and Presentations with fast and accurate dictation.

Dragon is a speech recognition solution which helps to document, digital voice dictation and can be used from the workstation which does not have dragon installed through Citrix Server.  

Dragon also provides shortcuts which user can use with verbal instructions to avoid repetitive tasks.
The headphone connected to laptop is an essential gear to use Dragon. After installation user requires to create its profile, which is to tune the application for audio etc. This step is essential to make the application understand the user more accurately.

You can improve dragon’s vocabulary to help you. The words which you use often may be slangs need to be added to dragon’s vocabulary.

If the dragon is used with in work flows then we need to test the complete end to end flow with dragon commands. These commands are customized for users to handle different workflows efficiently. The commands should be easy to maintain and should be used in multiple flows.


JAWS (Job Access With Speech) is a computer screen reader program for Microsoft Windows that allows blind and visually impaired users to read the screen either with a text-to-speech output or by a Refreshable Braille display.

Freedom Scientific has developed JAWS for people whose vision loss prevents them from using computer screens.

JAWS have very useful training material. With key combinations JAWS can start speaking reading screen. JAWS can be completely controlled using Keyboard keys. Windows 10 compatible version is available.

The tests are usually around reading other applications help files, PDF and Web contents. Special keyboards are used by visually impaired people.

3. Read & Write Gold

Read & write Gold is developed by texthelp. This application helps people with dyslexia. Many people use this application to get help in reading and writing at school or workplace. This is useful for anyone whose first language is not English and requires assistance to read and write.
The tests around this application are reading webpages, text documents, PDF, test files for other applications, Screen masking and adding voice notes to word etc.

The above applications are proprietary products. We are sharing our experience only from testing perspective with these applications.

We will see more testing topics in next post.

Keep reading!

Friday, 16 September 2016

Telerik Test Studio

We have seen a few tools, but the client speaks about Script less automation tools. Hence I have decided to share my experience on one of the Script less automation tools - Telerik Test Studio.

Telerik test studio is one of the easiest tools to work with Functional testing, Performance, Load and Mobile testing.

Telerik test studio is very handy for web and desktop applications. One of the applications when we were automating we had issues handling Silverlight and WPF. However when we tried the same application using Telerik test studio it was quite simple.

Telerik test studio supports Silverlight, WPF, AJAX, HTML, WPF, MVC, JavaScript calls, dynamic page synchronization etc.

Telerik test studio is very simple to maintain test cases. The project explorer gives tree like structure to add test, create folder, add existing test, compile project etc.

Recording in any web browser is very simple –
                  1. Click on Record
                  2. Select Browser
                  3. Enter URL and the recording will start

Recording tool bar will appear at the bottom of the browser.

This toolbar allows highlighting elements, pausing test, resuming recording and docking the toolbar.
Using Verification builder or by actions from Elements Menu, verifications can be added. Also, if you want to handle complex scenarios, then you can add coded steps to it. Telerik test studio supports C# and

Data driven testing can be achieved with following options –

  • Using local data source
  • Excel spread sheet
  • XML
  • CSV
  •  SQL database

Test execution is very simple. Select the saved test and click on run list.

Test result panel helps to view the test summary and detailed test report. Test result shows the test steps and pass/fail results for each step.

If you want to capture the screenshots; you need to configure the test step with capture type as Browser or Desktop and File Name prefix. File name prefix will save the file on disk. For quick execution images will not be captured. This is another out of the box feature. Log files will be created and stored at the prescribed location.

So for us, initial setup and tool configuration took little while but then the recording and running tests was very simple. The maintenance part was also easy however for complex scenarios the code we created required C# or knowledge.    

Monday, 5 September 2016

Rainbow Framework and Selenium Automation

One of my friends, working on Rainbow Framework requested me to write about Rainbow and Selenium automation. Hence I am writing this post.

Software systems are becoming more complex and can handle the real time data as well as process large data seamlessly with higher performance. The issue with such complex systems is maintenance. Any real time systems like IP Phones, Video conferencing, application sharing should be always up and running.

However all the systems require maintenance due to the following factors –
     System issues – One of the service components suddenly stops performing bring the entire system download
     Environment changes – The outside network changes distortion to the system or failures
     User Requirement- User is expecting high quality video, multiple streaming through different systems, Usage of handheld devices remotely Etc.

These things cannot stop the entire system or should not pause, so it requires some mechanism to do the self-adaption to changes and appear the system working seamlessly without service disruption.

If such bulky and complex systems will have the self-adaption logic built within the system then it will become more complex and difficult to manage. Hence such self-adaption module will be separated and kept aside. These types of arrangements are called External Mechanism.

External mechanism will have properties like Ease to maintain, Cost effectiveness and Combined (Performance, Cost and Security).

Rainbow framework fulfills all the above requirements; the rainbow framework is to divide the external mechanism software in two parts. First part is general reusable part and second part is changes to deploy on specific target.

Let’s not get into more details of Rainbow framework here; we will see applying Selenium automation with this framework.

Architectural and adaption includes components, connector types, properties and operators. This will be different software components with in system. Using Selenium Webdriver we will create a wrapper around each change and run it during each change.

Here we need to write different java functions and create wrapper to work with rainbow framework.
Let’s discuss the generic step by step process –

        1.   We will create a library file to add all the generic functions, global functions and global variables
        2.   We need to hold the time and logs
        3.   Require reporting capabilities so require report file
        4.   We need transactions file to hold the components, connector types, operators information
        5.   We will create junit / java file as runnable to run externally
        6.   We will create repository to store all the properties
        7.   We need one driver file; driver file will be called by runnable file

The Rainbow framework will change the component within predefined time using connectors and operators. If the time required is more than predefined time then this will be treated as a system failure or violation. So we need to keep the selenium script up and running after each change to test is the changes has been made as expected. Rainbow Framework provides a reusable infrastructure for architecture-based self-adaptation through its separation to two parts; general part and tailor-able part. 

Selenium code should be written in such a way that it will be verify the tailor-able part.
The selenium code eventually evolves to the extent that the framework will be completely wrapped (Functions) with the selenium code. Each tailor-able part will call the selenium script to execute and will generate the report.

Happy Scripting!

Saturday, 27 August 2016

Introduction to Scrum

I have recently completed my Certified Scrum Master (CSM) course hence writing this post.

The Scrum is one framework of implementing Agile. This framework is more popular than others especially in Software development and delivery. 

Scrum is a fixed length cycle of iterative developments. Each cycle can be of 2 weeks or 1 month.These are like calendar months, which are fixed and cannot be change to 40 days or 20 days. Also like calendar months, if we do not have any work we cannot remove them. Similarly developers cannot cancel the sprint. Rather they will pull more work from backlog.

Scrum team has only 3 roles. No less. No more.

Let’s find out details of each role -

Product Owner – Business owner or Client. (Product owner cannot be BA or Any other team member. This can be Client Manager / Sr. Client Manager Etc.)

Product owner is responsible to get the value delivered in each sprint by the team members. He will be collaborative and decision maker. He should be able to inform other stake holders on overall progress and bring in the requirements in form of suggestions.

 Scrum Master – The facilitator. May not be technical person, however will make sure scrum functions as expected. He is not responsible for deliveries. He can neither take any decisions to update any feature nor stop any deliveries for quality or any other issues.  He is responsible for protecting team from external interference and checking if team is comfortable to deliver.

He is meeting organizer and helping others to follow the norms so that each meeting will be fruitful. He is a coach to impart agile values in team members.

Development Team – This is self-organised team. This team consist of all the remaining which includes BA, Architect, Developers, QA and anybody else which is required to build shippable item. The responsibilities of development team is to make sure within sprint they deliver quality item in each iteration.

Within development team BAs help to understand and prepare required documents, architect creates design; developers write code and QA test the code. These all members work closely and collaboratively. In each Sprint (2 -4 weeks) all of them work together and create a shippable product. So at the end of each sprint the Product owner if wish to release he can release the developed work.
Scrum has following ceremonies. Ceremonies can be better understood as functions to perform in each sprint (Every 2-4 weeks).

1. Sprint Planning
2. Daily Scrum meeting (Stand up)
3. Sprint review (Demo / Play back)
4. Sprint retrospective
5. Grooming

Sprint planning is 10% of the sprint time and happens at the beginning of each sprint. So if we have 2 weeks sprint, i.e. 10 days then it will be 1 day. Here all the stories (features / requirement) which can be delivered with in sprint will be pulled in Sprint backlog. The tasks for each story are created and hours of work are decided.

Daily Scrum is a daily 10 min discussion. Each development team member and scrum master answers following 3 questions –

1. What did I do yesterday?
2. What will I do today?
3. Any issues (Impediments)

Any help is available within team will be proposed but will be discussed after the scrum meeting.

Sprint review is 10% of the sprint time and happens before the end of sprint. So it will be 1 day if we have 10 days sprint. Here all the work is shown to product owner and he will accept the story if it is done.

Sprint retrospective is 10% of the sprint time and happens after the review. This meeting is to check the learning. It is generally around following questions –

1. What went well in this sprint?
2. What did not went well in this sprint?
3. What we will continue doing in next sprint?

Grooming is a meeting to discuss the product backlog. This happens during sprint and takes 10% of sprint time. In grooming team goes back to product backlog and looks at each product item to assign some high level estimates in terms of story points, this will make the list more sequenced and sorted.

If we look at the time distribution for 10 days (2 week) sprint, actual work will be carried out in 6 full working days.

As a team each one is individually responsible to update the work completed. And the burn down with remaining work is created and displayed on floor.

The basic idea of Agile is around three towers –

1. Transparency
2. Inspection
3. Adaptability

Lot of work on Scrum is created across globe. Each team alters the scrum to make it best fit; however as discussed basic concepts around it remain the same.

It will be more interesting to read more on other agile process as well.

Keep Practicing Scrum!

Thursday, 18 August 2016

Automation Testing using SOAP UI

Thank you for making my blog successful. I am writing this post for those who have requested to write on SOAP UI.

SOAPUI is an open source tool for testing web services and SOA (Service Oriented Architecture). This functional testing tool is used for functional, regression and load testing.

SOAPUI is useful to create XML request and send it to server and get the response from Server.
We need WSDL to test using the SOAPUI. WSDL URL is nothing but the end point URL provided to test the web service. These endpoints are operating on messages containing information. The operations and messages are described and then bound to network protocol and message format to define and endpoint.

Once the SOAPUI is installed follow the steps given below to create test case -

1. Create New Soap Project from File Menu (Shortcut is Ctrl -N)

2. Enter Project Name

3. Enter WSDL and click OK (This is endpoint URL for testing. During actual work you may have your project specific)

4. This will create your first project to test and learn

5. Double click on Request 1and Click on (+) to add the test suite

6.  Enter name to create Test Suite and Click OK

7. Enter test case name and Click OK

8. This will ask you to enter request to test case. Enter the name. Click OK

Once the test case is created click on the RUN (Green Arrow). This will execute the test case. This will take few seconds. The request will send to the WSDL end point and the response will be received.

Now we will add some assertions. Assertions are nothing but validations. If assertion fails then the test case fails.

Once we have created all the test cases as mentioned above under the regression suite then we can run them from command prompt as well.

Testrunner.bat “C:\ParagTestBlog\SOAPTestProject.xml”