Download Software Development Model and more Slides Software Project Management in PDF only on Docsity! Software Testing WORST REPORTED VOLKSWAGEN PROBLEMS
FE. 4 Oil Sludge Resulting In... Ht Engine Failure From O... Ht Engine Oil Sludge
2002 Passat 2003 Passat 2005 Passat
Average Cost to Fix: $2,832 Average Cost to Fix: $2,841
Average Mileage: 92,051 miles Average Mileage: 79,746 miles
Average Cost to Fix: $4,146
Average Mileage: 84,255 miles
Human Cause of Software Defect • Mistake • Defect (Fault or bug) • Failure • Eventual failures • Technical writer Multiplicative Increase in Cost
16X
Cost to Repair
4x
2X
1X
Requirement Design Code/Unit Independent After
Test Test Release
Business
Analyst
f
Business
Analyst
f
Business
Analyst
f
Business
Analyst
f
Work
Product Is
Work
Product Is
=)
Typical Scenarios
Require- System Work Program-
ment Architect Productis Design mer
zim ae F
Require- System Work Program-
ment Architect Productls Design mer
@iae fF
Require- System Work Program-
ment Architect’ ~Productls Design mer
at mo Ff
Require- System Program-
ment Architect Best Is_ Design mer
of =o F
Work
Product Is
= Zs
Work
Product Is
==> (2
Work
Product Is
=> (53
mic Is
=> oS
Role of Testing • Testing is part how risk failure are reduced. • When testing find defects, those defect are repaired and quality of software increases. • Delivers quality software. Objective of Testing • Cost of quality • To minimize the risk of failure. • To deliver quality product. • To make sure that the end result meets the business and user requirements. • Gaining confidence in and providing information about the level of quality. Software Defect • It is condition in software product which does not meet a software requirement or end user expectation. • Defect is an error in coding logic that causes a program to malfunction or unexpected results. Software Testing Myths • Myth: Testing is easy. • Fact: can be difficult and sometimes tough than coding. Software Testing Myths • Myth: Testing is easy. • Fact: can be difficult and sometimes tough than coding. Software Testing Myths • Myth: Anyone can test • Fact: requires skills and complete domain knowledge. Testing and Debugging Testing • It involves identifying bug/error/defect in a software without correcting it. • Normally professionals with a quality assurance background are involved in bugs identification. • Testing is performed in the testing phase. Testing and Debugging Debugging • It involves identifying, isolating, and fixing the problems/bugs. Developers who code the software conduct debugging upon encountering an error in the code. • Debugging is a part of White Box Testing or Unit Testing. • Debugging can be performed in the development phase while conducting Unit Testing or in phases while fixing the reported bugs. When to start testing? • During the requirement gathering phase, the analysis and verification of requirements are also considered as testing. • Reviewing the design in the design phase with the intent to improve the design is also considered as testing. • Testing performed by a developer on completion of the code is also categorized as testing. Software Quality • It is degree of conformance to explicit and implicit requirements and expectations. Dimension of Software Quality • Accessibility • Compatibility • Concurrency • Efficiency • Functionality • Portability • Reliability • Scalability • Security etc. Definition • A test is deliberate action or experiment to find out how well something works or to determine how effective it is. Validation or Verification? Validation Building the right software Make sure it’s what the user wants Verification Building the software right Make sure it works Accurate, complete specification essential! 2-Sep-24 30 Verification Validation Verification addresses the concern: "Are you building it right?" Validation addresses the concern: "Are you building the right thing?" Ensures that the software system meets all the functionality. Ensures that the functionalities meet the intended behavior. Verification takes place first and includes the checking for documentation, code, etc. Validation occurs after verification and mainly involves the checking of the overall product. Done by developers. Done by testers. It has static activities, as it includes collecting reviews, walkthroughs, and inspections to verify a software. It has dynamic activities, as it includes executing the software against the requirements. It is an objective process and no subjective decision should be needed to verify a software. It is a subjective process and involves subjective decisions on how well a software works. Criteria Software Quality Assurance (SQA) Software Quality Control (SQC) Definition SQA is a set of activities for ensuring quality in software engineering processes (that ultimately result in quality in software products). The activities establish and evaluate the processes that produce products. SQC is a set of activities for ensuring quality in software products. The activities focus on identifying defects in the actual products produced. Focus Process focused Product focused Orientation Prevention oriented Detection oriented Breadth Organization wide Product/project specific Scope Relates to all products that will ever be created by a process Relates to specific product Activities •Process Definition and Implementation •Audits •Training •Reviews •Testing Testing Principles Principle 3: Early Testing • To find defects early, testing activities shall be started as early as possible in SDLC. • It should focused on defined objective. Testing Principles Principle 4: Defect Clustering • Testing effort shall be focused proportionally. • Small number of module usually contain most of the defects discovered during pre-release testing Testing Principles Principle 5: Pesticide Paradox • If same test are repeated over and over again, eventually same set of test cases will no longer find new defects. • To overcome pesticide paradox, test cases need to be regularly reviewed and revised. • New and different test need to be written to exercise different parts of the software to find new defects. Drawback of Waterfall Model • Testing happen at the end. • Defect are detected are the end of implementation phase. • It is difficult to get feedback passed backward. • Sequential Model Advantages of V Model • Testing is added at early time. • Testing is not just execution activity. • Variety of activity can be perform in parallel. • Defect are found on test basis requirement. • Tester are involved earlier. Testing in V Model • Component Testing • Integration Testing • System Testing • Acceptance Testing Requirement Based Testing • It uses specification of functional requirement. • A good way to start is to use table of content. • We should also prioritize requirement and use it for testing. • This will ensure most important and most critical test are included in the testing effort. Business Process Based Testing • It uses knowledge of business process. • It describes scenarios of day to day business. Security Testing • Testing to determine security of software product. Stress testing • Exercises the system beyond its maximum design load. Stressing the system often causes defects to come to light • Stressing the system test failure behaviour.. Systems should not fail catastrophically. Stress testing checks for unacceptable loss of service or data • Particularly relevant to distributed systems which can exhibit severe degradation as a network becomes overloaded Path testing • The objective of path testing is to ensure that the set of test cases is such that each path through the program is executed at least once • The starting point for path testing is a program flow graph that shows nodes representing program decisions and arcs representing the flow of control • Statements with conditions are therefore nodes in the flow graph Security Testing • Discovers vulnerabilities of system. • It determine data and resources are protected from possible intruders. • Focus Areas • Network security • System software security • Client side application security • Server side application security Load testing • It evaluates behavior of system at increasing workload. Endurance Testing • It is conducted to evaluate behavior of system when a significant workload is given continuously. Stress Testing • It is conducted to evaluate the behavior of system beyond limit. Agile Testing • It follows principles of agile testing. • Agile is an iterative development. Advantages • Saves time and money • Less documentation • Regular feedback from user. • Daily meeting can help to determine Principles of Agile Testing • Testing is not phase. • Testing moves project forward. • Everyone test. • Clean code. • Reduces test documentation • Test driven. Adhoc Testing • Also known as monkey testing • In this method there is no any planning and documentation. • Test are conducted informally and randomly without any formal expected results. • Sometimes interesting defect can be found • Success rate depends upon creativity of tester. The human causes of software defects 0 2 4 6 8 10 12 14 16 Requirement Design Code/Unit Testing Independent Test After Release Cost Why is Testing Necessary? 3) The role of testing, and its effect on quality • When there are defects, there are risks of failure. • Testing is part of how risks of failures can be reduced. • Testing allows improved quality. • If root cause analysis carried out for each project, then team can improve software development process. Why is Testing Necessary? 4) How much testing is enough? • Testing Deadlines • Completion of test case execution • Completion of functional and code coverage to a certain point • Bug rate falls below a certain level and no high-priority bugs are identified • Management decision Defect Severity Classification • It indicates degree of negative impact on the quality of software. • Severity is of following three types • Critical • Major • Minor • Trivial • Severity is also denoted as • S1- Critical • S2 – Major • S3- Minor • S4- Trivial Defect Probability • It indicates likelihood of a user encountering the defect or bug. • Probability are of three types • High • Medium • Low Defect Priority • It indicates the importance or urgency of fixing a defect. • Priority is of four types • Urgent • High • Medium • Low Defect Report Template • ID • Project Name • Product • Release Version • Module • Detected Build Version • Summary • Description • Steps to Replicate • Actual result • Expected Result Defect Report Template • Attachments • Remarks • Defect Severity • Defect Priority • Reported By • Assigned To • Status • Fixed Build Version Defect Age • It is difference in time between the date a defect is detected and the current date. • Prevention Cost • Cost arises from efforts to prevent defects. • Appraisal Cost • Cost arises from efforts to detect defects. • Internal Failure Cost • Cost arises from defect identified internally. • E.g. Cost of rework • External Failure Cost • Cost arises from defect identified by the client or end users. Major activities in Test Process • Test Planning • Test Control • Test Analysis • Test Design • Test Implementation • Test Execution • Checking Results • Evaluating exit criteria • Test result reporting • Test Closure Test Planning • We establish scope, approach, resources, schedule and specific task in the intended test activities. • It should identify • test items, feature to be tested and not tested. • Roles and responsibilities of participant and stakeholder. • Test environment required • Test design techniques • Entry and exit criteria Test Design • We determine how we will test, what we decided to test during test analysis. • Using this, we transform these test condition and general test objectives. Test Implementation • We carry out remaining activities required to ready for test execution such as • Developing and prioritizing test procedures • Creating test data • Setting up test environment Test Execution • We run our test against the test objects. Test Result Reporting • We want to report progress against exit criteria. • This involves details regarding • Status of project • Test process • Quality of system under test. Test Closure • It involves collecting test data of completes test activities in order to consolidates our experience, re-useable test ware, important facts and relevant metrics.