What is Software Testing and Why Testing is necessary ?Principles, STLC , SDLC-Model, Agile-Model, V-Shaped Model, CMMI-Levels.

INTRODUCTION OF SOFTWARE TESTING

What is Software Testing ?

In software testing is not sufficient to demonstrate that the software is doing what is supposed to do.

"Software testing can also be stated as the process of validation and verification that a software program/ application/ product."
  • Work as expected according to the business and technical requirements.
  • Works consistently and predictably.
  • Process of  filing defect i.e. variance between Expected results and Actual results.
  • Process of executing a software program application with intent of finding errors.

Why testing is necessary ?

Software Testing is necessary to make sure the product or application is defect free, as per customer specifications. It is necessary because software should be error free, efficient, secured. 

"Software Testing identifies faults whose removal increases the software quality and increases the software's reliability."
  • More complex the program, more the testing effort is required.
  • Testing effort is directly proportional to the complexity of the program.
"Software Testing is important as it may cause mission failure, impact on operational performance and unreliable if not done properly."

What are the skills required for testing ?

The Skills Required For Testing are :-

  • Strong desire for quality and attention to detail.
  • Ability to understand the point of view of the customer.
  • Tact and diplomacy for maintaining the cooperative relationship with developers.
  • Ability to communicate with both technical and non-technical people.
  • Judgment skills are needed to assess high risk areas of an application on which to focus testing efforts when time is limited.

What are the common problems in the software development process ? 

COMMON PROBLEMS IN THE SOFTWARE DEVELOPMENT PROCESS ARE :- 
  • Poor Requirements :- Unclear, incomplete, too general.
  • Unrealistic Schedule :- If too much work is crammed in too little time, problems are inevitable.
  • Inadequate Testing :- No one will know whether or complains or system crashes.
  • Features :- A request to pile on new features after development is underway ; extremely common.
  • Miscommunications :- If developers don't know expectations, problems are guaranteed.

When To Start or Stop Testing

Start Testing - When ?

Testing starts right form the requirements phase and continues till the release time.

"Requirements related defects caught later in the SDLC result in higher cast to fix the defect."

Reasons to stop testing :

There are lots of reasons why you may want to stop testing.
  • There are bugs everywhere.
  • You need a breather take a coffee break.
  • Times up release it.
  • One big mama of a bug.
  • It's home time.
  • It's miller time .
  • No one is paying you to test.
  • Everything you planned is complete.
  • You can't find any more bugs.
  • There's a new family member.

Stop testing - when ?

The following factors are considered :
  • Test cases executed with acceptable percentage of defects.
  • Project deadlines e.g. release deadline, testing deadlines.
  • Test budget has run out.
  • Coverage of code, functionality or requirements reaches to specific point.
  • Bug rate falls below acceptable level.

Who can participants in testing ?

The following are participants in testing process :-
  • Customer 
  • User
  • Developer
  • Tester
  • Auditor

What are the principles of testing ?

The principles of testing are :-

  • Testing is context dependent :- Testing is done differently in different contexts. For  e.g. Safety-critical software is tested differently from an e-commerce site.
  • Exhaustive testing is impossible :- Testing everything (all combinations of inputs and preconditions) is not feasible except for trivial cases. Instead of exhaustive testing we use risks and priorities to focus testing efforts.
  • Early testing :- Testing activities should start as early as possible in the software or system development life cycle and should be focused on defined objectives.
  • Defect clustering :- A small number of modules contain most of the defects discovered during pre-release testing or show the most operational failures.
  • Pesticide paradox :- If the same test are repeated over and over again, eventually the same set of test cases will no longer find any new bugs. To overcome this 'pesticide paradox', the test case needs to be regularly reviewed and revised to potentially find more defects.
  • Testing shows presence of defects :- Testing can show that defects are present, but cannot prove that there are no defects.
  • Absence of error fallacy :- Finding and fixing defects does not help if the system built is unusable and does not fulfill the users needs and expectation. 

 #Software Development life Cycle (SDLC)

  • Software Development Life Cycle(SDLC) is a process used by software industry to design, develop and test high quality software's.
  • The SDLC aims to produce a high quality software that meets or exceeds customer expectations, reaches completion within times and cost estimates.
  • The SDLC consists of a detailed plan describing how to develop, maintain. replace and alter or enhance specific software.
  • The life cycle defines a methodology for improving the quality of software and the overall development process.

PHASES IN SDLC

Stage 1 : Requirement Gathering and Analysis

  • Business requirements are gathered in this phase.
  • It is performed by the senior members of the team with inputs from the customer, the sales department, market surveys and domain experts in the industry.
  • Meetings with managers, stake holders and users are held in order to determine the requirements.
  • After gathering these requirements are analyzed for their validity and the possibility of incorporating the requirements in the system.
  • Based on the requirement analysis , Software Requirement Specification (SRS) document is created.
  • SRS consists of all product requirements to be designed and developed during the project life cycle.
  • The testing team starts the Test Planning phase after the requirements analysis is completed.

Stage 2 : Design

  • The outputs gathered in requirement phase are the inputs of the design phase.
  • Based on the requirements specified in SRS, usually more than one design approach for the product architecture is proposed and documented in a DDS - Design Document Specification.
  • The DDS is reviewed by all the important stakeholders.

Stage 3 : Implementation and Coding

  • In this stage of SDLC the actual development starts and the product is built.
  • The programming code is generated as per DDS during this stage.
  • Different high level programming languages such as C, C++, Pascal, Java, and PHP are used for coding.
  • The programming language is chosen with respect to the type of software being developed.

Stage 4 : Integration and Testing

  • After the code is developed individually it is integrated into one project/product.
  • It is then tested against the requirements to make sure that the product is actually solving the needs addressed and gathered during the requirements phase.
  • In this stage products defects are reported, tracked, fixed and retested, until the product reaches the quality standards defined in the SRS.

Stage 5 : Deployment

  • After it passes the testing phase, the product is delivered/deployed to the customer for their use.
  • As soon as it is delivered, the customers first perform beta testing on the product.
  • If any changes are required or if any bugs are caught, they report it to the engineering team.
  • Once those changes are made or the bugs are fixed then the final deployment happens. 

Stage 6 : Maintenance 

  • The software is maintained timely by updating the code according to the changes taking place in user end environment or technology.
  • Maintenance phase may face challenges from hidden bugs and real-world unidentified problems.

Following are the various SDLC Models :-

  • Waterfall Model 
  • Spiral Model
  • Incremental Model
  • Agile Model

 Waterfall Model 

  • The Waterfall Model was first Process Model to be introduced.
  • Waterfall model is the earliest SDLC approach that was used for software development.
  • In a waterfall model, each phase must be completed before the next phase can begin and there is no overlapping in the phases.
  • In waterfall model, phases do not overlap.

Phases in Waterfall Model

Requirement Analysis :-

  • Requirements are a set of functions and constraints that the end user expects from the system.
  • The requirements are gathered from the end user, and are analyzed for their validity and the possibility of incorporating them.

Design :-

  • The design helps in specifying hardware and system requirements, and also helps in defining the overall system architecture.
  • The system design specifications serve as an input for the next phase of the model.

Implementation :-

  • On receiving system design documents, the work is divided in modules/units and actual coding starts.
  • The system is first elaborated into small programs called units, which are integrated in the next phase.

Verification/Testing :-

  • Each unit is developed and tested for its functionality; this is referred to as unit testing.
  • Units testing mainly verifies if the modules/units meet their specifications.

Maintenance :-

  • This phase of the model is virtually never-ending.
  • The problem do not come into picture directly, but they arise from time and need to be solved.

Advantages of Waterfall Model :-

  • This model is simple and easy to understand and use.
  • It is easy to manage due to the rigidity of the model - each phase has specific deliverables and a review process.
  • In this model phases are processed and completed one at a time. Phase do not overlap.
  • Waterfall model works well for smaller projects where requirements are very well understood.

Disadvantage of Waterfall Model :-

  • Once an application is in the testing stage, it is very difficult to go back and change something that was not well-though out in the concept stage.
  • No working software is produced until late during the life cycle.
  • High amounts of risk and uncertainly.
  • Not a good model for complex and object-oriented projects. 
  • Poor model for long and ongoing projects. 
  • Not suitable for the projects where requirements are at a moderate to high risk of changing. 

 Incremental Model

  • In incremental model the whole requirement is divided into various builds.
  • Cycles are divided up into smaller, more easily managed modules.
  • Each module passes through the requirements, design, implementation and testing phases.
  • Each subsequent release of the module adds function to the previous release.
  • The process continues till the complete system is achieved.

