Showing posts with label Test Automation. Show all posts
Showing posts with label Test Automation. Show all posts

Thursday, December 28, 2006

Test Automation Tools!

As a Quality Architect, I have been tasked with evaluating test automation tools for QA/QE and development more often than I can remember. There is always a fight between homegrown and commercial tools, i.e. a build vs. buy decision. I have always been an advocate of homegrown solutions, until recently. I have architected several sophisticated frameworks myself. In this blog, I uncover some of the very basic requirements of a test automation framework, which should help you with your evaluation or defining the requirements for your homegrown venture.

The complete requirement of a test automation framework can be captured in one line:
A tool that facilitates automating test scenarios and allows anyone to run them from anywhere and at anytime.
This means that automating tests should be easy and intuitive. Tests, once automated, should be able to run on any supported platform or operating system. And most importantly, anyone (QA, Development, Sustaining Team, or even customers, if required) should be able to run these automated tests in an unattended mode.

Appropriate logging and debugging mechanisms should be available to capture false negatives. The tool should provide a framework to test the core technologies that our SUT is built upon - SOA Web Services, .NET, EJBs, RMI, Web UI, Rich Clients, Command Line, SQL, Scripting, APIs, Raw SOAP, Proprietary XML and document formats, etc.

No tool can generate positive results if it does not take people and processes into account. Apart from the core test automation needs, a framework must also integrate with other existing tools in the ALM domain. For example, a test automation tool must integrate with test management system, which should integrate seamlessly with requirements management, defect tracking and other top-level dashboards. There is no one tool that can serve all our requirements and that is why it is very important to have open integration APIs available for customization. Continuous Integration and Agile testing is the new buzz these days. A framework must mesh well with cruise control, ant, maven and build repositories.

SCENARIO:
A test engineer or a developer automates a test and checks it into a version control system. Cruise control kicks of the nightly build and executes all the pre-deployment test cases. A provisioning system deploys the latest bits and kicks of the post-deployment automated tests. Test results are automatically pushed over to a central server, where they get mapped to the requirements. An email notification is generated with up-to-date report.

Next morning, the manager checks the email, clicks on the link, logs into the reporting system and gets the latest release readiness matrix with detailed drill-down test coverage and code coverage reports.

The company decides to ship automated tests with its product to its customers. Even in absence of the build workspace and central reporting server, customers are able to execute the automated tests and get the local report!
Above scenario captures majority of the requirements of a test automation framework. Some may think it is too extreme and for others some pieces of this scenario may not be applicable at all. But if you really think about it, this is the kind of infrastructure that is required to build high quality software applications. It is required for continuous integration and agile development & testing.

RECAP:

A test automation framework should (choose the ones applicable to you):
  • be platform/OS independent
  • provide detailed logging and debugging mechanisms
  • support SUT technologies
    • SOA Web Services, .NET, Raw SOAP
    • J2EE, EJBs, RMI, POJO
    • Command Line, Scripting
    • Web UI
    • Rich Client - Swing UI
    • Databases, SQL
    • Raw XML
    • Proprietary document and transport
  • be able to execute test cases in headless and batch mode
  • zero coding requirement - but still available for advanced users
  • version control friendly - no binary files to check-in
  • provide APIs/mechanisms to integrate with other ALM tools
    • integrate with development IDEs
    • integrate with build workspace
    • integrate with Continuous Integration tools
    • integrate with Code coverage tools
    • integrate with test management tools
  • provide detailed reporting (text, xml, html, etc) with APIs to customize and integrate
  • provide data driven capability - a must
  • provide distributed application support
  • be able to execute remote commands
  • ease of use, good documentation, training and support available!
Is there such a framework available in the market? I have worked with over 40 different commercial and open source tools and have not found even a single one that delivers even 25% of these requirements. That is why most of the companies revert to home grown solutions. I was also one of the advocates of building a home grown solution, until recently!

BREAKTHROUGH:

