CX002-3-3 Introduction to Web Programming Testing.

Slides:



Advertisements
Similar presentations
Software Testing and Analysis. Ultimate goal for software testing Quality Assurance.
Advertisements

Lecture 8: Testing, Verification and Validation
Verification and Validation
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
1 / 28 CS 425/625 Software Engineering Verification and Validation Based on Chapter 19 of the textbook [SE-6] Ian Sommerville, Software Engineering, 6.
Verification and Validation
Creator: ACSession No: 12 Slide No: 1Reviewer: CSE300Advanced Software EngineeringJanuary 2006 Testing Strategy CSE300 Advanced Software Engineering University.
Testing an individual module
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Verification and Validation CIS 376 Bruce R. Maxim UM-Dearborn.
Verification and Validation
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
COMP 354 Software Engineering I Section BB Summer 2009 Dr Greg Butler
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Adaptive Processes © Adaptive Processes Simpler, Faster, Better Verification and Validation Assuring that a software system meets a user's needs.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Verification and Validation Chapter 22 of Ian Sommerville’s Software Engineering.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Reviews & testing Software Reviews & testing An Overview.
Software Testing Testing types Testing strategy Testing principles.
Software Testing The process of operating a system or component under specified conditions, observing and recording the results, and making an evaluation.
CS.436 Software Engineering By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Verification and validation Slide 1 1 Chapter 13 Verification and Validation.
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
Verification and Validation
CHAPTER 9: VERIFICATION AND VALIDATION 1. Objectives  To introduce software verification and validation and to discuss the distinction between them 
Verification and Validation Assuring that a software system meets a user's needs.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Engineering, 8th edition Chapter 22 1 Courtesy: ©Ian Somerville 2006 April 27 th, 2009 Lecture # 19 Verification and Validation.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Software inspections l Involve people examining the source representation with.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVII. Verification and Validation.
Verification and Validation. Topics covered l Verification and validation planning l Program Testing l Software inspections.
Verification and Validation
Verification and Validation
Testing Tutorial 7.
Software Testing.
CSC 480 Software Engineering
Verification and Validation
Software Engineering (CSI 321)
Verification & Validation
Verification and Validation
Verification and Validation
Verification and Validation
UNIT-IV ECS-602 Software engineering PART-I
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing (Lecture 11-a)
Lecture 09:Software Testing
Verification and Validation
Software testing.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Testing “If you can’t test it, you can’t design it”
Chapter 7 Software Testing.
Presentation transcript:

CX Introduction to Web Programming Testing

CX Introduction to Web ProgrammingTesting Contents Overview –Rationale and outline Test Plan Static Testing –Program inspection Dynamic Testing –Black Box –White Box Conclusion

CX Introduction to Web ProgrammingTesting Introduction Why test? –Functional reasons –Financial reasons –Marketing reasons How to go about testing? What kinds of test? How much testing?

CX Introduction to Web ProgrammingTesting Testing in General Verification and validation – fit for purpose Static testing and dynamic testing Testing can reveal presence of errors Testing cannot prove absence of errors! –Need to balance between effort put in and returns for that effort

CX Introduction to Web ProgrammingTesting Test Plan Sets out standards to be adhered to Describes tests, items for testing, resources/ constraints Major components of the plan: –Testing process –Requirements traceability –Tested items –Testing schedule –Test recording procedure –Hardware and software requirements –Constraints

CX Introduction to Web ProgrammingTesting Testing Process Unit testing – individual components (independent) Module testing – dependent components (independent) Sub-system testing – module collections (interface errors) System testing – integrated sub-systems (validate functional/non-functional requirements) Acceptance testing (beta testing)

CX Introduction to Web ProgrammingTesting V-Model Requirements specification System specification System design Detailed design Service Acceptance test System integration test Sub-system integration test Module and unit code and test Sub-system integration test plan System integration test plan Acceptance test plan from: Sommerville, “Software Engineering”, 5 th edn, Addison-Wesley p. 451

