Vous êtes sur la page 1sur 32

Ch 5 Software Testing Techniques

   

Introduction to testing Test plan Introduction to manual testing Automation testing tools

Introduction to testing


What is testing? Testing is the process of demonstrating that errors are not present. The purpose of testing is to show that a program perform its intended functions correctly Process of establishing confidence that a program does what it is suppose to do. Objective is to find out all possible bugs in a work product. Testing should intentionally attempt to make things go wrong to determine if things happen when they shouldnt or things dont happen when they should. It is a process of trying to discover every conceivable fault in a work product

Introduction to testing
It is a process of executing program with the intent of finding an error A good test is one that has high probability of finding as yet undiscovered error. A successful test is one that uncovers as an yet undiscovered errors Mature view of software testing is to see it as a process of reducing the risk of software failure in the field to an acceptable level. Two strategies of testing Black box testing White box testing

Black box testing


   

We cant look inside the box to see how it operate. If we type certain input, we get certain output. Black Box Testing is testing without knowledge of the internal workings of the item being tested. For example, when black box testing is applied to software engineering, the tester would only know the "legal" inputs and what the expected outputs should be, but not how the program actually arrives at those outputs.

Black box testing




Advantages of Black Box Testing


more effective on larger units of code than glass box testing tester needs no knowledge of implementation, including specific programming languages tester and programmer are independent of each other tests are done from a user's point of view will help to expose any ambiguities or inconsistencies in the specifications test cases can be designed as soon as the specifications are complete

Black box testing




Static Black Box


Testing the specification The specification is the document not the executing program Testing software without having an insight into details of underlying code is dynamic Its a dynamic because the program is running Its a black box bcoz you are testing it without knowing exactly how it works Just entering inputs, receiving outputs & checking the results.

Dynamic Black box testing


White box testing




 

White-box test design allows one to peek inside the "box", and it focuses specifically on using internal knowledge of the software to guide the selection of test data In this tester has access to the programs code & examine it. White box testing is a test case design method that uses the control structure of the procedural design to derive test cases. Test cases can be derived that.

guarantee that all independent paths within a module have been exercised at least once, exercise all logical decisions on their true and false sides, execute all loops at their boundaries and within their operational bounds, and exercise internal data structures to ensure their validity.

White box testing


White Box methods  Statement coverage  Decision coverage  Condition coverage Static white Box: the process of carefully and methodically reviewing the software design, architecture, or code without executing it. Dynamic white box Executing the system to see the system is performing as per the requirement.

Different testing types




Different types of testing


Unit testing Integration Testing (Incremental Approach Top-down & Bottom-up) Functional testing System testing
   

Performance testing Load, Stress testing Security testing Recoverability testing Alpha & beta testing

User Acceptance testing




Unit testing

testing of individual component in the program. The purpose is to discover the discrepancies between the modules interface specification & its actual behavior Typically used to verify the control flow & data flow Generally performed by developers

Integration testing
   

It is a process of testing multiple component together (multiple text boxes, forms etc.) To assure that the S/W units/components operate properly when they combined together Performed against group of modules It is doing by tester

Integration testing


Two approaches of Incremental testing: Bottom-up  In this tester have to write own modules called test drivers, that test the modules. Drivers sends test case data to the modules under test & read back the result

Integration testing

Top-Down  Rather than test the particular module which depends on some other value, it could better to write a small piece of code called stub that just like act as a interface module which takes values from file directly to display the module
A

System testing


As the units are tested and the low-level bugs are found and fixed, they are integrated and integration testing is performed against group of modules, this process of incremental testing continues putting together more and more pieces of software until the entire product or at least a major portion of it is not tested at once in a process is called system testing.

System testing


Different types of system testing Load testing  Execution of a system in ideal condition  Subjecting a system to represent statically representative load  E.g. no. of users apply for system is supposed to 50. Stress testing  Running the software under less than ideal condition.  E.g. Low memory, low disk space, increase no. of users.

System testing

Performance testing  To check the performance of a software it we apply load and while stress the system. Security testing  It attempts to verify that protection mechanism built into a system will protect system from improper penetration. Recovery testing  To determine whether the system or program meet its requirements for recovery after failure.

