Unit Testing LEVEL GAME.  Create pieces array  Call move or interact  Use getters or return type to verify correct behavior  Test ends (don’t go GameEngine.BOARD_SIZE-1)

Slides:



Advertisements
Similar presentations
Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Advertisements

SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Introduction to Software Engineering Lecture 11 André van der Hoek.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
1 CODE TESTING Principles and Alternatives. 2 Testing - Basics goal - find errors –focus is the source code (executable system) –test team wants to achieve.
1 Software Testing and Quality Assurance Lecture 15 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Program Testing Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Illinois Institute of Technology
Testing an individual module
1 Software Testing and Quality Assurance Lecture 14 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Recall The Team Skills Analyzing the Problem
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
What Exactly are the Techniques of Software Verification and Validation A Storehouse of Vast Knowledge on Software Testing.
Test Design Techniques
BY: GARIMA GUPTA MCA FINAL YEAR WHAT IS SOFTWARE TESTING ? SOFTWARE TESTING IS THE PROCESS OF EXECUTING PROGRAMS OR SYSTEM WITH THE INTENT.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
1 Software Testing (Part-II) Lecture Software Testing Software Testing is the process of finding the bugs in a software. It helps in Verifying and.
TESTING.
Software Testing (Part 2)
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
Introduction Telerik Software Academy Software Quality Assurance.
CMSC 345 Fall 2000 Unit Testing. The testing process.
1 Phase Testing. \ 2 Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine subphases) Define Coding Standards.
From Use Cases to Test Cases 1. A Tester’s Perspective  Without use cases testers will approach the system to be tested as a “black box”. “What, exactly,
Testing in UP1 Testing as part of the Unified Process (UP)
CSE403 Software Engineering Autumn 2001 More Testing Gary Kimura Lecture #10 October 22, 2001.
Testing Testing Techniques to Design Tests. Testing:Example Problem: Find a mode and its frequency given an ordered list (array) of with one or more integer.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Construction Lecture 18 Software Testing.
(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.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Black Box Testing : The technique of testing without having any knowledge of the interior workings of the application is Black Box testing. The tester.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
CSC 480 Software Engineering Testing - I. Plan project Integrate & test system Analyze requirements Design Maintain Test units Implement Software Engineering.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Testing i. explain the importance of system testing and installation planning;
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Unit Testing LEVEL GAME.  Syntax varies based on framework  TDD goals are the same regardless.
Software Testing.
Testing Verification and the Joy of Breaking Code
Software Testing.
White-Box Testing Pfleeger, S. Software Engineering Theory and Practice 2nd Edition. Prentice Hall, Ghezzi, C. et al., Fundamentals of Software Engineering.
Black Box Testing PPT Sources: Code Complete, 2nd Ed., Steve McConnell
Software Engineering (CSI 321)
CompSci 230 Software Construction
Recall The Team Skills Analyzing the Problem
Some Simple Definitions for Testing
Chapter 13 & 14 Software Testing Strategies and Techniques
WHITEBOX TESTING APPROACH
UNIT-4 BLACKBOX AND WHITEBOX TESTING
CS240: Advanced Programming Concepts
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.
Software Verification and Validation
Software Verification and Validation
CSE403 Software Engineering Autumn 2000 More Testing
Software Verification and Validation
CSE 1020:Software Development
TYPES OF TESTING.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing.
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Unit Testing LEVEL GAME

 Create pieces array  Call move or interact  Use getters or return type to verify correct behavior  Test ends (don’t go GameEngine.BOARD_SIZE-1)  If interact with adjoining piece, put that piece & yours on board  If interact within range, be sure to test locations within range PLUS one beyond TEST INDIVIDUAL PIECES

 Can’t test random behavior deterministically  Need to run method multiple times  Do all possible results actually occur?  Do the possible results account for ALL results? (i.e., no invalid moves)  What if LOTS of valid results? (e.g., any location)  Test ends  Identify “categories” of possibilities  If limited number of possibilities, test each one  E.g., move one to right or left TEST RANDOM MOVEMENT

 What if the player is within “range” of more than one piece?  We’re not testing this, but the approach would be:  Create a GameEngine  Create a pieces array  Add a setter to GameEngine for the pieces array  Call interaction TEST INTERACTION

BLACK BOX VS WHITE BOX CriteriaBlack Box TestingWhite Box Testing Definition Black Box 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 is a software testing method in which the internal structure/ design/ implementation of the item being tested is known to the tester. Levels Applicable To Mainly applicable to higher levels of testing: Acceptance Testing System Testing Mainly applicable to lower levels of testing: Unit Testing Integration Testing ResponsibilityGenerally, independent Software TestersGenerally, Software Developers Programming Knowledge Not RequiredRequired Implementation Knowledge Not RequiredRequired Basis for Test Cases Requirement SpecificationsDetail Design From:

 Analyze control flow graph  Find linearly independent paths of execution  Guarantees complete branch coverage  Does not cover all possible paths   BASIS PATH TESTING (WHITE BOX)

 Method to test all the possible discrete combinations of the parameters involved.  ALL PAIRS TESTING