Testing Test Plans and Regression Testing. Programs need testing! Writing a program involves more than knowing the syntax and semantics of a language.

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

Test process essentials Riitta Viitamäki,
Characteristic Functions. Want: YearCodeQ1AmtQ2AmtQ3AmtQ4Amt 2001e (from fin_data table in Sybase Sample Database) Have: Yearquartercodeamount.
CompSci 230 Software Design and Construction Software Quality 2014S2 Black box testing.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
G. Alonso, D. Kossmann Systems Group
T. E. Potok - University of Tennessee Software Engineering Dr. Thomas E. Potok Adjunct Professor UT Research Staff Member ORNL.
1 CS2200 Software Development Lecture: Testing and Design A. O’Riordan, 2008 K. Brown,
Debugging Introduction to Computing Science and Programming I.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
CS351 © 2003 Ray S. Babcock Software Testing What is it?
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Importance of testing Difference between Errors and Faults The purpose of test data Importance of: – Testing – Test Plans.
The Basics of Software Testing
1 Psych 5500/6500 The t Test for a Single Group Mean (Part 5): Outliers Fall, 2008.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Bug Session Two. Session description In this session the use of algorithms is reinforced to help pupils plan out what they will need to program on their.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
28/08/2015SJF L31 F21SF Software Engineering Foundations ASSUMPTIONS AND TESTING Monica Farrow EM G30 Material available on Vision.
CC0002NI – Computer Programming Computer Programming Er. Saroj Sharan Regmi Week 7.
Software Quality Assurance Lecture #8 By: Faraz Ahmed.
Chapter 8: Systems analysis and design
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 23, Slide 1 Chapter 23 Comparing Means.
Process Design (Requirements). Recall the Four Steps of Problem Solving * Orient Plan Execute Test These apply to any kind of problem, not just spreadsheet.
1 Functions 1 Parameter, 1 Return-Value 1. The problem 2. Recall the layout 3. Create the definition 4. "Flow" of data 5. Testing 6. Projects 1 and 2.
Document Editing PCS Lesson 4. Objectives List situations that require you to edit and undo documentation Demonstrate how to edit your documentation Demonstrate.
Testing E001 Access to Computing: Programming. 2 Introduction This presentation is designed to show you the importance of testing, and how it is used.
Testing -- Part II. Testing The role of testing is to: w Locate errors that can then be fixed to produce a more reliable product w Design tests that systematically.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 2.
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
Black-box Testing.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
Different approaches an analysis might use when investigating a system including: – Questionnaires – Interviews – Document gathering and analysis.
Systems Life Cycle. Know the elements of the system that are created Understand the need for thorough testing Be able to describe the different tests.
Software Engineering Chapter 3 CPSC Pascal Brent M. Dingle Texas A&M University.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
(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.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
List #2 2nd hundred most commonly used words Directions: 1. Please read through this list with a partner 2. Time each other reading the words 3. Start.
EGR101-34R "lecture on hardware- software" FB 7/10/2004 Digital Electronics Logic Gates Logic gates work with the voltage level of the signals. They are.
The Software Development Process
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Conditional Statements.  Quiz  Hand in your jQuery exercises from last lecture  They don't have to be 100% perfect to get full credit  They do have.
Intermediate 2 Computing Unit 2 - Software Development.
Programming Errors. Errors of different types Syntax errors – easiest to fix, found by compiler or interpreter Semantic errors – logic errors, found by.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
Week 6. Statistics etc. GRS LX 865 Topics in Linguistics.
Ch. 18 – Sampling Distribution Models (Day 1 – Sample Proportions) Part V – From the Data at Hand to the World at Large.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Software testing techniques Software testing techniques REGRESSION TESTING Presentation on the seminar Kaunas University of Technology.
CS 115 Lecture 5 Math library; building a project Taken from notes by Dr. Neil Moore.
REGRESSION TESTING Audrius Čėsna IFM-0/2. Regression testing is any type of software testing that seeks to uncover new errors, or regressions, in existing.
MOOR ERROR HANDLING Types of error How to test your code for errors How to detect errors How to recover from errors.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
Testing More In CS430.
What to do when a test fails
Input Space Partition Testing CS 4501 / 6501 Software Testing
Chapter 13 & 14 Software Testing Strategies and Techniques
Personalize Practice with Accelerated Math
Coding Concepts (Basics)
Fundamentals of Data Representation
Programming.
Review of Previous Lesson
Software Development Techniques
Presentation transcript:

Testing Test Plans and Regression Testing

Programs need testing! Writing a program involves more than knowing the syntax and semantics of a language You need to verify that your program runs correctly, i.e. does not crash unexpectedly and gives the correct answers/outputs. A simple program may be obviously right or wrong, but once it gets past more than 10 lines, a program needs to be tested systematically. Putting in some data picked at random will do a little good, but to be confident that your program works, you need to have a plan.

A Test Case A typical test case has four items: A description of the case – what are you testing for here? Input data which causes the case to happen The expected output/outcome from that input The actual output/outcome from that input In a software company, the authors of the software would write up test cases with the first three items, then hand off the job to the testers. The testers would run the tests, record the actual outputs and return the results to the authors, who would fix the errors found.

A Test Plan A test plan is a table which contains a number of test cases. The quality of the test cases is more important than the quantity. It is important to give test cases that do not overlap if possible. If your program has two paths through it and all your test cases run through just one of the two possible paths, then you have not thoroughly tested your program. Making good test plans requires thought and knowledge of the specifications of the problem. Think about normal cases, boundary cases, special cases, error cases.

Test Plans for CS 115 Our test plans will only have three major columns instead of four. The last one, the Actual Output, is assumed to be unnecessary. If you find a case where the expected output and the actual output do not agree, you have found a bug and we assume you will fix it. I say “major columns” because as the programs get more complex, there may be several different inputs for one run of the program. These would all be under “Input” but would have their own columns

Sample Test Plan Suppose the problem was to input 3 numbers and output ‘yes’ if they were in ascending order and ‘no’ otherwise. “Ascending” means strictly each number is greater than the ones coming before it. Description of CaseInputsExpected output All three numbers the same 333‘no’ All ascending123‘yes’ Descending531‘no’ Two ascending, one not132‘no’ First input is non-numericA39Program crashes There are other cases that can be described…

“Off by one” errors If your problem involves ranges of values (numbers from 1 to 10, letters from C to R, etc.) then you should be careful to test the boundary cases. Humans commonly make the error of going one time too far or stopping one time too soon. In the case of numbers from 1 to 10 (assuming integers), test cases should be done for 0, 1 and 2, and 9, 10, and 11. This is an example of checking boundary conditions. Some problems have cases which will not have correct answers or will have unusual behaviors (crashing). These cases should be investigated also, as far as possible.

Regression Testing This is a particular principle of testing that will save you some points! If you are testing your program with your test plan, you will run through the cases in the order in the table, most likely. Say you find that Case 1 works, Case 2 works, but Case 3 does NOT. You naturally will fix the bug found by Case 3. BUT the natural thing to do after that would be to start with Case 4, assuming that Cases 1 and 2 are still valid from previous runs. Regression testing says to start OVER with the FIRST test case and run all the test cases again. The reason is that you may have introduced a NEW bug when you fixed the one in Case 3, or you may have uncovered a bug which was already there but hidden by the bug you have now fixed.

Regression Testing continued How does this save you points? Suppose the situation described does happen You fix Case 3, but there is a new bug which will only be seen if you run Case 1 again. You don’t do regression testing, so that bug is not found. When you turn your program in, the TA runs their test cases on your program. Bang!! The first case does not run correctly!! You lose points! So you want to do regression testing!