Section 2.4 Software Testing. 2.4 Software Testing The process of executing a program with data sets designed to discover errors Software testing is one.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

1 Software Engineering Lecture 11 Software Testing.
Integration testing Satish Mishra
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
What Exactly are the Techniques of Software Verification and Validation A Storehouse of Vast Knowledge on Software Testing.
Terms: Test (Case) vs. Test Suite
System/Software Testing
Lecture 6 Software Testing and jUnit CS140 Dick Steflik.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
1 Software Testing (Part-II) Lecture Software Testing Software Testing is the process of finding the bugs in a software. It helps in Verifying and.
TESTING.
Database testing Prepared by Saurabh sinha. Database testing mainly focus on: Data integrity test Data integrity test Stored procedures test Stored procedures.
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
Testing Especially Unit Testing. V-model Wikipedia:
Lecture 11 Testing and Debugging SFDV Principles of Information Systems.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
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.
Software Construction Lecture 18 Software Testing.
(1) Unit Testing and Test Planning CS2110: SW Development Methods These slides design for use in lab. They supplement more complete slides used in lecture.
Testing software Team Software Development Project.
What is Testing? Testing is the process of finding errors in the system implementation. –The intent of testing is to find problems with the system.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Static and Integration Testing. Static Testing vs Dynamic Testing  To find defects  This testing includes verification process  without executing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Chapter 2 Abstract Data Types. Chapter 2: Abstract Data Types 2.1 – Abstraction 2.2 – The StringLog ADT Specification 2.3 – Array-Based StringLog ADT.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Section 2.2 The StringLog ADT Specification. 2.2 The StringLog ADT Specification The primary responsibility of the StringLog ADT is to remember all the.
Database Testing Gourav Mehta (Associate QA Engineer)
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
PRODUCT VERIFICATION Adapted from the NASA Systems Engineering Handbook for CSULB EE 400D by Alia Bonetti.
Functional testing, Equivalence class testing
Principles of Programming & Software Engineering
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Section 2.6 Linked List StringLog ADT Implementation
Verification and Validation
Testing Tutorial 7.
C++ Plus Data Structures
SOFTWARE TESTING OVERVIEW
Test Automation CS 4501 / 6501 Software Testing
Chapter 8 – Software Testing
Software engineering – 1
Chapter 7 Software Testing.
Applied Software Implementation & Testing
Teaching slides Chapter 9.
Chapter 1 Software Engineering.
Phil Tayco Slide version 1.0 Created Oct 2, 2017
Introduction to Software Testing
Lecture 09:Software Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
Software Engineering Lecture #13.
Software Engineering Lecture #12.
Software testing.
CS240: Advanced Programming Concepts
Software Testing & Quality Management
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 Verification and Validation
Software Verification and Validation
Software Verification and Validation
CSE 1020:Software Development
Chapter 7 Software Testing.
Software Testing.
Software Testing.
Presentation transcript:

Section 2.4 Software Testing

2.4 Software Testing The process of executing a program with data sets designed to discover errors Software testing is one facet of software verification.

Verification and Validation Software validation The process of determining the degree to which software fulfills its intended purpose Software verification The process of determining the degree to which a software product fulfills its specifications Deskchecking Tracing an execution of a design or program on paper Walk-through A verification method in which a team performs a manual simulation of the program or design Inspection A verification method in which one member of a team reads the program or design line by line and the others point out errors

Test cases The software testing process requires us to devise a set of test cases that, taken together, allow us to assert that a program works correctly. For each test case, we must: –determine inputs that represent the test case –determine the expected behavior of the program for the given input –run the program and observe the resulting behavior –compare the expected behavior and the actual behavior of the program

Identifying test cases Functional domain The set of valid input data for a program or method In those limited cases where the functional domain, is extremely small, one can verify a program unit by testing it against every possible input element. This exhaustive testing, can prove conclusively that the software meets its specifications. In most cases, however, the functional domain is very large, so exhaustive testing is almost always impractical or impossible.

Identifying test cases Cover general dimensions of data. Within each dimension identify categories of inputs and expected results. Test at least one instance of each combination of categories across dimensions. Testing like this is called black-box testing. The tester must know the external interface to the module—its inputs and expected outputs—but does not need to consider what is being done inside the module (the inside of the black box).

Identifying test cases - example Identified dimensions and categories for the contains method of the StringLog ADT could be: –Expected result: true, false –Size of StringLog: empty, small, large, full –Properties of element: small, large, contains blanks –Properties of match: perfect match, imperfect match where character cases differ –Position of match: first string placed in StringLog, last string placed in StringLog, "middle" string placed in StringLog From this list we can identify dozens of test cases, for example a test where the expected result is true, the StringLog is full, the element contains blanks, it's an imperfect match, and the string being matched was the "middle" string placed into the StringLog.

More on Testing Test plan A document showing the test cases planned for a program or module, their purposes, inputs, expected outputs, and criteria for success Test driver A program that calls operations exported from a class, allowing us to test the results of the operations

Pseudocode for an Interactive Test Driver for an ADT Implementation Prompt for, read, and display test name Determine which constructor to use, obtain any needed parameters, and instantiate a new instance of the ADT while (testing continues) { Display a menu of operation choices, one choice for each method exported by the ADT implementation, plus a "show contents" choice, plus a "stop Testing" choice Get the user’s choice and obtain any needed parameters Perform the chosen operation } The ITDArrayStringLog program ("ITD" stands for "Interactive Test Driver”) is a test driver based on the above pseudocode for our ArrayStringLog class. Try it out!

Professional Testing In a production environment where hundreds or even thousands of test cases need to be performed, an interactive approach can be unwieldy to use. Instead, automated test drivers are created to run in batch mode. For example, here is a test case for the contains method: public class Test034 import ch02.stringLogs.*; { public static void main(String[] args) { ArrayStringLog log = new ArrayStringLog("Test 34"); log.insert("trouble in the fields"); log.insert("love at the five and dime"); log.insert("once in a very blue moon"); if (log.contains("Love at the Five and Dime")) System.out.println("Test 34 passed"); else System.out.println("Test 34 failed"); } }

Professional Testing Test034 can run without user intervention and will report whether or not the test case has been passed. By developing an entire suite of such programs, software engineers can automate the testing process. The same set of test programs can be used over and over again, throughout the development and maintenance stages of the software process. Frameworks exist that simplify the creation, management and use of such batch test suites.