Sunday 21 May 2017

Emerging Technologies and Next Leap in Software Testing

In my tenure in Software Industry, I have witnessed tremendous transformation in the industry. To name a few… starting waterfall model to Agile development processes, from Products to services oriented model, from being Personal computing to mobile computing, from localization to Globalization, continuously evolving technologies. These continuous shifts in software industry is not only pushing developers/architects to always be up to date but it is also making QA/Testing teams to continuously strive to be up to date in their skills. This is wave of new technologies which is always challenging for testers to be ramped up/upgrade their skills and be ready to overcome the issues/implications poses by the new technologies.

this article, I tried to highlight the most important/critical shifts in industry and impacts of these shifts on software testing. It is very interesting to find out more about these shifts and to know business and we (testing professionals) can utilize these shifts and re-skills ourselves.

1.     Digital Transformation is the current key to success for business:
With a majority of organizations making a significant investment in the digital world, the need for digital transformation will require a huge shift of focus towards digital testing. Robust strategies for digital assurance will be required for focusing on optimizing functional testing across channels.
 
2.    DevOps becoming the driver for Quality Engineering:
DevOps ideology is based on seamless collaboration and integration between the different departments of an IT Organization – developers, quality professionals, and IT professionals. Testing plays a business-critical role as developers are involved not just in the correctness of their code, but also in the testing and overall Quality engineering aspects. DevOps thus is propelling businesses towards greater speeds of deployment and quality assurance and is thus helping them realize higher returns on investment and faster time to market in a cost-efficient manner.
 
3.    IoT (Internet of Things):
Heralding an era of Connected Devices: With IoT growing in leaps and bounds, more and more customers rely on IoT Testing before using the products. If the products are not tested, their functionality, security, and effectiveness – all will come under scanner. According to a HP study, 70 percent of devices in the Internet of Things are vulnerable to security problems.
 
4.    Focus shifting towards Open Source Tools:
Now a day’s companies are looking more towards using open source tools rather than proprietary tools. The coming future will see a lot of Open source tools in action as more and more organizations will adopt them for proper implementation of Agile, DevOps, and Test Automation. Support communities for the open source tools can only become more and more involved and active.
 
5.    Requirements for Software Development Engineers in Test (SDETs):
SDETs have been existing among us since almost a decade, but their role was very different from traditional testing roles. In coming future, almost all testers will need to wear an SDET hat to be successful in the field of Test Automation and that is going to become mainstream.
 

6.    New address for Quality => Quality@High_speed :
Every customer wants the best products in the fastest possible time. This is making organizations focus on providing the best user experience along with the fastest time to market. The speed is only going to increase (and the quality better) with the latest technologies and tools at the disposal of teams.

Tuesday 25 April 2017

Produce Functional Test Automation in Visual Studio

Introduction:
This post will provide you a single source for producing your test automation for your Web Application, your UWP Apps and Mobile Apps on Android by just writing 2-3 reusable lines of code. It also provides the capability of executing the tests on different platforms e.g. Windows machine, mobile devices (Windows and Android).

Targeted Audience:
QA team members and DevOps team members who wanted to generate their automated tests for their regression suites and Continuous Integration in their Application life cycle.

Pre-Requites:

For TFS support:

Install Excel Providers on the machines:


Running UWP Tests:
Appium Test Running on real devices and Emulator
Pre Requisites:

Configure the environment variables in your machine:
  • JAVA_HOME: Pointing to the Java SDK folder\bin
  • ANDROID_HOME: Pointing to the Android SDK Folder.
  • Add the following paths in the Path variable: %JAVA_HOME%, %ANDROID_HOME%, %ANDROID_HOME%\tools\, %ANDROID_HOME%\platform-tools\, %JAVA_HOME%\bin\
  • Visual Studio Android Emulator: https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx
  • Hyper V is enabled (only for running test on Emulator)


