360050_UT 12wk30 SAW IT 562127_Mojo_468x60_Browse100s
Showing posts with label Agile. Show all posts
Showing posts with label Agile. Show all posts

Monday, March 19, 2012

Test Automation Framework - Challenges

Test automation has matured over a period of time; from the crude form of automated tests that were set up just to run specific or stop gap runs, we today have much refined and well defined automation tests. According to a study, in the year 2004 the number of automated tests that were conducted globally as against manual tests were a mere 5 percent. However, by 2006 this increased to 20 percent. Going by this rate, we may be around 50 percent today. 

According to a study conducted by the US NIST, software producers lose 21.2 billion dollars annually because of inadequate testing. Based on market estimates, software companies worldwide invested 931 million dollars in automated software testing tools in 1999, with an estimate of at least 2.6 billion dollars in 2004. This certainly tells us one thing: Customers are seeing the real benefits of test automation. The last 5-6 years has seen a considerable run in commercial testing tools and we now are seeing the trend of customers requesting for open-source tools, thanks to changing economic situations.

One of the key factors in choosing a test automation tool is the technology that is used to build the application. Not all tools support all technologies and that throws up the challenge of maximizing test automation returns with limited capabilities of tools. For example, an application developed in .NET or Java may require test automation tools to support such technology. Some of the tools come with specific plugins to address such challenges. So, choosing the right tool goes a long way in getting the expected RoI.

Technology, a Show-Stopper?

One would certainly run out of business if technology becomes a show-stopper. While that could be a very generic statement specific to test automation, technology has been one of the biggest challenges. With every new patch or release of an OS, browser, languages, or for that matter even test automation tools, the challenges to maintain automation scripts are undeniably compounded. By the time you start a test automation project and complete it, you may find changes in the environment it is set to work. The script that you have developed, while the customer agreed for a specific version, will not be of any use to him if the customer is going to upgrade their systems to the new version of the browser, for instance. Here is when a robust framework and good coding practice facilitate a smooth transition.

Develop framework that is independent of test automation tools. Since every tool has some limitation, it is best to use a combination of tools to take the maximum returns out of test automation investment. A combination of commercial and open-source tools is a good mix. Having a framework that best supports such a mix will give the best advantage over other frameworks.

Never Ending CRs

CRs or change requests have become the norm of the day. Today, CRs not necessarily include change in functionality and features due to changing business requirements but also the impact the application goes through because of the technological changes. Let us consider a situation like this: an application that is stable has about 1,250 automated test scripts that are run every other day and being used by 100s of customers worldwide. Due to business reasons the company decides to change the technology or architecture of the application. Now this is going to have an impact on the automation scripts as well. Either the scripts will have to be discarded completely, which is money into the drain, or evaluate the possibility to modify the scripts to suit the new architecture or technology. In case the latter being a possibility, an evaluation of time and effort required for such modification and associated costs need to be considered. Since users are realizing the benefits of automation, this aspect should not be missed when someone is considering changes to the application. Thus, it is important to integrate test automation in the purview of CRs, i.e., whenever a CR is raised, it is important to evaluate its impact on the automation scripts. A robust test automation framework will make such impacts minimal.

Build Framework that Works

Test automation framework is a set of rules, procedures, and tools that drive automated testing. One of the main advantages of using a framework is the low cost of maintenance. For any changes to the application, only the concerned test case(s) need to be updated while the rest of the script remains the same.

Some of the most common frameworks are data driven, keyword driven, modular, and hybrid. There are again custom built frameworks that fit to specific needs of the application. Spending enough time on choosing the right framework and designing it is the key to test automation success. 

A good and robust framework should consider as many assumptions as possible. This will eventually make the framework quite flexible. While it will be difficult to prove due to lack of data but the general belief is that most of the test automation projects fail in the long run as the framework is not flexible enough to adapt to the changes that the application or the environment has undergone.

