Featured Post

The great debacle of healthcare.gov

This is the first time in history when the president of the United States of America, or probably for any head of state around the world,...

Thursday, May 29, 2014

Alternative strategies of Software Testing

Nobody denies the fact that every software should be tested and the best option to make sure that is to test all the features of it. That's no brainer, and for that one doesn't need to be expert in QA or software expert. But, often, the reality on the ground may not allow the QA team to go through that "best" route to make the software "bug free". So, what are the alternatives that we have to release a software with an optimal level of testing, when the reality doesn't let you to execute the complete test suite? I have broadly touched that in another post how much testing is enough for software with few tips on how to justify the QA test strategy to perform partial testing. Let's take a look into it from different perspective to derive some kind of strategy that would allow QA team to react at the time of necessity.

There could be number of scenarios that would demand to react differently. However, I would like to focus on three test strategies that I found helpful based on my experience and also probably cover much of the testing ground:

Risk Weighted Testing

This testing strategy actually goes back to the basic question on why in first place we need a QA team and what's the purpose of testing. To me, the QA process exists in Systems Development Life Cycle (SDLC) to reduce the risk of slipping bugs into the production environment i.e. to the end users. I know this would immediate stir up controversy but there's a reason I am saying that. You ask the question to any software professional (including QA professional) that if they can proclaim a software is "completely" bug free after the QA release. I can guarantee you that nobody would dare to claim. The reason is, QA process makes a software relatively bug free and make it usable to an extent that is paid for by the end users. Having said all of that, the best strategy, at the time of time and cost pressure, to effectively conduct the testing would be go with Risk Weighted Testing (RWT) approach. In this strategy, the risk associated with each functionalities would be calculated in number of dimensions and rank them to create an ordered list. That ranked list would be used in pragmatic fashion depending on the budget, time and resource constraints. If the time is the constraint and only few days are given to the QA team, then QA team should start from the top ranked functionality and go through the list sequentially. On the other hand, if QA team is asked to take as minimum functionalities as possible to test, they should draw a line where it would cover the most risk with least resource (can use Pareto Principle)

The primary challenge of this strategy is to create the risk weighted list of functionalities. There are several techniques and tools can be used and here I'm explaining a few of them:

Brainstorming: the most efficient and cost effective method is to have software developers, business analysts, testers, and end users in a conference room and brainstorm the list. People often misuse the term Brainstorming by just having a controlled discussion but if brainstorming is done properly, it can create dramatic result. 

Delphi method: if you have access to group of experts, you can use Delphi method where the experts can take each functionality of the software and risk weight them through a rigorous round of refinement. This is comparatively costly than Brainstorming

Analogy technique: using the past experience within the same company, the potential risks of functionality can be identified. This is the least expensive but often most effective if there are high number of reference projects available with expert personnel to make that analogy.

There also exist quantitative approaches like Monte-Carlo simulation, PERT distributions, etc. to use to create the risk ranked list if appropriate resources are available

Change Oriented Testing

In one of my project, we had introduced a bug into a perfectly working functionality while implementing an enhancement by modifying a common piece of code. Apparently an unrelated functionality, though it proved not to be so unrelated,  got broken due to that common code change which was done for right purpose i.e. to achieve code reusability and with right intention. Unfortunately, the bug introduced due to that enhancement was slipped through all the way to production. This provoked me to think on the existing testing strategy which proved to be insufficient to provide a good solid test coverage (and obviously everyone takes their best shot to squeeze QA cycle as much as they could do). To avoid that kind of situation, this Change Oriented Test (COT) strategy where Development team and QA team would work hand in hand to identify what piece of code or component are changed in the software with the potential impact areas (often labeled as: functionality).  The basic and foundation could be a simple Change-Functionality Impact Matrix that would capture changes as rows and functionalities as columns with X-marked intersection as impact. QA team can't develop this matrix alone by themselves but with the help of Development team a fairly accurate matrix can be created where it would be possible to identify the impact areas and then subsequently plan for the testing to cover the impacted functionalities.

To make it successful, the below steps should be continued to be in place in the SDLC:

- In every release Development team will create a mapping of code components to requirements and hand over to QA team ahead of testing cycle
- The release note would have one section explaining the changes along with the published impact matrix

The downside of this strategy is that if an automated tool (and embedded in IDE) isn't used (I didn't use any such tool and had done in spreadsheet which proved to be expensive)

