Unit Testing Maintaining Quality. How do you test? Testing to date…

Slides:



Advertisements
Similar presentations
Lecture 4 Basic Scripting. Administrative  Files on the website will be posted in pdf for compatibility  Website is now mirrored at:
Advertisements

A Brief Introduction to Test- Driven Development Shawn M. Jones.
OBP Research Oy for simpler creation of embedded systems.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
(Quickly) Testing the Tester via Path Coverage Alex Groce Oregon State University (formerly NASA/JPL Laboratory for Reliable Software)
COMP205 Comparative Programming Languages Part 1: Introduction to programming languages Lecture 3: Managing and reducing complexity, program processing.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Unit testing C# classes “If it isn’t tested it doesn’t work” Unit testing C# classes1.
#RefreshCache CI - Daily Builds w/Jenkins – an Open Source Continuous Integration Server Nick Airdo Community Developer Advocate Central Christian Church.
Terms: Test (Case) vs. Test Suite
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
InterLaser 6 Basic requirements. What we need from customers File(s) –Formatted ASCII file(s) with overflow* detailFormatted ASCII file(s) OR –Dumping.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Introduction to VB.NET Tonga Institute of Higher Education.
WEB DESIGN & DEVELOPMENT STROLLING THROUGH…. WHAT IS??? Web design (Designers) Look and feel Graphic Design HTML, CSS, JavaScript Create UI & UX Web Development.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
Lesson 1b: Computer Systems and Program Development CPS118.
Capture-Replay Mocks Scandinavian Developer Conference 4 th April 2011 Geoff Bache.
/425 Declarative Methods - J. Eisner /425 Declarative Methods Prof. Jason Eisner MWF 3-4pm (sometimes 3-4:15)
07 Coding Conventions. 2 Demonstrate Developing Local Variables Describe Separating Public and Private Members during Declaration Explore Using System.exit.
More on “The Huddersfield Method” A lightweight, pattern-driven method based on SSM, Domain Driven Design and Naked Objects.
Extreme/Agile Programming Prabhaker Mateti. ACK These slides are collected from many authors along with a few of mine. Many thanks to all these authors.
October, 2006 © Copyright 2006, Larry A. Beaty. Copying and distribution of this document is permitted in any medium, provided this notice is preserved.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
BIT 142:Programming & Data Structures in C#. What is Unit Testing? 2.
H2OS Audit Trail And History page. What is the Audit Trail? The Audit Trail is a companion for the H2OS Customers table. It contains a historical record.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
Chapter 22 Developer testing Peter J. Lane. Testing can be difficult for developers to follow  Testing’s goal runs counter to the goals of the other.
1.  Writing snippets of code that try to use methods (functions) from your program.  Each snippet should test one (and only one) function......by calling.
Software Construction Lecture 18 Software Testing.
First BlueJ Day Houston, 2006 Unit Testing with BlueJ Bruce Quig Deakin University.
(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.
UI Team Code Review Reviewed by Grid Team. Priorities *****Major Problem ****Important Suggestion ***Normal **Less important idea *Minor idea/Code aesthetics.
1 Design and Integration: Part 2. 2 Plus Delta Feedback Reading and lecture repeat Ambiguous questions on quizzes Attendance quizzes Boring white lecture.
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
Copyright 2006 by Timothy J. McGuire, Ph.D. 1 MIPS Assembly Language CS 333 Sam Houston State University Dr. Tim McGuire.
1 Topics for this Lecture Build systems Static analysis.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
EMBEDDED REAL-TIME, INC. December 8, 2015 Java Unit Mark Mosher Rochester Java Users Group.
12/14/2015 Concept of Test Driven Development applied to Embedded Systems M. Smith University of Calgary, Canada 1 Automated Testing Environment Concepts.
Finding a PersonBOS Finding a Person! Building an algorithm to search for existing people in a system Rahn Lieberman Manager Emdeon Corp (Emdeon.com)
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Testing Spring Applications Unit Testing.
S Ramakrishnan1 Systems V & V, Quality and Standards Dr Sita Ramakrishnan School CSSE Monash University.
EUnit a powerful unit testing framework for Erlang Richard Carlsson Mickaël Rémond.
Windows 8 A touch screen computer on a desktop. Windows Metro.
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
User Testing The goal of a user test is to figure out how the user interacts with a UI in the wild... There are two possible explanations for why a user.
Copyright 2006 by Timothy J. McGuire, Ph.D. 1 MIPS Assembly Language CS 333 Sam Houston State University Dr. Tim McGuire.
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
Observing the Current System Benefits Can see how the system actually works in practice Can ask people to explain what they are doing – to gain a clear.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
XNAT 1.7: Getting Started 6 June, Introduction In this presentation we’ll discuss:  Features and functions in XNAT 1.7  Requirements  Installing.
Ukázková aplikace je ke stažení na wug
Dispatcher Phoenix Is…
Automatic Documentation Systems
InterLaser Basic requirements.
Chapter 7 Part 1 Edited by JJ Shepherd
Unit testing C# classes
INTRODUCTION c is a general purpose language which is very closely associated with UNIX for which it was developed in Bell Laboratories. Most of the programs.
X in [Integration, Delivery, Deployment]
History, Characteristics and Frameworks
Prof. Jason Eisner MWF 3-4pm (sometimes 3-4:15)
Class Commenting Doxygen for Classes.
Comments, Prototypes, Headers & Multiple Source Files
Constructing MDA-based Application Using Rational XDE for .NET
Exception Handling Imran Rashid CTO at ManiWeber Technologies.
TEAM NAME MEMBER 1 MEMBER 2 MEMBER 3 MEMBER 4
Exceptions and networking
Presentation transcript:

Unit Testing Maintaining Quality

How do you test? Testing to date…

Testing Large Systems Old school: – Programmers write parts of code Maybe check tricky bits – Someone tries to build whole project Sort out incompatibilities – Hand it off to testing This job is awful

Testing Goals Principles: – Tests should cover as much code as possible – Tests should be run after any significant change – Tests should not clutter up core source

Testing Goals Principles: – Tests should cover as much code as possible – Tests should be run after any significant change – Tests should not clutter up core source So: – Tests better be easy to write – Tests better be easy to run – Tests better exist outside normal structure

Unit Tests Unit Test : – Tests one module of code – Automated – Run after any changes to code

Other Testing Still need: – Integration testing But easier – UI testing But just testing UI code

Doing Unit Testing Basic idea: – Write functions TESTS to test your code Tests can be passed or failed

What does it actually look like? Base project – Normal application – Header file(s) for classes –.cpp file(s) for classes – main file with "real" program

What does it actually look like? Test project – Special header with test stuff Included in test files only – One.cpp file to test each class – New main file to run tests

Building / Running Activate / Build / Run standard project Normal program

Building / Running Activate / Build / Run test project Run unit tests

Details catch.hpp Don't touch

Details mainTester.cpp – Has main function Runs tests automatically – Can be configured

Details CLASSXTESTER.cpp – Includes class.h / catch.hpp – Has TEST_CASEs Expression that must be true Machine name - must be unique Description

Details CLASSXTESTER.cpp – Includes class.h / catch.hpp – Has TEST_CASEs Expression that must be true Machine name - must be unique Description

== doubles Not OK to compare doubles with ==

== doubles Can write your own function to test for approximate equality:

== doubles But Catch includes macro to simplify: – Approx( value )

Details Pattern – Make an object – Call functions to be tested – REQUIRE correct data Must use public methods to access

What Do I Test Test public interface Test every method/construct except… – Trivial one liners: Usually don't directly test getXXX() – IO code: Hard to do from testing frameworks

Features  Test Mapping Focus on one features per test Some features may need multiple tests: connect.setURL(" connect.setURL(" connect.setURL("ftp://chemeketa.edu") isPrime(3) isPrime(4)