Let us take an example to explain the above situation. Consider a Web application that is developed in .NET technology compatible to WinXP, Vista, and Win7 and browsers such as IE and Firefox. A version 5.0 of a test automation tool is used to automate a set of sanity test cases. 

A test automation framework is developed to ensure that as the application undergoes changes, there are re-usable functions that are developed so that with less effort you can address those changes. Most of the frameworks today address this basic need. However, consider a situation where a new version of OS, browser, and the test automation tool need to be addressed in the framework itself. It is not an easy situation or assumption to imagine or incorporate within a framework.

The next generation frameworks should address the best of the following:

* Coverage
* Business Process
* Extended Environment
* Multi OS
* Multi Test Automation Tools
* Best of Reporting and Analysis
* Defect Analysis
* Metric
* Compliance such as HIPPA or SOX
* Recovery Scenario
* Addressing Technology Challenges

Conclusion

Building a test automation framework needs skills such as designing, analytical, and a lot of foresight. While testers bring in a lot of value and insight into developing the framework, it is the designers and developers who eventually build it. Considering the development of framework as a typical development project goes a long way in getting the required RoI. Build the best software engineering practices while developing a framework. Some of the critical aspects, as the fig 1.0 depicts, make the framework dependable and robust in the long run.

via Test Automation Framework - Challenges in the Ever Changing Technology Scenario - QA Expert Columns.

Automating in Agile Environment

One of the major barriers to test automation is the volatility of the application to be tested. Even benign changes such as moving a button to a different part of the screen or changing a label from Next to Continue can cause test scripts to fail. This problem is especially acute when testing an applications functionally at the GUI level because this tends to be the area in which changes are most frequent.

For this reason, test teams have historically tended to avoid functional test automation until an application has become stable. However, this approach does not work when building SaaS products or developing products in an Agile environment where change is a constant. In this situation, a more sophisticated test approach is required to avoid incurring technical debt (i.e., quality issues or tasks that are deferred to be addressed later or not at all)

Develop a Reusable Subroutine Library

The first level of sophistication in test automation is to develop a library of reusable subroutines that will encapsulate and hide an applications implementation details from the test scripts themselves. For example, you might implement a test subroutine called login_to_my_app() that accepts two parameters: UserName and Password. 

At runtime, this test subroutine will first find the appropriate text fields in the application GUI and then execute the keystrokes and mouse movements required to fill in the given user name and password, thus completing the login operation. If the applications login GUI changes (e.g., if the on-screen label for User Name is changed to Login Name), then the login_to_my_app() test function might also need to be updated. However, the scripts that called this subroutine would not need to change.

The reason this type of abstraction is a win for some projects is that, in this scenario, a change to the application now only requires you to maintain a single subroutine rather than potentially hundreds or thousands of test scripts. Since complex applications frequently have thousands of test scripts, the savings in effort and time is clear. The trade-off is that the level of skill required to maintain a subroutine library is generally higher and of a different type than that needed to maintain test scripts. Obviously this requirement will change your staffing profile and cost structure.

However, the benefit of this approach is that you can accommodate change much more readily. More importantly, it will allow you to safely write test cases before the application has been fully implemented. Test script writers only need to know (a) the softwares functionality and requirements and (b) the stubs of the test subroutines that will be implemented. You can significantly compress your implementation schedule by enabling your development and test automation processes to function in parallel.

Conclusion

Without a doubt, developing a library of reusable subroutines to test your system requires an up-front investment. 

However, in situations where you:
1. Need to build or customize a SaaS product
2. Wish to truly gain the benefits of an Agile, test-driven development methodology
3. Need to compress your test and development schedule as much as possible while still ensuring high quality; or
4. Must cope with constant change during pre or post-deployment, taking a more sophisticated approach to test automation can be a lifesaver for your project.

via Making Automated Functional Testing Work in SaaS and Agile Environments


570425_Up To 60% Off w/ Free Shipping 525x133
Twitter Delicious Facebook Digg Stumbleupon More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews