Software testing

46
SOFTWARE TESTING Topics

description

Software development life cycle models and unit testing and integration testing techniques.

Transcript of Software testing

Page 1: Software testing

SOFTWARE TESTINGTopics

Page 2: Software testing

Diff Between Software Project and Product

If a Software was developed depends on specific customer requirement then that software was called as Software project.

If a software was developed by company depends on overall requirements in the market called as Software product.

Page 3: Software testing

Software Development Life Cycle(SDLC)

Software Development Life Cycle is a process to develop a new software.

OLD SDLC Models 1. Waterfall Model2. Prototype Model3.Increamental model4. Spiral Model5.RAD(Rapid Application Development) Model

Page 4: Software testing

Waterfall Model

When customer requirements are clear, organization can fallow waterfall model. This is also called as Liner sequential model. Because one step start with after completion previous step.

Waterfall model is the earliest SDLC approach that was used for software development.

Waterfall model start with software Bidding means that a proposal to develop a new software.

Page 5: Software testing

Process Flow

Page 6: Software testing

Here software Bidding means that a new proposal to develop a new software.

In Kick of Meeting CEO can conduct to select Project/product Manager for current Project/product based on PM past Experience.

Overall Plan can prepare PM for current Project/product.

Business Analyst can gather requirements and prepare BRS(Business Requirement Specification) document.

System Analyst can analyze BRS and prepare SRS(Software requirement Specification) for current project/product.

Technical Architect can prepare HLD(high level design) and LLD’s(low level designs) from current project/product.

Based on LLD’s developer can write code and same developer can debug the code called as debugging or Testing.

Page 7: Software testing

Advantages and Disadvantages

1.Waterfall model is a easy model to Implement any size of project.

2.Waterfall model is sequential model due to this reason testing should run on every module.

3. This model causes low business cost because this model helps to find problems earlier, after finds problems is fixing complex and costly.

4. In this model documented every stage allowing people to understand easily.

Page 8: Software testing

Disadvantages

1. In waterfall model any requirement will change in the middle of the process this model can not be work.

2. In this model only one stage of testing is there that to conducted by developers.

3. This model is taking more time because of it is a sequential model, one step will be staring after completion previous step, so we want to wait up to completion of previous step.

Page 9: Software testing

Prototype Model

When customer requirements are not clear then many organizations are following this prototype model.

In prototype model when customer requirements are not clear that time Business Analyst(BA) can prepare prototype screens based on previous projects knowledge and showing customer site people to get clear requirements.

The process flow of Prototype model also same as Waterfall model but in requirement gathering stage added one extra step as shown below process.

Page 10: Software testing

Process FlowDeveloping prototype

screens

Showing to customer site

people

To get clear requiremen

ts

Page 11: Software testing

Prototype model method is employed when very difficult to get exact requirements from the customer that time we are using this model.

In the above diagram requirement stage Business Analyst(BA) can prepare Prototype screens and showing to customer site people to get clear requirements.

Page 12: Software testing

Advantages

1. When prototype is shown to customer, he gets a proper clarity on requirements and he can suggest the modifications if needed.

2. Customers usually not good at specifying their requirements , or can tell not properly what they expect from software that time this is useful.

Page 13: Software testing

disadvantages

1. Prototype model also having one stage of testing and that to conducted by developers.

2. Too many changes can disturb the software development process.

3. To much investment of client, is not always preferred by the developer.

Page 14: Software testing

Incremental model

In incremental model multiple development stages takes place here. Cycles are divided into smaller and more easily managed iterations.

When customer requirements are huge organizations are follows incremental model to develop a new software.

Here software development will be done installment by installment.

Page 15: Software testing

Process Flow

SRGAnalysi

sDesign Coding Testing

Release

SRGAnalysi

sDesign Coding Testing

Release

SRGAnalysi

sDesign Coding Testing

Release

SRGAnalysi

sDesign Coding Testing

Release

Incr

em

en

tal

Time

SRG---Some requirements gathering

Page 16: Software testing

Here huge requirements are dividing into small requirements and developing the software installment by installment.

When customer having huge requirement and needs quick delivery that time organizations are using incremental model.

Advantages This model allowing customer to change

requirements and scope modification. Generating working software quickly. Easy to manage iterations.

Page 17: Software testing

Spiral Model