Recently, I came across LISA from iTKO. To my surprise, the tool is very impressive - much better than any other in the industry. LISA seems to deliver over 80% of above requirements - as if the company read my mind and captured all the requirements!! There are minor quirks (like all others), but the tool is built on pure java and XML, runs everywhere, provide open APIs for expansion and integration into anything! Amazing data driven capability and provides mechanism to automate complicated end-to-end scenarios. It is a dream tool for developers and test engineers! It allows you to plugin your own java code and mash-up with other technologies. The developers don't have to maintain a separate workspace for test cases - the test cases can be kicked off from the same build.xml file. XML reports and custom report generator can be used to integrate test results into anything.

Friday, September 15, 2006

It all boils down to Metrics!!

Setting up a goal is one thing, but how do we know that we have achieved our goal? Software engineering is becoming more of an art than science. Success is a relative term! A project manager with exceptional artistic and articulative skills can sell a project, which is on road to failure, as a successful investment to the executives. In absence of real numbers, the darkness prevails. And under this darkness, all decisions lead to the path of failure.

Snapshot:
"We have a GA date approaching. PPM calls a Projet-Team meeting and takes a vote of confidence, which decides the fate of the software!!"

"A P1 bug is not a show-stopper if it already exists in production. The release will not degrade the production quality!!"

"QA gives a conditional GO with list of risks. By the time decision propogates to executives, the attachment is dropped and the Conditional-Go turns into a Sure-shot-Go!!"

"PM: The problem is not in our piece of the code. The issue is because of the other component that we are dependent on!!"

Sounds Familiar? Interesting, isn't it?

Let's face it, we need sophisticated tools that can generate real time metrics for anyone to make informative decisions. People often mix product quality with process quality. Even though a high quality process generates a high qualiy product (TQM principle), I believe the metrics for the two should be different. For example, higher percentage of test automation improves QA process quality and doesn't directly improve underlying product quality! Note: the automation of processes in the early ALM cycle would have a more direct impact on the product quality.

Here are the list of questions, that metrics should be able to answer:
  • Q1. What is the overall Quality Index (QI) of the product. QI for a particular feature or requirements? What is the QI of different components?
    • Consistency of the processes and measures is the key here.
    • It is easy to fabricate a QI model that concentrates on intrinsic product quality!
  • Q2. What's our Release Readiness? What's the risk if we release our product today?
  • Q3. What's the QI trend for differenet releases and different builds?
    • Trend is more important than actual QI snapshot.
    • Errors in the QI (if any) cancel out when you read trends
  • Q4. What's the Dependency Matrix (DM)? How does other SOA components impact my product? How does my product impact other offerings in the organization?
    • Current snapshot from QI perspective
    • Roadmap overlap for future releases. Cross-project Backlog Management.
  • Q5. What's the realtime Coverage graphs?
    • Test Coverage (test validating requirements)
    • Code Coverage (tests validating code)
  • Q6. Testing Strategy Automation.
    • When files A, B and C change, which features get impacted. What test cases and configurations should a test lead plan for next build?
  • Q7. Process Quality. How productive is my team?
    • Measures of test automation.
    • Comparisons with baseline (and manual testing)
With above metrics in hand, I can easily make statements like:
  • We are ready for the release!! Our product QI crossed 85% in the last build.
  • Because of TTM (time to market) pressures, we have decided to release our product with 65% QI. To mitigate the risk, we have also decided to increase our customer support resources.
  • Our product is not ready for GA because we have a dependency on products B, C and D, and product B has a QI of only 30%. Since B is tightly coupled with our core, we are not in a position to release our product.
  • I can effecively utilized my QA resources to concentrate on only the impacted features in a build. We don't have to regress every build every time. We can validate a build with handfull of fixes in less than two hours, and that too with over 95% confidence!!
  • We can now sell SLAs and QLAs around certan metrics because we have a consistent (and automated) way of capturing them.
  • I can trace a customer escalation all the way back to requirements, because we have end-to-end integration of ALM tools with excellent search facilities.