CSE 303 Concepts and Tools for Software Development

Slides:



Advertisements
Similar presentations
Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Advertisements

Testing and Quality Assurance
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.
Practical Testing Techniques. Verification and Validation Validation –does the software do what was wanted? “Are we building the right system?” –This.
1 Software Engineering Lecture 11 Software Testing.
Integration testing Satish Mishra
Chapter 15 Design, Coding, and Testing. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Design Document The next step in the Software.
Illinois Institute of Technology
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Terms: Test (Case) vs. Test Suite
Estimation Wrap-up CSE 403, Spring 2008, Alverson Spolsky.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
Modular Programming Chapter Value and Reference Parameters t Function declaration: void computesumave(float num1, float num2, float& sum, float&
INFO 637Lecture #81 Software Engineering Process II Integration and System Testing INFO 637 Glenn Booker.
CompSci 230 Software Design and Construction
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
Prologue: The Software Process. Main Phases of Software Process 1. Requirements Analysis (answers “WHAT?”) Specifying what the application must do 2.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Understand Application Lifecycle Management
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
1 Lecture 19 Configuration Management Software Engineering.
University of Toronto Department of Computer Science CSC444 Lec08 1 Lecture 8: Testing Verification and Validation testing vs. static analysis Testing.
1 Principles of Computer Science I Prof. Nadeem Abdul Hamid CSC 120 – Fall 2005 Lecture Unit 10 - Testing.
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
1 Design and Integration: Part 2. 2 Plus Delta Feedback Reading and lecture repeat Ambiguous questions on quizzes Attendance quizzes Boring white lecture.
CS5103 Software Engineering Lecture 02 More on Software Process Models.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
C++ / G4MICE Course Session 1 - Introduction Edit text files in a UNIX environment. Use the g++ compiler to compile a single C++ file. Understand the C++
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Version Control and SVN ECE 297. Why Do We Need Version Control?
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
Software Development.
Appendix 1 - Packages Jim Fawcett copyright (c)
CSE 219 Final exam review.
Configuration Management
Software Testing.
Software Testing.
Software Engineering (CSI 321)
Software Testing.
Sample Wiki Comments?.
CSE 303 Concepts and Tools for Software Development
CSE 374 Programming Concepts & Tools
Chapter 18 Software Testing Strategies
Chapter 13 & 14 Software Testing Strategies and Techniques
Taking an Iteration Down to Code
Applied Software Implementation & Testing
Introduction to Software Testing
Lecture 09:Software Testing
Verification and Validation Unit Testing
CS240: Advanced Programming Concepts
Software visualization and analysis tool box
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CSE 303 Concepts and Tools for Software Development
Chapter 11: Integration- and System Testing
CSE 1020:Software Development
CSE 303 Concepts and Tools for Software Development
Jamie Cool Program Manager Microsoft
Software Testing.
Testing Slides adopted from John Jannotti, Brown University
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

CSE 303 Concepts and Tools for Software Development CSE 303 Lecture 17 11/13/2006 CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 11/13/2006 Lecture 17 – Specification and Testing

Administravia: Midterm Lowest: 17.5 (30%) Highest: 51.5 (89%) Average: 36 (62%) Std Dev: 9.6 (17%) 11/13/2006 CSE 303 Lecture 17

Administravia: Midterm Don't Panic! This was a very hard exam It's only 20% of your grade We'll adjust scores 4(b) will be extra credit We'll make sure people who invested time won't be penalized You can still pull up your score Do well on homework Final will be easier 11/13/2006 CSE 303 Lecture 17

Administravia: HW4 Many used .c and .h files improperly Contain function prototypes & typedefs For a set of related functions In C++, contain class definitions .c These are the files you compile They include the ".h" files needed We won't count off much for this on homework Hard for you to understand why we use this structure You'll understand more when we cover build scripting 11/13/2006 CSE 303 Lecture 17

Administravia: Study Session Struggled with C on midterm or HW4? Come to study session tonight Need to make sure you're not falling behind We'll cover midterm and HW4 questions Office hours today if you can't make it 11/13/2006 CSE 303 Lecture 17

Administravia: HW6 Repeat: Choose a partner now! Send e-mail with choice to Lincoln Ritter Team project directories will be created This will take a day after Lincoln gets e-mail 11/13/2006 CSE 303 Lecture 17

Where Are We? Up to Now From Now On Getting around Unix Shell Scripting C C++ From Now On Good software development practices Tools for managing larger projects 11/13/2006 CSE 303 Lecture 17

Today Basic Software Engineering Development Process Specification Unit Testing and Stubs 11/13/2006 CSE 303 Lecture 17

Software Development Process Main steps in building a system Requirements Analysis Specification Design Implementation Testing Documentation Maintenance 11/13/2006 CSE 303 Lecture 17

Software Development Process Requirements analysis What are we supposed to build? What do our customers need? Specification Precise description of provided functionality How Precise? Depends on what's being built Design Define the internal software architecture Break system into components Modules, interfaces, classes, etc. 11/13/2006 CSE 303 Lecture 17

Software Development Process Implementation Write the code and perform simple tests Testing Extensive testing of parts and whole system Documentation All steps in the process must be documented User guide, developer's guide, etc. Maintenance Fixing bugs, working on later releases 11/13/2006 CSE 303 Lecture 17

Software Development Process Main steps in building a system Requirements Analysis Specification Design Implementation Testing Documentation Maintenance Order of steps varies, frequent iteration How formal? Depends on what you're building The software process Guides your efforts Helps clarify thoughts Helps you communicate ideas You can view it as a tool! 11/13/2006 CSE 303 Lecture 17

Specification Writing a complete specification is hard Often as difficult as writing code Even worse when specification is formal Partial specification is better than none Specification helps later parts of process Implementation Test Development Maintenance Iterating is normal! Often need to fix spec. 11/13/2006 CSE 303 Lecture 17

Specification Example Let's write an informal specification for void insert(Node** head, char * val); 11/13/2006 CSE 303 Lecture 17

Specification First Attempt /** * Inserts a value into the list * @param head : address of pointer to * the first element in the list * @param val : new string to insert * @return nothing */ void insert(Node** head, char * val); 11/13/2006 CSE 303 Lecture 17

A Better Specification /** * Inserts a value into the list. * Does not check for duplicates. * Makes a copy of the inserted string. * Precondition: val is not NULL. * Postcondition: List is sorted in * alphabetical order * @param head : address of pointer to * the first element in the list * @param val : new string to insert * @return nothing */ void insert(Node** head, char * val); 11/13/2006 CSE 303 Lecture 17

Minimum Specification Describe what the function/method does Describe parameters (are they modified?) Describe what the function returns State preconditions Assumptions about parameter values E.g., string not NULL, units are inches, x > 0… Avoid trusting callers. Check preconditions. Describe side effects E.g., modifies global vars, reads/writes file 11/13/2006 CSE 303 Lecture 17

Testing Goal: Verification and validation Does the system work? Does it do what it is supposed to do? Increase our confidence in the system How do we know when we are done? Coverage metrics exist Execute each statement at least once Execute each branch or path at least once In Practice, you're never done testing 11/13/2006 CSE 303 Lecture 17

Two Basic Types of Tests Black Box Tests Test without looking at implementation Design test cases in terms of specification Very useful in practice Ideally, someone else should write them White Box Tests (a.k.a. "Glass Box" tests) Take implementation into account Easier to ensure good coverage Common sense: Test all branches once 11/13/2006 CSE 303 Lecture 17

More Types of Tests Unit testing Integration testing System testing Test one class at a time Integration testing Test a number of classes together System testing Test an entire working system Perform them all as you develop 11/13/2006 CSE 303 Lecture 17

Regression Testing Save tests as you develop Tests exercise more and more features Run all tests automatically Every time you add a feature Every time you fix a bug Helps to verify that everything still works 11/13/2006 CSE 303 Lecture 17

Stubs How test a class when it uses classes that… Do not exist? Are buggy? Are too large and slow? Answer: create "fake classes" One for each class that doesn't exist Just good enough for the tests As small as possible, so often called a stub 11/13/2006 CSE 303 Lecture 17

Summary Software devel. involves several steps Carefully think about what you must build Carefully think about how to build it Prepare tests based on your specs Implement, test, and document 11/13/2006 CSE 303 Lecture 17

Next Time Version Control Tools 11/13/2006 CSE 303 Lecture 17