Usage Driven Testing

The approach of testing a computer software or systems isn't something novel but what I found is that this isn't used explicitly in the Software Development Life Cycle (SDLC) by the Quality Assurance (QA) team. At least I haven't seen that in any Test Strategy document or Test Plan QA team is specified a concrete plan on studying and analyzing end users behavior and psychology to come up with test plan, test scenario, and test data.

The fundamental idea behind this strategy is to focus on the features or areas that the users would use most. The automatic next question would be - "how you would know before you release the software?". Yes, I don't have crystal ball to forecast that but it may not be impossible to get an idea of it, through -

- Surveying among the business users on their priority ranking of every features of the software. Then draw a line at, for the sake of the discussion, third quantile and test all the features thoroughly that fall within that bucket while leaving the rest to only smoke test kind of

- Another approach could be shadowing users day to day activity to come up with the list of mostly usage. The limitation of that is you can only do that if you're automating existing business process, enhancing existing software, rebuilding a software etc.

- The last, and least preferred with highest risk, option could be use expert judgement and pick your list. But this approach is better than to release software by random testing or half done testing with no strategy


The way, in some, TV shows mention the disclaimer at the beginning of an apparently risky techniques as "Do not try this at home", I would like to reiterate this at conclusion that all of the above testing strategies should be considered only in a situation where the full testing cycle can not be performed and the senior management understands and make the conscious call to go with those one of alternate routes to meet business need e.g. customer need, time to market, beat the competitors, etc.

Saturday, March 15, 2014

Fighiting Estimation Fatigue - Part 1: Software Project Management perspective


Software Estimation is often considered as a black art which is mostly neglected during the inception of an Information Technology Project, nonetheless almost always is used to formulate two most important attributes of a project i.e. the cost and the deadline, and often with a rigid expectation of high level of accuracy to hit the targeted project deadline. 

There is a viscous cycle in the whole estimation thing: when executives ask the Project Manager for estimation, it is often portrayed as, which should always be the true purpose of estimation, which is, to get a "ball park" figure to gauge the depth of the water or to be exact, should the executive be bother about the project and invest her time to materialize the project from its conceptual level. But, as soon as the estimation is handed over for that project, that number is considered as a commitment from the project manager. Later on, if that project deviates from that supposedly “ball park figure” estimation, the project manager is personally held liable for that deviation. 

 
So the project managers are either unwilling to provide an estimation at all or pad the estimation to cover themselves from the uncertainties and unknowns of projects. This is a classic “catch 22” situation for most of the project managers who are managing software development projects or planning to start a career as Project Manager of Information Technology.  Now, the million dollar question would be: how an IT PM should walk on that double edge sword, if you will, to provide true estimation of software project without falling into that “commitment” trap.

I am working on a series of blog posts where I would try to answer that question including overview of some of the well-known, in terms of market share and most commonly used, software cost estimation models such as Function Point Analysis, Use Case Point, and Heuristic method. I would create a framework and guideline to help the IT Project Managers to choose the right estimation model for their software projects. The posts would also have a list of best practices that would help to fight “estimation fatigue” and prepare Project Managers to duck the most common pitfalls where they’re forced to respond with a “ball park figure”, sometime at a water-cooler conversation, at a very early stage of projects. There is an important, but often ignored, characteristic of software estimation which is called “the cone of uncertainty”. I would also touch upon that characteristic in brief by showing how to effectively use that phenomenon to build confidence and earn the trust of the executive sponsors and senior management of your organization.  

Sunday, February 23, 2014

Brief notes on popular data processing solutions

We're so lucky now that we don't have to be confined within a few data management and processing solutions as more and more open source or closed source software and systems are proven to be so much dependable that you see the company like Facebook and Yahoo are using them to maintain their leading market share. I've put together a short notes on some of the popular systems.


Hadoop

