Software Testing For CSE 3902 Matt Boggus. Terms: Setup / Exercise / Verify / Teardown Setup - whatever needs to be prepared before the code can be run.

Slides:



Advertisements
Similar presentations
How SAS implements structured programming constructs
Advertisements

8. Code Generation. Generate executable code for a target machine that is a faithful representation of the semantics of the source code Depends not only.
1 CS101 Introduction to Computing Lecture 23 Flow Control & Loops (Web Development Lecture 8)
Unit Testing CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 27, 2007.
Introduction to Computers and Programming Lecture 5 New York University.
Ch6: Software Verification. 1 Statement coverage criterion  Informally:  Formally:  Difficult to minimize the number of test cases and still ensure.
Introduction to Computers and Programming Lecture 5 Boolean type; if statement Professor: Evan Korth New York University.
1 ITCS 6/8010 CUDA Programming, UNC-Charlotte, B. Wilkinson, March 22, 2011 Branching.ppt Control Flow These notes will introduce scheduling control-flow.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Conditional Statements Control Structures.
1 Arithmetic in C. 2 Type Casting: STOPPED You can change the data type of the variable in an expression by: (data_Type) Variable_Name Ex: int a = 15;
Part II: Addressing Modes
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
Designing with Procedures 1. Designing a Program with Procedures If the code for your program is going to be less than one page, normally don’t bother;
Advanced Programming Collage of Information Technology University of Palestine, Gaza Prepared by: Mahmoud Rafeek Alfarra Lecture 2: Major Concepts of Programming.
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.
Flow of Control Part 1: Selection
Software Quality FS 2012 Discussion Exercise 2 Eya Ben Charrada.
White-box Testing.
TEST-1 6. Testing & Refactoring. TEST-2 How we create classes? We think about what a class must do We focus on its implementation We write fields We write.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 ‏ Control Structures.
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
Design of Bio-Medical Virtual Instrumentation Tutorial 2.
First delivery of the course Software Quality and Testing Katerina Zdravkova, Anastas Mišev
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
CSCA48H Style and Testing. 2 Style The Zen of Python: import this Do the Goodger reading!
“Isolating Failure Causes through Test Case Generation “ Jeremias Rößler Gordon Fraser Andreas Zeller Alessandro Orso Presented by John-Paul Ore.
Test-Driven Development Eduard Miric ă. The problem.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 13 Conditional.
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
Decision Making and Branching (cont.)
Chapter 4 Introduction to Control Statements
A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University ©2011 Pearson Prentice Hall ISBN Chapter 13 Conditional.
LECTURE 23: LOVE THE BIG-OH CSC 212 – Data Structures.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Engineering Computing I Chapter 3 Control Flow. Chapter 3 - Control Flow The control-flow of a language specify the order in which computations are performed.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Variables, operators, canvas, and multimedia Dr. Reyes.
JavaScript JavaScript ( Condition and Loops ). Conditional Statements If Statement If...else Statement if (condition) { code to be executed if condition.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Dr. Rob Hasker Dr. Brad Dennis. Coverage  Exercise: Each participant: write down 4 instructions Input to procedure: value given by someone, which person.
Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery.
Mutation Testing Laraib Zahid & Mariam Arshad. What is Mutation Testing?  Fault-based Testing: directed towards “typical” faults that could occur in.
Chapter 7 Control Structures. Java has very flexible three looping mechanisms. You can use one of the following three loops:  while Loop  do...while.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
1 Sections 7.2 – 7.7 Nested Control Statements Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
IST 210: PHP Logic IST 210: Organization of Data IST2101.
Lab 7 Control-Flow Testing
Software Testing.
Metrics of Software Quality
John D. McGregor Session 9 Testing Vocabulary
Systematic Manual Testing
Jama Options for Complex Testing variations
Data Coverage and Code Coverage
CONTROL FLOW TESTING.
John D. McGregor Session 9 Testing Vocabulary
When I want to execute the subroutine I just give the command Write()
Midterm Exam Preperation
Improving Test Suites for Efficient Fault Localization
While Loops and If-Else Structures
During the last lecture we had a discussion on Data Types, Variables & Operators
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Computer Science Core Concepts
Who Guards the Guards? On the Validation of Test Case Migration
JUnit Reading: various web pages
CSE 1020:Software Development
You’ll get better code in less time (If you do it for a while)
Testing.
Presentation transcript:

Software Testing For CSE 3902 Matt Boggus

Terms: Setup / Exercise / Verify / Teardown Setup - whatever needs to be prepared before the code can be run Exercise - run the code we want to test Verify - compare the result of the run with some expected condition Teardown - cleanup all the extra stuff we used for testing so that the system is in the same state as it was before we started the current test (the state from before the Setup step).

Terms: code coverage Function coverage - Has each function been called? Statement coverage - Has each statement been executed? Branch coverage - Has each branch (i.e. if-else blocks or cases of a switch) been executed? Path coverage - Has every possible route through a given part of the code been executed? Loop coverage - Has every possible loop been executed zero times, once, and more than once? State coverage - Has each state in a finite-state machine been reached and explored?

Test Driven Development Write tests first Write minimal amount of code to pass the test Refactor code to fit quality standards

Mutation testing Given an existing implementation and set of unit tests Modify/Mutate one statement in existing code, ex: Arithmetic operators: + becomes a – Boolean operators: < becomes a <= Values: numeric literal or constant is increased or decreased by 1 Adding or removing statements Generate X mutant code samples and run unit tests If one of the tests fails the mutant has been “killed” Killed mutants / total mutants measures usefulness of current unit tests

Testing Anti-patterns Having dependencies between test cases Order that tests are executed shouldn’t matter Failing on one test should not affect the pass/fail of the next test Testing for run-time speed/performance Slow running tests Over specification – starting conditions are too constrained Under specification – starting conditions are not constrained enough The ice cream cone and cupcake – too much reliance on manual testingice cream conecupcake