Acceptance testing
 

  

It is the process of combining the end product to the current needs of its user It is usually performed by customer or end user after testing group satisfactorily completed usability, integration, system testing. Alpha testing

At developer site by customer At one or more customer sites by end user. Testing before final release

Beta testing

Final Candidate testing

Other testing types




Functional Testing It is a process of attempting to detect discrepancies between programs functional specification & its actual behavior It include positive & negative scenarios Regression Testing It is a re-execution of some or all of the test develop for each build of the application verify that changes or fixes have not introduce new problems. It may perform for each activity

Test plan


Test An activity in which system or component is executed under specified conditions, the result are observed or recorded & an evaluation is made on some aspect of the software. A set of one or more test cases Test Case Test case is a document that describe an input, action or event & an expected response to determine if feature of an application is working correctly. A set of test inputs, execution conditions & expected result.

Test plan

Test case component  Test case id  Test case name  Purpose or objective  Steps  Expected result  Actual result  Pass or fail  Prerequisite  Set up / Initial condition  Input data

Test plan


Test Plan It is the process of defining a testing project such that it can be properly measured& controlled The test strategy identifies multiple test levels, which are going to be performed for the project. Activities at each level must be planned well in advance and it has to be formally documented. Based on the individual plans only, the individual test levels are carried out.

Test plan
1. BACKGROUND This item summarizes the functions of the application system and the tests to be performed. 2. INTRODUCTION 3. ASSUMPTIONS Indicates any anticipated assumptions which will be made while testing the application. 4. TEST ITEMS - List each of the items (programs) to be tested. 5. FEATURES TO BE TESTED - List each of the features (functions or requirements) which will be tested or demonstrated by the test. 6. FEATURES NOT TO BE TESTED - Explicitly lists each feature, function, or requirement which won't be tested and why not.

Test plan
7. APPROACH - Describe the data flows and test philosophy. Simulation or Live execution, Etc. This section also mentions all the approaches which will be followed at the various stages of the test execution. 8. ITEM PASS/FAIL CRITERIA Blanket statement - Itemized list of expected output and tolerances 9. SUSPENSION/RESUMPTION CRITERIA - Must the test run from start to completion? Under what circumstances it may be resumed in the middle? Establish check-points in long tests. 10. TEST DELIVERABLES - What, besides software, will be delivered? Test report Test software

Test plan
11. TESTING TASKS Functional tasks (e.g., equipment set up) Administrative tasks 12. ENVIRONMENTAL NEEDS Security clearance Office space & equipment Hardware/software requirements

Test plan
13. RESPONSIBILITIES Who does the tasks in Section 10? What does the user do? 14. STAFFING & TRAINING 15. SCHEDULE 16. RESOURCES 17. RISKS & CONTINGENCIES 18. APPROVALS

Test plan
1) 2) 3)

4)

5)

When desired no. of test cases have been executed All identified defects have been addressed When cost of testing outweigh (be more important than) potential cost of not fixing a bug When we are confident that the system works correctly. Depends on the risk of the system.

Test plan


Which Test cases to Automate


Test that need to be run for every build of the web site (Sanity, regression etc.) Test that use multiple data values for the same actions (Data Driven Test) Identical test that need to be executed using different browsers Test that require detailed information from application internals Multi-user scenarios Stress/load

Test plan


Which Test cases could not to automate


Usability Testing One time testing Ad-hoc or random testing Test without predictable result.

Test plan


 

Test Automation is the process where we can execute test cases using automation tool. Test cases are executed & instant result of the test case is displayed. In test automation tools are used to log the status of the particular control on screen It create test script called TSL. It saves time

Test plan


Following are benefits of Automation


Speed Repeatability Coverage Reliability Reusability Programming capabilities Cost Batch execution Overnight run

Test plan


Testing Tools & Defect Tracking Tools :


Win runner Test Director Load runner QTP Open STA Silk Test QA Load QA Run Silk Performer Test Complete WAST (Web Application Stress Tool)

Test plan


Following are the fields used in defect report


Summary Priority Severity Date System Information Detailed Description Status Assign to Reproducible Detected in version Detected by Screen prints

Vous aimerez peut-être aussi