Advantages of Incremental Model

  • Generates working software quickly and early during the software life cycle.
  • This model is more flexible - less costly to change scope and requirements.
  • It is easier to test and debug during a smaller iteration.
  • In this model customer can respond to each built.
  • Lowers initial delivery cost.
  • Easier to manage risk because risky pieces are identified and handled during it'd iteration.

Disadvantages of Incremental Model

  • Needs good planning and design.
  • Needs a clear and complete definition of the whole system before it can be broken down and built incrementally.
  • Total cost is higher than waterfall.

 Spiral SDLC Model

  • In a Spiral model the software is developed in a series of incremental releases.
  • There is a Focus on Risk analysis combines the features of the prototyping model and the waterfall model.
  • In order to overcome the constraints of "The Waterfall Model", Spiral Model was developed.
  • The fact that the process needs to be iterated more than once demands more time and is somehow expensive task.
  • This Model is used in large, expensive and complicated projects.

   Spiral Model Phases

  • Planning Phase : Requirement are gathered during the planning phase.
  • Risk Analysis : Identifies risk and alternate solutions. A prototype is produced at the end of the risk analysis then alternate solutions are suggested and implemented.
  • Engineering Phase : In this phase software is developed, along with testing at the end of the phase.
  • Evaluation Phase : This phase allows the customer to evaluate the output of the project till date before the project continues to the next spiral.

Spiral Model Strengths

  • High amount of risk analysis.
  • Good for large and mission critical projects.
  • Software is produced early in the SDLC.

Spiral Model Weaknesses

  • Don't work well for smaller projects.
  • Can be costly model to use.
  • Risk analysis requires highly specific expertise.
  • Project success is highly depended on the risk analysis phase.

When to use Spiral Model

  • When creation of a prototype is appropriate.
  • When costs and risk evaluation is important. 
  • For medium to high-risk projects.
  • Users are unsure of their needs.
  • Requirement are complex.
  • Significant changes are expected.

AGILE DEVELOPMENT MODEL

  • Agile development model is also a type of Incremental model.
  • Software is developed in incremental, rapid cycles.
  • This results in small incremental releases with each release building on previous functionality.
  • Each release is thoroughly tested to ensure software quality is maintained.
  • It is used for time critical applications.

Advantages of Agile Model

  • People and interactions are emphasized rather than process and tools.
  • Customers, developers and testers constantly interact with each other.
  • Working software is delivered frequently (weeks rather than months).
  • Continuous attention to technical excellence and good design.
  • Regular adaptation to changing circumstances. Even late changes in requirements are welcomed.

Disadvantages of Agile Model

  • In case of some software deliverables, especially the large ones, it is difficult to assess the effort required at the beginning of the software development life cycle.
  • There is lack of emphasis on necessary designing and documentation.
  • The project can easily get taken off track if the customer representative is not clear what final outcome that they want.
  • Only senior programmers are capable of taking the kind of decisions required the development process.

SCRUM AND SPRINT

  • Scrum, the most popular agile framework in software development, is an iterative approach that has at its core the sprint--the scrum term for iteration.
  • Scrum teams use inspection throughout an agile project to ensure that the team meets the goals of each part of the process.
  • Each sprint is divided into its own list of requirements.
  • Within each sprint, the development team builds and tests a functional part of the product until the product owner accepts it and the functionality becomes a potentially shippable product.
  • Scrum teams deliver product features in increments at the end of each sprint.
  • A product release occurs at the end of a sprint or after several sprints.

 V-SHAPED MODEL 

  • V-Shaped Model evolved from waterfall Model.
  • Each phase must be complete before the next phase begins.
  • Instead of moving down in a linear way, the process steps are bent upwards after the coding phase, to form the typical V shape.
  • Testing is emphasized in this model more than in the waterfall model.
  • It is a structured approach to testing.
  • Brings high quality into the development of our products.

V-SHAPED MODEL STRENGTHS

  • Works well for small projects where requirements are easily understood.
  • Each phase has specific deliverables.
  • Simple and Easy to use.

V-SHAPED MODEL WEAKNESSES

  • Very rigid like the waterfall model.
  • Software is developed during the developing phase, so no early prototypes of the software are produced.
  • Does not easily handle dynamic changes in requirements.
  • Does not contain risk analysis activities.