CX Introduction to Web ProgrammingTesting Regression Testing Defect testing vs. debugging Regression testing applied having ‘fixed’ some code –Expensive –Unnecessary? Mitigated by reducing/removing dependencies in the code

CX Introduction to Web ProgrammingTesting Progam/Document Inspection Review to find defects/issues Team of at least four people carry out roles such as: –Author, reader, inspector, moderator

CX Introduction to Web ProgrammingTesting Inspection Process Planning Overview (500 source code statements per hour) Individual preparation (125 per hour) Inspection meeting ( per hour – 2 hours max) Rework Follow-up

CX Introduction to Web ProgrammingTesting Requires Precise specification Team familiar with the organisation’s standards Up-to-date version being inspected Checklist Experience

CX Introduction to Web ProgrammingTesting Checklist sample Data faults –Initialise variables before use? –Are all variables used? –Upper bound array size Control faults –Conditional statements correct? –Exhaustive case statements?

CX Introduction to Web ProgrammingTesting Program Inspections No concern with interactions between errors Possible to inspect partial systems Can include standards compliance, maintainability, etc.

CX Introduction to Web ProgrammingTesting Example Type an integer between 1 and 5 (inclusive) to get the string equivalent (1=“One”, 2=“Two”, etc.) if UserNumber is between 1 and 5 NumberArray() of String = “One”, “Two”, “Three”, “Four”, “Five” output NumberArray(UserNumber)

CX Introduction to Web ProgrammingTesting Test Cases Set of inputs, execution conditions, expected outputs Defect test cases –Cause the system to perform incorrectly

CX Introduction to Web ProgrammingTesting Black Box Testing Also known as ‘Functional Testing’ References the program specification Focus on the ‘behaviour’ of the system –Studies the inputs and outputs that these lead to Looking to break the program –Identify inputs with high probability of causing anomalies –Relies on heuristics to determine these

CX Introduction to Web ProgrammingTesting Black Box Testing Equivalence Partitioning –Categorisation of possible test cases into partitions – common characteristics –Identified from program specification and general testing guidelines (common sense) –Each test case belongs to one partition

CX Introduction to Web ProgrammingTesting Example Type an integer between 1 and 5 (inclusive) to get the string equivalent (1=“One”, 2=“Two”, etc.) InputConditionOutput Integerbetween 1 and 5 (inclusive) String equivalent Integeroutside 1 and 5Nothing Non-integerbetween 1 and 5 (inclusive) Nothing

CX Introduction to Web ProgrammingTesting Black Box Testing Boundary Value Analysis –Values at extremes of input domains cause most problems –Test cases generated from these boundary values

CX Introduction to Web ProgrammingTesting White Box Testing Also known as ‘Structural Testing’ Requires knowledge of system structure Can be used to identify further equivalence partitions

CX Introduction to Web ProgrammingTesting White Box Testing Path Testing –Test every execution path –Produce flow graph nodes represent decisions arcs/edges represent control flow –An independent path traverses 1 new edge –Design Test Case for each independent path –Complexity quickly leads to uncertain coverage

CX Introduction to Web ProgrammingTesting White Box Testing Path Testing –Cyclomatic Complexity (CC) CC (G) = (Number(edges) – Number(nodes)) + 2 If – Then - Else Loop - While Case - Of (diagrams from: Sommerville, “Software Engineering”, 5 th edn, Addison-Wesley p. 474)

CX Introduction to Web ProgrammingTesting Example if UserNumber is between 1 and 5 NumberArray() of String = “One”, “Two”, “Three”, “Four”, “Five” output NumberArray(UserNumber) UserNumber between 1 and 5 CC = (4 – 4) + 2 = 2 Two Test Cases (one for each path)

CX Introduction to Web ProgrammingTesting Dynamic Testing Test emergent properties of integrated systems Test system outputs meet customer requirements

CX Introduction to Web ProgrammingTesting Q & A