Developing Automated Tests in Visual Studio:
  1. First download the Develop Automated UI Tests extension from Visual Studio Gallery and install it.
  2. After that go for creating a new Project in Visual Studio and select the Template "Develop UI Test Automation", provide a desired name to project and click on "Ok" button to create the project.
  3. Expends the Solution Explorer, it will show the structure as given below:
  4. It has some sample test included in the project. Expend the TestCases Folder to view the test cases, here the format for test cases is in the form of Excel file. This format is very handy business users to write their scenario which we can later convert into automated tests. Following is a typical structure of test case file, it has predefined list of Keywords, Objects are the user defined names to identify the objects, Value field contains the value to be enter on UI or to be validated on UI and Last IncludedInTestRun field specified if particular test steps need to be executed or not while running the tests:
     
  1. This framework stores the Objects definition in a resource file associated with the project i.e. Objects.resx file. This file has definition(s) for objects in the test case file given above by having property value of test objects for application under test. E.g. for above Objects following details of objects stored: 

  1. Once we are done with updating the Objects.resx file and creating the Test Case excel file, save the file under Test cases (or under a Subfolder) folder in the solution.
  2. Add a new unit test case class file or update existing unit test case file, create a new test method and copy paste following lines and make changes as illustrated below:

     

  1. Update App.config file:
    Make sure to update the highlighted keys according to your system:

     

  1. Update the Key TestCaseFolderFullPath to point to correct path:

     

  1. Run the tests and view the results, it provides proper results e.g. following output from a failed test case:

     


Result for a passed test case:  



Keywords:
Keyword
Description
Entertext
Used to provide the user values to a text box or an edit box.

+

It also contains the conditions for Username & password.
clickbutton
Used to perform a click operation on buttons or similar controls.

Ex: Clicking a Login button in login page
setpage
Used to set the page when there is change in pages during consecutive navigations. This will ensure for the easy identification of objects for the next action

+

Navigate to a page

+

Set the current page with or without title


clicklink
Used to perform a click operation on links or similar controls

Ex: Clicking on a Select link after filtering the respective role
opendropdown
Used to perform an action of opening a drop down item
selectdropdownitem
Used to perform an action of selecting a drop down item
verifydropdownitem
Used to compare the drop down items for a specific search criteria in application against to the data retrieved from database for the same search criteria

Ex: The Grade options retrieved for a specific School and School Year
openmenu
Used to perform an action on Menu items like Admin, Support etc. for providing more options for consecutive actions
verifylabel
Used to validate the content of a label
waitforprocess
Used to make the script wait for different conditions like : Wait for control ready
validategrid
Used to compare the Grid results in application against to the data retrieved from database

Ex: Student Contact Information, Student category information
clickitem
Used to perform click operation on div or similar controls

Ex: Clicking on Section Editor div
dismisswindowpopup
Used to dismiss the popup window

Ex: Clicking on “OK” or “Cancel” button
verifymessageonpopupwindow
Used to validate the message on popup window                     
verifyproperty
Used to validate the existence of any control
setfocus
Used to set the focus on control before performing any action

Ex: Setting focus on the button before clicking it
DragAndDrop
Used to perform drag and drop a control(with value as optional) from source location into target container
DoubleClick
Used for double-clicking a control

 Tools used for getting the properties used for find objects and running tests:

  1. For UWP app, we have to use Inspect.exe for finding the objects properties. It comes by default on Windows 8 or later and typical location for this is Program Files(x86)\Windows Kit\8.0\bin\ and then type of your system i.e. x64 or x86. 
  2. For Android we can use the UIAutomatorViewer tool, which come bundled with Android SDK, once you setup the Pre requisites, you can access it just by opening up command prompt and typing uiautomatorviewer. 
  3. For normal web based application in Device or on desktop we can use Dev toolbar in browsers (by pressing the F12 key) to find the objects.
Troubleshooting:

  • If getting the error on running test in Chrome then download the latest version of Chrome driver 2.28 from Google's site and copy it to following folder in Appium: \node_modules\appium\node_modules\appium-chromedriver\chromedriver\win
  • UIAutomatorViewer for getting native app's controls. Make sure devices name in Appium and Code are same and devices should have Debugging Mode enabled.

Thursday 20 April 2017

Digital Transformation and Testing

Digital Transformation - What is this?                 

As the world moves on from relying on paper to cloud storage, physical stores to online store, from physically connection to becoming wireless because of constant changes in technology and competition, businesses are eventually forced to undergo a digital transformation to stay relevant in a dynamic marketplace. Any organization is going to consume a lot of time and resources whilst undergoing a transformation, but the sacrifices made are absolutely crucial to secure customer retention in the long run.

