Java & Testing.

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

Test process essentials Riitta Viitamäki,
Testing and Quality Assurance
Developer Testing and Debugging. Resources Code Complete by Steve McConnell Code Complete by Steve McConnell Safari Books Online Safari Books Online Google.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
WISTPC-09 : Session A Tariq M. King PhD Candidate Florida International University Workshop on Integrating Software Testing into Programming.
Informatics 43 – April 30, What is a test case? An input to a system, and the correct output. An “input” may be complex. Example: – What is an input.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Understand.
Testing HCI Usability Testing. Chronological order of testing Individual program units are built and tested (white-box testing / unit testing) Units are.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
CS4723 Software Validation and Quality Assurance Lecture 02 Overview of Software Testing.
Software Testing Prasad G.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Lecture 6 Software Testing and jUnit CS140 Dick Steflik.
TESTING.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
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.
Software Testing. What is Software Testing? Definition: 1.is an investigation conducted to provide stakeholders with information about the quality of.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
1 Principles of Computer Science I Prof. Nadeem Abdul Hamid CSC 120 – Fall 2005 Lecture Unit 10 - Testing.
1 Chapter 22 Developer Testing. 2 introduction Testing is the most popular quality-improvement activity Testing is the most popular quality-improvement.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
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.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
Testing in Android. Methods Unit Testing Integration Testing System Testing Regression Testing Compatibility Testing Black Box (Functional) White Box.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Unit Testing by Jon Edgar. Structure of Presentation Structure What is Unit Testing? Worked Example Extreme Programming (XP) Implementation Limitation.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
Introduction to Software Testing Part1 Summary & Terms
Software Testing Strategies for building test group
CS427: Software Engineering I
Software Engineering (CSI 321)
Testing Tutorial 7.
A scalable approach for Test Automation in Vector CAST/Manage with
John D. McGregor Session 9 Testing Vocabulary
SOFTWARE TESTING OVERVIEW
Software Testing.
Introduction to JUnit CS 4501 / 6501 Software Testing
Chapter 8 – Software Testing
CS5123 Software Validation and Quality Assurance
Software engineering – 1
Chapter 7 Software Testing.
John D. McGregor Session 9 Testing Vocabulary
John D. McGregor Session 9 Testing Vocabulary
Strategies For Software Test Documentation
Introduction to Software Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
CS240: Advanced Programming Concepts
Software Testing & Quality Management
Informatics 43 – April 28, 2016.
Chapter 10 – Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CS310 Software Engineering Dr.Doaa Sami Khafaga
Summary.
Software Testing COM /12/2019 Testing/Spring 98.
CSE 1020:Software Development
TYPES OF TESTING.
Chapter 7 Software Testing.
Testing, Inspection, Walkthrough
Chapter 10: Testing and Quality Assurance
Software Testing.
Software Testing Strategies
Presentation transcript:

Java & Testing

Things to have been doing Join UIUC CS 126 on Piazza Get an iClicker registered Get a GitHub account Install IntelliJ on your laptop (students can get the Ultimate version for free) Review course Policies: https://courses.engr.illinois.edu/cs126 Code Review Survey https://doodle.com/poll/u7qcsvfhsaw7kqez

Why Test? Improve quality - find faults Measure quality Prove there are no faults? (Is it possible?) Determine if software is ready to be released Determine what to work on See if you made a mistake Learn the software

Testing vs. Debugging Testing is detecting errors Debugging is a means of diagnosing and correcting the root causes of errors that have already been detected.

Types of testing Unit Testing Component Testing Integration Testing Regression Testing System Testing

Types of testing Unit Testing The execution of a complete class, routine, or small program that has been written by a single programmer or team of programmers, which is tested in isolation from the more complete system. Component Testing Integration Testing Regression Testing System Testing

Two Approaches to Testing Black box testing: White box testing:

Two Approaches to Testing Black box testing: a.k.a. Behavioral Testing is a software testing method in which the internal structure/design/implementation of the item being tested is not known to the tester. White box testing: a.k.a. Structural Testing exploits knowledge of the internal structure/design/implementation of the item being tested, generally to ensure good code coverage and test potential corner cases in the implementation.

What kind of tests? Manual Good for exploratory Good for testing GUI Manual regression testing is BORING Automatic Test is a program Test is created by a tool that records user actions The only way to make testing efficient as well as effective is to automate as much as possible

Junit Open source Java testing framework for automated testing Widely used in industry Features: Assertions for testing expected results Test features for sharing common test data Test suites for easily organizing and running tests Graphical and textual test runners Primarily for unit and integration testing, not system testing

Definitions Which kind of testing is “specification testing” A) Black box testing B) White box testing

Black box testing exercise A program needs to be developed so that given an integer value it outputs 0 when the integer value is 0 it outputs 1 when the integer value > 0 It outputs -1 when the integer value < 0 What would be your black box tests? (How many do you need?)

Bag of Testing Tricks Equivalence Partitioning: If two test cases flush out exactly the same errors, you need only one of them. How many different groups of inputs are there? Test each of them. Error Guessing: guesses about where the program might have errors, based on your experience/intuition Boundary Analysis: write test cases that exercise the boundary conditions, looking for ‘off-by-one’ errors. Classes of Good Data: Nominal cases (middle-of-the-road, expected values), minimum/maximum normal configuration, compatibility with old data Classes of Bad Data: Too little data (or no data), too much data, the wrong kind of data (invalid data), the wrong size of data, uninitialized data

Test First or Test Last? (Guess) A) Test First (write tests before you write code) B) Test Last (write tests after you write code)

Test First Detect defects earlier (cheaper) Forces understanding of the requirements before you start coding Identifies problems with the requirements earlier No more effort to test first A tenet of eXtreme Programming (XP) A design technique, not a testing technique Doesn’t find bugs, but eliminates them Doesn’t measure quality, but improves it

Tic-Tac-Toe https://en.wikipedia.org/wiki/Tic-tac-toe Board description: A string with one character per board position Case-insensitive 3 vals: [x,X], [o,O], [all others] o-XxxoO.z is the board shown public enum Evaluation { InvalidInput, NoWinner, Xwins, Owins, UnreachableState }

Evaluate Board InvalidInput NoWinner Xwins Owins UnreachableState

Evaluate Board InvalidInput NoWinner Xwins Owins UnreachableState