testing

14
SE 1 Software Reliability & Software Testing

Upload: salinisudesh

Post on 15-Nov-2014

328 views

Category:

Technology


2 download

DESCRIPTION

Testing

TRANSCRIPT

Page 1: Testing

SE 1

Software Reliability& Software Testing

Page 2: Testing

SE 2

What is 'Software Quality Assurance'?

Software QA involves the entire software development PROCESS - monitoring and improving the process, making sure that all agreed-upon standards and procedures are followed, and ensuring that problems are found and dealt with. It is oriented to 'prevention'.

What is 'Software Testing'?

Testing involves operation of a system or application under controlled conditions and evaluating the results. The controlled conditions should include both normal and abnormal conditions. Testing should intentionally attempt to make things go wrong to determine if things happen when they shouldn't or things don't happen when they should. It is oriented to 'detection'.

SOFTWARE TESTING

Page 3: Testing

SE 3

Testing is a process to execute a program with the intention of finding an error.

Testing demonstrates that software is working according to the specifications.

Testing improves the quality and reliability of a software.

Why Testing ??? (Importance of testing)

Page 4: Testing

SE 4

Black box testing It is not based on any knowledge of internal design or code. Tests are based on requirements and functionality.

White box testingIt is based on the knowledge of the internal logic of an application's code. Tests are based on coverage of code statements, branches, paths, conditions. Unit testing Smallest unit (module) is tested individually to test particular functions or code modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code.

Incremental integration testing It is used for continuous testing of an application as new functionality is added. It requires that various aspects of an application's functionality be independent enough to work separately before all parts of the program are completed; done by programmers or by testers.

Types of Testing Techniques

Page 5: Testing

SE 5

Integration testing Testing of combined parts of an application to determine if they function together correctly. The 'parts' can be code modules, individual applications, client and server applications on a network, etc. This type of testing is especially relevant to client/server and distributed systems.

Functional testing Black-box type testing geared to functional requirements of an application; this type of testing should be done by testers. This doesn't mean that the programmers shouldn't check that their code works before releasing it.

System testingBlack-box type testing that is based on overall requirements specifications; covers all combined parts of a system.

Acceptance testing Final testing based on specifications of the end-user or customer, or based on use by end-users/customers over some limited period of time.

Page 6: Testing

SE 6

What is a Test case ?

A test case is a document that describes an input, action or event and an expected result, to determine if a feature of an application is working correctly.

• Test cases are the set of inputs to execute the program.• A good test case is one that has high probability of finding an error.• A successful test is one that uncovers yet-undiscovered error.

Page 7: Testing

SE 7

• It is a testing technique that requires explicit knowledge of the internal workings of the item being tested. • Test cases are design to test all paths, loops, logical decisions and internal data structure.

• Major concern here is to ensure that each statement, path, loop with in the module is executable.

White Box Testing Technique - Example

Path Testing Control Structure Testing Loop Testing Internal Data Structure validation

Page 8: Testing

SE 8

Sample Test Cases…Input Set Expected Output Actual Output

Num_1=5, Num_2=10 Num_2 is Larger

Num_1=5, Num_2=5 Numbers are Equal

Num_1=10, Num_2=5 Number 1 is Larger

Num_1=a, Num_2=10 Error “Incorrect Format”

Num_1=5, Num_2=a Error “Incorrect Format”

Page 9: Testing

SE 9

Description

All the paths were forced to execute by given set of inputs.

Result: All the paths with in the module are fully functional. (Mention if there was any problem).

Page 10: Testing

SE 10

Black Box TestingSystem is treated as a black box, that is nothing is visible from outside.

It doesn't explicitly use knowledge of the internal structure or programming.

Test cases are designed to test all functional requirements.

What System must do is the major concern here.

Page 11: Testing

SE 11

Black Box Testing Contd….

Test cases are designed to examine – In correct or missing function– Error in interface– Error in data structure– Error in database access– Initialization and termination error.

Page 12: Testing

SE 12

Incorrect Function - Example Test Case

Input Set Expected Output Actual Output

User_Name=NULL

Password=NULL

Display appropriate error message

User_Name=Invalid

Password=Invalid

Display appropriate error message

User_Name=Valid

Password=Invalid

Display appropriate error message

User_Name=Valid

Password=NULL

Display appropriate error message

User_Name=Valid

Password=Valid

Display login screen.

New screen opens up

Description: Function User_Login(String, String)

Result: Mention if there was any problem.

int user_login(String,String)

Page 13: Testing

SE 13

Error in Database Access

Whether connection is created properly or not.

Whether records are inserted properly or not.

Whether records are deleted properly or not.

Whether query is handled properly or not.

Page 14: Testing

SE 14

Path TestingTo ensure that all the paths with in the module have been exercised. Using path testing logical complexity of a program can be derived.Using the programming code a flow graph could be created.Flow graph is used to determine the minimum number of paths that must be tested.