We are living in the “Era of SMACT” and our lives are highly impacted by Social, Mobile, Analytics, Cloud and the Internet of Things. Every business is around these five basic technologies. Customers are changing their behavior in response and companies are keen to find out how they need to transform to survive this change. Many companies, irrespective of the industry, are facing the same challenges – how to stay on top of these new technologies and how to respond to the changing needs of the customers.

Organizations are radically altering their business processes and operating models. They do this to assure superior Customer Experience. They realize that to achieve this, large-scale transformation programs are necessary. At present, organizations are investing a lot of money in implementing such Digital Transformation programs.

Is it a good idea to invest in testing during Digital Transformation?

Currently we are living an Era of Digital world and Organization are investing significantly in transforming their business/processes in the Digital world. Now, the question arises: At the end of the day, do these Digital Transformation programs lead to the expected results? In fact, to realize the desired outcomes, it’s very important find a way to detect the issues that cause unexpected results, as early as possible, in the Life-Cycle and in the Transformation journey. Quality Assurance and Testing is the answer to predict and decide the actual outcome of a Digital Transformation.

Key Challenges in Digital Transformation and How testing provide a solution:

Every change brings associated inherited challenges which makes hard for successfully adopt the change and for be successful organization/one must find a way to overcome those challenges. Similarly, Digital Transformation also come with some key challenges. Following is the list of key challenges which organization faces while transforming their business along with facts that why should organization invest in a Quality Assurance:

Digital is Complex: 

The most difficult challenge comes from the complexities arising from the nexus of forces – Social-Mobile-Analytics-Cloud, to ensure that they work in synchronization with organizational goals. Adapting to new and latest technologies demands higher process maturity. In this scenario, Quality Assurance becomes an important function for organizations who are effectively embracing the digital transformation and they help here by come up with best processes, tools and techniques to test the complexity of the system.


Digital makes an organization vulnerable to Security Threats: 

Security is of paramount importance specifically in an interconnected world. The smart interconnected ecosystems on one side enable an unimaginable world of possibilities, but it makes the entire system highly vulnerable to security threats, if not properly configured and tested, on the flip side. Testing team proactively test the vulnerability, security gap in the system at very early stage hence helping teams to address these issues simultaneously.

Digital needs to leverage your Legacy Infrastructure: 

This is again next important challenge specifically with those enterprises who are not born Digital. They need to change their organizational DNA both from a cultural perspective and from legacy IT infrastructure standpoint. Testing ensures their core functionalities are not impacted as they chart their path towards Digital Infrastructure can be much challenging.


Digital can make or break your Customer Experience: 

Delivering enhanced customer experience while leveraging a variety of components of Digital Ecosystem becomes challenging. Ensuring each component delivers optimum performance leading to customer delight becomes difficult as an organization becomes more digitally matured.
Changes in customer behavior, elevated global competition, adoption of social media channels and emerging trends such as cloud and mobile are a few market driven challenges that organizations must deal with during their digital transformation journey. Quality Assurance/ Testing plays a crucial role in responding to these challenges. It’s essential for organizations that are dealing with digital transformation to have an appropriate digital assurance strategy, with the right tools, methodologies and measures to assure customer experience.


Digital demands Agility: 

In Digital Transformation world, applications are expected to be delivered quicker than ever. None has the time to wait for the long-term release cycles. It is regarded as the thrusting force for agile and DevOps based delivery processes. Being Agile through continuous quality assurance initiatives, and automating processes to ensure shorter delivery cycles become highly critical in a highly dynamic digital landscape.

Getting a true state of Development:

Inherited aspect of Testing is, its Test Report. Test Reporting provide a good way to help stake holder to provide the actual health of the system by providing a test reporting, which covers following aspects and help them to proactively make key decisions:

·     Quality of the product/component(s).
·     Provide a holistic view of performance
·     Assess - Vulnerability, reliability and availability.
·     Bottlenecks in the system.
·     Trends across different components in the system.

Conclusion:


Quality Assurance & Testing is crucial and plays a critical role in any digital transformation journey. It’s essential for organizations that are dealing with a digital transformation to have an appropriate digital assurance strategy by identifying the right tools, methodologies and measures to assure customer experience and make the organization future ready.

Emerging Technologies and Next Leap in Software Testing

In my tenure in Software Industry, I have witnessed tremendous transformation in the industry. To name a few… starting waterfall model to ...