BENEFITS OF V-MODEL

  • Faults are prevented and it stops fault multiplication.
  • Avoids the downward flow of defect.
  • Lower defect Resolution cost due to earlier detection.
  • Improved quality and reliability.
  • Reduction in the amount of Re-work.
  • Validation at each level of stage containment.
  • Allows testers to be active in the project early in the project's lifecycle. They develop critical knowledge about the system.

#What is Capability Maturity Model Integration? Levels of CMMI.

  • The Capability Maturity Model (CMMI) is a methodology used to develop and refine an organization's software development process.
  • The CMMI is similar to ISO 9001, one of the ISO 9000 series of standards specified by the International Organization for Standardization (ISO0.
  • To Develop a Software using the SDLC process CMMI standards have to be followed.
  • CMMI defines 5 levels of process maturity based on certain Key Process Areas (KPA).

CMMI Levels

Level 1- Initial

  • Initial (chaotic, ad hoc, individual heroics)- the starting point for use of a new process.
  • Quality is difficult to predict.
  • Lowest Quality and Highest Risk.

Level 2- Repeatable

  • Basic project management processes are established to track cost, schedule and functionality.
  • Repeat earlier successes on projects with similar applications.
  • Low Quality and High Risk.

Level 3- Defined

  • The software process for both management and engineering activities is documented, standardized and integrated.
  • All projects use a documented and approved version of the organization's process. 
  • Medium Quality and Medium Risk.

Level 4- Managed

  • Detailed measures of the software process and product quality are collected, understood and controlled.
  • Management can identify ways to adjust and adapt the process to particular projects without measurable losses of quality.
  • Higher Quality and Lower Risk.

Level 5- Optimizing

  • Focus is on continually improving process performance through both incremental and innovative technological changes.
  • Defects are minimized and products are delivered on time and within the budget boundaries.
  • Highest Quality and Lowest Risk.

#What is STLC-Software testing life cycle ? Explain phases of STLC.

 Software testing life cycle or STLC refers to a comprehensive group of testing related actions specifying details of every action along with the specification of the best time to perform such actions.

Different organizations have different phases in STLC however generic Software Test Life Cycle(STLC) for waterfall development model consists of the following phases.
  • Requirements Analysis
  • Test Planning 
  • Test Analysis
  • Test Design
  • Test Construction and Verification
  • Test Execution and Bug Reporting
  • Final Testing and Implementation
  • Post Implementation

Requirements Analysis :-

  • In this phase testers analyze the customer requirements.
  • It is very important to start testing activities from the requirements phase itself because the cost of fixing defect is very less if it is found in requirements phase rather than in future phases.
Test Planning :-

In this phase all the planning about testing is done like

  • What needs to be tested.
  • How the testing will be done.
  • Test strategy to be followed.
  • What will be the test environment.
  • What test methodologies will be followed.
  • Hardware and software availability, resources, risks etc.
Test Analysis :-

  • After test planning phase is over test analysis phase starts, in this phase we need to dig deeper into project and figure out what testing needs to be carried out in each SDLC phase.
  • Automation activities are also decided in this phase, if automation needs to be done for software product, how will the automation be done, how much time will it take to automate and which features need to be automated.

Test Design :-

  • In this phase various black-box and white-box test design techniques are used to design the test cases for testing, testers start writing test cases by following those design techniques.
  • If automation testing needs to be done then automation scripts also needs to written in this phase.

Test Construction and Verification :-

  • In this phase testers prepare more test cases by keeping in mind the positive and negative scenarios, end user scenarios etc.
  • The test plan document should also be finalized and verified by reviewers.

Test Execution and Bug Reporting :-

  • The test cases are executed and defects are reported in bug tracking tool.
  • Testing is an iterative process i.e. if defect is found and fixed, testing needs to be done after every defect fix.

Final Testing and Implementation :-

  • In this phase the final testing is done for the software, non functional testing like stress, load and performance testing are performed in this phase.
  • Final test execution reports and documents are prepared in this phase.
Post Implementation :-

  • The process review meeting's are done and lessons learnt are documented.
  • The test plan document should also be finalized and verified by reviewers.
  • A document is prepared to cope up similar problems in future releases. 

Comments

Popular posts from this blog

What is Digital Marketing and How to learn Digital Marketing ? Modules, Blog, Domain, Hosting, SEO.

What are the different levels of Testing in Software Testing? Unit Testing, Integration Testing, System Testing, User Acceptance Testing.

What is Black Box ,White Box and Gray Box Testing in Software Testing ? Advantages, Disadvantages, Error Guessing.