This model was developed by Berry Boehm. When customer requirements are enhancing

regularly the organizations are following Spiral model.

Here customer requirements changing regularly at the time development process.

This model is also incremental development process, here customer given the requirements based on satisfaction of the previous stage development process.

Page 18: Software testing

Requirementgathering

Analysis Design

Coding

Testing

ReleaseMaintenance

Needs Enhancement

Requirementgathering

AnalysisDesign

Coding

Testing

ReleaseMaintenance

Needs Enhancement

Requirementgathering

Analysis

Design

Coding

Testing

ReleaseMaintenance

Process Flow

Page 19: Software testing

• Spiral model is a combination of iteration development model process and linear sequential model.

• In Spiral model the total software is spitted into sprints.

• Spiral model develops the software module by module or sprint by sprint.

Advantages• It is allowing customer to change their

requirements at any stage of development.• Customer site people with get the software as

early as possible if they need because software will develop module by module.

Page 20: Software testing

Disadvantages

It complex to use for small and low risk projects.

Large number of stages will require to complete the software, documentation will be complex.

Page 21: Software testing

RAD(Rapid Application Development) Model

When customer requirements are similar to previous or old projects then organizations are following this RAD model.

This model needs minimal planning to develop this type of software's.

To develop new software by coping the code from old projects or products.

Page 22: Software testing

Draw backs above 5 models

The above 5 SDLC models are having a single stage of testing and that to conducted by developers. Due to this reason organizations are going to use Advanced SDLC models to release a quality software to customer.

Page 23: Software testing

FISH Model

This model define mapping in between multiple stages of development and multiple stages of Testing.

Fish model is using where manufacturing will take more loss organizations are using Fish model.

Ex: Racket launching.

Page 24: Software testing

PIN

Process Flow

BRS

Review

SRS

Software

IntegrationCodingDesign

Review

Unit Testing

Integration Testing

Review

Acceptance

AcceptAnce testing

Release

ReleaseTesting

Page 25: Software testing

In Fish model every stage of testing is there.

In fish model Software testing stage will be continued with respect to software development stage.

Here BRS, SRS, Design documents verification will be done by authors means that who prepared that documents that people can responsible to review the documents.

Here Business Analyst can gathering the requirements and can prepare the BRS.

Here System Analyst can study the BRS and can prepare the SRS.

Technical Architect can prepare the HLD and LLds documents.

Page 26: Software testing

Here developers can write code with respect to LLD’s and done unit testing and integration testing.

After software coding A separate testing team will test the software.

Customer site people will responsible for acceptance testing.

Note: Fish model is time consuming model and costly

model .

Page 27: Software testing

V-Model

This model defines mapping in between software testing stages and software development stages.

V-model stands verification and validation. Verification will done with respect to customer

requirements and validation will done with respect to customer expectation.

Page 28: Software testing

BRS

SRS

Coding

Verification Validation

Review

Review

Review

Page 29: Software testing

Here coding will done with respect to low level design and conducting Unit testing.

Integrating the unit tested programs and conducted integration testing with respect to HLD.

Here software testing will done with respect to SRS prepared by System Analyst.

Acceptance testing will done with respect to BRS prepared by Business Analyst.

In acceptance testing customer site people can involve and give feedback on software with respect to BRS called as acceptance testing.

Page 30: Software testing

The testing activity is perform in the each phase of Software Testing Life Cycle phase.

V-model shows software development stage in left side and software testing stage in right side.

From above V-Model separate testing team is available for software testing stage only, Because software testing is bottle neck stage of development.

Page 31: Software testing

Agile Model

Agile model stands for developers develop the deliverables and tester can test those deliverables at the same time stakeholders can accept those deliverables.

In Agile model after accepting the deliverable only start the next stage of testing.

In Agile model the software is developing module by module. Means that once completion of one module , that module can be delivered to customer for acceptance, if they accept that then start the next module.

Page 32: Software testing

Process Flow

Iteration -1 Iteration 0

Constructive Iteration

Production

Retirement

Page 33: Software testing

Agile MethodologiesAgile Extreme: When customer requirements are not

clear,Small and medium scale organizations are try to follow this Prototype V-model and large scale companies are following Prototype-Agile model, this is also called as Agile Extreme model.

Agile Sprint: when customer requirements are huge small