Hadoop, a software library framework, is designed to process a large volume of data (also known as Big Data) in a distributed computing environment. Fundamentally, Hadoop decouples the data and its processing into two paradigms: the data is stored in a distributed file system (called as Hadoop Distributed File Systems or HDFS) and the processing happens in an infrastructure where clusters of commodity hardware form the distributed computing environment. Hadoop is designed to keep the scalability of processing in mind thus it can scales from a single machine to thousands machines. Each processing unit in the Hadoop cluster has its local storage and computing capacity which greatly increase the processing speed by keeping data next the processor. The risk of losing data due to failure of the processing node in a cluster is countered by the HDFS whereas the high availability of processing node in the cluster is controlled in the software itself rather than adding extra stack of hardware. The other core modules of Hadoop are the Hadoop YARN and Hadoop MapReduce. Hadoop YARN is the framework for job scheduling and cluster resource management whereas Hadoop MapReduce is a batch based distributed computing software framework that allows to parallelize work over a large volume of raw data which could take days or longer using conventional serial computing techniques, can be used reduced down to minutes on a Hadoop cluster. It simplifies the parallel computing by abstracting away the complexities involved in working with distributed systems, such as computational parallelization, work distribution, and dealing with unreliable hardware and software.

Cassandra

Apache Cassandra is a NoSQL distributed database management systems designed to handle large volume of data with no Single-Point-Of-Failure (SPOF). The heart of the Cassandra is the Data Model which is fundamentally different from a Relational Database Management Systems. In Cassandra, the data is structured in a column family which is analogous to RDMBS Table but unlike RDBMS, it doesn’t need to have same number and type of columns for all the rows. Each Column in a column family has three attributes: column name, column value and timestamp. A multi-dimension approach of designing a Cassandra data model is to use what it called as Super Column within a Column Family. The main advantage of Cassandra is that it can replicates data transparently in different nodes even in across data centers and all that are achieved without compromising the highest level of fault tolerance. As Cassandra doesn’t use Mast-Slave model to achieve the location transparency and distributed data architecture, it’s free from any bottleneck. To achieve that highest level distributed data availability, some of the features of data access like joining rows weren’t included. There’s also a tradeoff that needs to be made in the area of consistency and availability but that are all configurable (“Tunable Consistency”, as Cassandra coined the term).

Essbase

Essbase, originated from Extended Spreadsheet Database, is an object oriented and multidimensional database management systems, specially designed to provide the OLAP (Online Analytical Processing) capabilities to users to model, analyze, and interpret the most complex business scenarios. As an OLAP tool, Essbase provides the slicing and dicing of data from a very large volume of data that’s organized into a cross sectional groups of hierarchical dimensions. It is optimized to support OLAP capabilities as opposed to OLTP (Online Transactional Processing, like Oracle RDBMS.

SQLServer

Microsoft SQLServer is the second popular Relational Database Management System (RDBMS) after Oracle RDBMS. It provides all the features of a relational database like, table, view, table joining, query processing, transactional update etc. SQL Server supports both T-SQL (Transact SQL) and ANSI SQL as query language. One of the drawbacks of MS SQLServer is that it can only be deployed on Microsoft Windows Operating System environment. In addition to typical RDBMS features, it also provides replication service, notification service, reporting service etc. As a product from Microsoft, it strongly bonds with its programming environment (.NET) through SQL CLR (Common Language Runtime) and easily accessible through Microsoft Visual Studio development environment.

MySQL

MySQL is one of most popular RDBMS which is open source in nature and managed by Oracle. This has most of the features like other RDMBS like Oracle RDBMS and MS SQLServer, but it’s mostly used in a smaller scale environment (with few exceptions) and very popular among the open source community. Some of the characteristics of MySQL are:

-     It’s a Relational database and provides both transactional and non-transactional storage engines

-          It supports ANSI SQL query language and as well as procedural programming using Stored Procedure and Functions

-          It’s open source

-          It’s very fast, reliable and scalable

-          It can work in both client/server and embedded model

Oracle

Oracle is an Object Relational Database Management Systems which provides an added flavor of Object orientation in the Relational Database realm. This is the most popular and widely used RDMBS. Internally Oracle RDBMS is divided into Oracle Instance and Database. The Oracle instance consists of the memory on RAM and server processes which is identified by System Identifier (SID). The database part is consists of the data files in the Operating System. There are number of background processes works in parallel to provide very fast access to the data and modify the same. Oracle database comes with so many added features which makes it the number one RDBMS, some of them are:

-         provides Real Application Cluster (RAC) to enable maximum availability in terms of Oracle instance failure

-       use Automatic Storage Management (ASM) and Automatic Memory Management (AMM) to simplify its management of data and performance

-   Oracle has proprietary backup and recovery tool (RMAN) for simplified backup and restoration of data in case of instance failure and data corruption

-      It supports ANSI SQL (also dubbed as Oracle Query) and PL/SQL for procedural programming