and medium scale companies are try to follow Incremental V-model and large scale companies are following Incremental- Agile model this is also called as Agile Sprint model.

Page 34: Software testing

Agile Scrum:

When customer requirements are Enhancing regularly small and medium scale companies are following Spiral-V-model and large scale companies are following Spiral – Agile model also called as Agile Scrum model.

In Agile scrum model the software is divided into sprints and developing the software sprint by sprint is called as Agile Scrum.

Page 35: Software testing

Documents

Requirements Gathering: Business Analyst can gather the

requirements and can prepare the BRS and same person can review the BRS(Business Requirement Specification) for completeness and correctness.

Analysis: System Analyst can prepare SRS(Software

Requirement Specification) based on BRS and same SA can review the SRS for completeness and correctness.

Here BRS can says that what type of software to develop and BRS can says that, that software how to develop.

Page 36: Software testing

EX:

AdditionOf Two numbers

Functional Requirements

2 Inputs1 Operators1 Output

Non Functional Requirements

Easy to useSpeed in processingRun on Multi environment

BRS

SRS

Page 37: Software testing

Design: Technical Architect(TA) can prepare HLD(high

level design) and LLD’s(low level designs) based on SRS and the sameTA can review the document for completeness and correctness.

EX: HLDLogin

Login

LoginLogin

Page 38: Software testing

Low level designing is defining internal architecture of a individual module. So one software having one LLD and multiple LLD’s.

EX: LLD

DatabaseError Message

Next screen

login

User

PasswordUser id

Invalid User

Valid User

Page 39: Software testing

Review on BRS, SRS, HLD, LLD’s is called as documents testing or Documents verification or Static Testing.

During documents testing , corresponding people can use three techniques, such as

1. Walkthrough

2. Inspection 3. Peer Review

1.Walkthrough: Walkthrough means that study a document from first to last.

2.Inspection: Inspection means that searching a document for specific factor.

Page 40: Software testing

3.Peer review: Peer review means that comparison of two similar documents from first to last.

These three documents testing techniques also called as Review techniques or Verification techniques or Static testing techniques.

Page 41: Software testing

Unit Testing

When completion of design documents preparation based on LLD programmer can start coding to implement a software is called as unit programming. While coding programmer can test every unit program is called as unit testing.

During this unit testing programmer can use white Box Testing technique. This is also called as Glass box technique or Open box technique or Clear box technique.

Page 42: Software testing

While unit testing programmer can use white box technique, in this four phases are there.

1. Basic paths coverage: Programmer can use this technique to conform the program is working or not. while applying this technique on program, programmer can follow below approach:

step1: programmer can write a program with respect to LLD

Step2: Draw a flow graph to emulate program logic.

Step3: Find no of paths in a graphs, this is also called as cyclomatic complexity.

Step4: Execute a program more than one to cover all regions of program.

Page 43: Software testing

Ex:

Cyclomatic complexity means no of individual if and else conditions in a program.

----------------------------------------------------------------------If condition then if condition thenStatement 1ElseStatement 2End if---------------------------------------------------------------------------------------------------------

2Cyclomatic complexity

Run program 2 time to cover all regions of program

Page 44: Software testing

2. Control Structure coverage: After completion of a program execution more than one time, corresponding programmer can use this technique to conform that program was correctly working or not in terms of inputs and outputs.

3. Program technique coverage: When program was correctly working , corresponding developer can calculate execution speed of a program.

4. Mutation coverage: programmer can use this technique after completion of previous three techniques to conform that program was correctly tested or not. In that perform some modification in program and retesting the program if retest was failed program was correctly tested, if resting was passed program was not correctly tested.

Page 45: Software testing

Integration Testing Programmer write the code with respect to LLD

is called as unit programming. and test that unit program and integrate that unit tested programs is called as integration.

After integration programmer can test the integrated programs is called as integration testing.

Programmer can use 4 techniques to test the integrated programs:

1. Top down approach 2. Bottom up approach 3.Hybrid approach 4. System approach

Page 46: Software testing

1.Top down approach: In top down approach progra-mmer can interconnect programs, by connecting main program with some of sub programs because of remaining sun programs are in under construction. In the place of under constructive sub programs, programmers can use temporary programs called as stub.

Ex: Main

Sub progra

m

Sub progra

m

Stub