Blue’s Support for Object-Oriented Testing By: James Majidian Christopher Nersisyan.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Programming Paradigms and languages
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Chapter 3: Modules, Hierarchy Charts, and Documentation
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
What is an object? Your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior;
Microsoft Excel 2003 Illustrated Complete with Excel Programming.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 7: Methods.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Software Engineering Principles and C++ Classes
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
1 Case Study: Starting the Student Registration System Chapter 3.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
1 Exception and Event Handling (Based on:Concepts of Programming Languages, 8 th edition, by Robert W. Sebesta, 2007)
Ranga Rodrigo. Class is central to object oriented programming.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Chapter 5CSA 217 Design in Construction Chapter 5 1.
Microsoft Visual Basic 2005: Reloaded Second Edition
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
Chapter 8: Writing Graphical User Interfaces
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Week 4 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
SE: CHAPTER 7 Writing The Program
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Week 4 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Chapter 10 Function Block Diagram
Object Oriented Software Development
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Final Review. From ArrayLists to Arrays The ArrayList : used to organize a list of objects –It is a class in the Java API –the ArrayList class uses an.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Object Oriented Programming Criteria: P2 Date: 07/10/15 Name: Thomas Jazwinski.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Chapter – 8 Software Tools.
Object-Oriented Programming: Inheritance and Polymorphism.
1.1: Objects and Classes msklug.weebly.com. Agenda: Attendance Let’s get started What is Java? Work Time.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
A Controlled Experiment in Maintenance Comparing Design Patterns to Simpler Solutions By Prechelt, Unger, Tichy, Brössler, and Votta Presentation by Chris.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Introduction to Programming and Visual Basic
Exception and Event Handling
The Object-Oriented Thought Process Chapter 1
Java Programming with BlueJ
CIS16 Application Development Programming with Visual Basic
Object-Oriented Programming: Inheritance and Polymorphism
Executive Reports, Instructions and Documentation
Presentation transcript:

Blue’s Support for Object-Oriented Testing By: James Majidian Christopher Nersisyan

Agenda  Abstract  Introduction  Reason for this article  Object Oriented Testing  Blue Environment Testing  Conclusion  Personal Thoughts  Questions?

Abstract  Reasons for Object-Oriented testing: Object-Oriented programming is commonly used for large scale projects. Object-Oriented programming is commonly used for large scale projects. Much research has been done on design and implementation, but minimal research on testing.Much research has been done on design and implementation, but minimal research on testing.  By taking an object-oriented approach to testing, this presentation will show that with appropriate tools the cost of testing will not be greatly increased.

Introduction  Reasons for Object-Oriented Large Scale Systems Excellent structuring mechanism Excellent structuring mechanism Units may be implemented separately.Units may be implemented separately. Implementation hiding Implementation hiding Internal structure of data may be hidden, and changes will not affect users of the class, simplifying maintenance.Internal structure of data may be hidden, and changes will not affect users of the class, simplifying maintenance. Software reuse Software reuse Reduction in the amount of software written improves reliability of system since tested classes may be reused.Reduction in the amount of software written improves reliability of system since tested classes may be reused.

Introduction (Cont’d)  Difficulties of Object-Oriented Testing Advantages of Object-Oriented Programming become disadvantages Advantages of Object-Oriented Programming become disadvantages AdvantagesAdvantages Excellent structuring mechanism. Excellent structuring mechanism. Implementation Hiding. Implementation Hiding. DisadvantagesDisadvantages Large number of individual units must be tested Large number of individual units must be tested State of internal data not accessible via interfaces State of internal data not accessible via interfaces Individual test cases must be developed for all units Individual test cases must be developed for all units Test cases must call each method supported by the class, prompt user for parameters and display results of method.Test cases must call each method supported by the class, prompt user for parameters and display results of method. Various combinations of these method calls must be exercised.Various combinations of these method calls must be exercised. Resulting test program may be more complex and larger than the class being testedResulting test program may be more complex and larger than the class being tested

Introduction (Cont’d)  Solutions for Object-Oriented Testing: “Debug” print statements “Debug” print statements AdvantagesAdvantages Prints out relevant internal data. Prints out relevant internal data. DisadvantagesDisadvantages Could introduce new errors. Could introduce new errors. Large volume of output may become difficult to interpret. Large volume of output may become difficult to interpret. Symbolic debugger Symbolic debugger AdvantagesAdvantages Insert break points and examine data. Insert break points and examine data. DisadvantagesDisadvantages Adds complexity. Adds complexity. May not be able to display complex link structures. May not be able to display complex link structures. Blue Blue

Introduction (Cont’d)  What is Blue? Specifically designed for testing object-oriented applications. Specifically designed for testing object-oriented applications. Graphical environment which supports interactive creation of instances of classes and interactive invocation of their methods. Graphical environment which supports interactive creation of instances of classes and interactive invocation of their methods. Ability to examine the internal state variables of objects. Ability to examine the internal state variables of objects. Allows the programmer to interactively test their classes without writing a single line of test code. Allows the programmer to interactively test their classes without writing a single line of test code. Both an object-oriented programming language and development environment. Both an object-oriented programming language and development environment.

Reason for this article  Object Oriented programming is common method of programming, but limited information exists on testing it.  We felt that it would be beneficial to all to examine one method of Object Oriented testing, the Blue environment.

Object Oriented Testing  Procedure to test a class: Create an instance of the class Create an instance of the class Call of method of the object Call of method of the object Examine the internal data of object Examine the internal data of object  This can be achieved by the inclusion of appropriate mechanisms in the program development environment.

Object Oriented Testing (cont’d)  Environment Mechanisms Mechanism 1 Mechanism 1 Interactively create an object of any class.Interactively create an object of any class. Pass parameters to object.Pass parameters to object. Once created, interactively invoke methods.Once created, interactively invoke methods. Results are displayed.Results are displayed. Mechanism 2 Mechanism 2 Environment provides an inspection facility allowing internal data to be examined.Environment provides an inspection facility allowing internal data to be examined. Results are displayedResults are displayed  Characteristic of Environment To support passing of objects, mechanisms must allow an arbitrary number of objects of arbitrary classes to be constructed. To support passing of objects, mechanisms must allow an arbitrary number of objects of arbitrary classes to be constructed.

Blue Environment Testing Project Editor The empty area at the bottom of the main window is the object bench. Once a class within a project has been compiled, objects of that class may be created. Interactive creation of objects is achieved by selecting the class and clicking the “ Create” button. An instance is interactively created and available for operation. Invoking the creation operation on a class results in a normal object creation, including the execution of the creation routine (the ‘‘ constructor” in C++/Java terminology).

Blue Environment Testing (cont’d)  Object Creation Dialogue Appears after create operation is invoked Appears after create operation is invoked Allows user to enter routine parameters. Allows user to enter routine parameters. At the top of this dialogue, the interface of the creation routine is displayed, with its header and comment. At the top of this dialogue, the interface of the creation routine is displayed, with its header and comment. Further down is a text field for entering parameter values. Further down is a text field for entering parameter values. Under the parameters is another field to provide a name for the object to be created. Under the parameters is another field to provide a name for the object to be created. The large empty area in the middle of the dialogue provides a list of previously used parameters. It is provided for convenience during testing of a class. The large empty area in the middle of the dialogue provides a list of previously used parameters. It is provided for convenience during testing of a class. Previously made calls can be easily repeated by selecting a parameter combination from the list.Previously made calls can be easily repeated by selecting a parameter combination from the list.

Blue Environment Testing (cont’d)  An object on the “Object Bench” Once the OK button is clicked in the dialogue the object is created and displayed on the object bench. Once the OK button is clicked in the dialogue the object is created and displayed on the object bench. The object is then available to the user for direct interaction. The object is then available to the user for direct interaction.

Blue Environment Testing (cont’d)  Calling a routine on an object Clicking on the object with the right mouse button displays a menu that includes all interface routines of that object. Clicking on the object with the right mouse button displays a menu that includes all interface routines of that object. Also included in the menu are two special operations available for all objects: inspect and remove. Also included in the menu are two special operations available for all objects: inspect and remove.

Blue Environment Testing (cont’d)  Symbols in the routine menu indicate whether a routine has parameters or return values.  If the routine has parameters, a parameter dialogue similar to the one seen at the creation of the object is displayed  On the click of the OK button the routine is executed and, if the routine returns results, the result values are displayed in another dialogue.

Blue Environment Testing (cont’d)  How interactive creation helps: There is no need to complete all classes in a project before the first tests can be performed. There is no need to complete all classes in a project before the first tests can be performed. Each class can be tested as soon as some of its routines have been completed. Each class can be tested as soon as some of its routines have been completed. No need to write special purpose test code.No need to write special purpose test code.

Blue Environment Testing (cont’d)  Composition During the interactive testing of the system, objects accessible on the object bench may be composed. During the interactive testing of the system, objects accessible on the object bench may be composed. i.e. one object may be passed as a parameter to the routine of another object.i.e. one object may be passed as a parameter to the routine of another object.

Blue Environment Testing (cont’d)  Inspection of Objects Inspect operation Inspect operation Allows viewing of instance data of objects that don’t provide accessor functions.Allows viewing of instance data of objects that don’t provide accessor functions. Results are displayed graphically.Results are displayed graphically. Get places object on object bench to be examined later. Get places object on object bench to be examined later. Inspect opens another dialogue for Instance variable inspection. Inspect opens another dialogue for Instance variable inspection. Inspections allow users to observe the effect of routine execution of internal data. Inspections allow users to observe the effect of routine execution of internal data.

Blue Environment Testing (cont’d) Record Facility Record Facility Textually records all interactive object creations, method invocations, return values, text input and text output.Textually records all interactive object creations, method invocations, return values, text input and text output. This helps with test documentation.This helps with test documentation.

Blue Environment Testing (cont’d)  Pedagogical Benefits Blue environment was initially developed as a teaching environment for first year students. Blue environment was initially developed as a teaching environment for first year students. Benefits as a teaching aid: Benefits as a teaching aid: Incremental developmentIncremental development No need to syntactically complete a whole application No need to syntactically complete a whole application As soon as one class or routine is completed it can be compiled, and objects can be created, executed, and tested. As soon as one class or routine is completed it can be compiled, and objects can be created, executed, and tested. Leads to greater motivation and earlier error detection (which is also beneficial for professional development). Leads to greater motivation and earlier error detection (which is also beneficial for professional development). Class/object distinction.Class/object distinction. Allowing the direct creation of and interaction with objects greatly facilitates understanding. Allowing the direct creation of and interaction with objects greatly facilitates understanding. If a student has a class “Person” and creates three different people with different names, the role of the class and the role of each object becomes much more directly understandable. If a student has a class “Person” and creates three different people with different names, the role of the class and the role of each object becomes much more directly understandable. Programming without I/OProgramming without I/O Allows a clearer understanding of the abstraction concepts if routine calls are taught before language exceptions Allows a clearer understanding of the abstraction concepts if routine calls are taught before language exceptions Interface/implementation distinctionInterface/implementation distinction Testing supportTesting support As was the goal of Blue, good testing is supported much better than in conventional systems. As was the goal of Blue, good testing is supported much better than in conventional systems.

Blue Environment Testing (cont’d)  Implementation A shell Blue class will be created and its constructor will hold the interactive call. A shell Blue class will be created and its constructor will hold the interactive call. When the shell class is compiled and executed, the interactive calls will be performed. When the shell class is compiled and executed, the interactive calls will be performed. This shell class will store the interval object’s values and this data will be shown in the result dialogue box. This shell class will store the interval object’s values and this data will be shown in the result dialogue box.

Blue Environment Testing (cont’d)  Interactive call under testing.  Blue Shell Source Code

Conclusion  Object Oriented programming has great advantages to software development, but creates difficulties in testing.  Blue has been designed to aid in testing Object Oriented programs, by reducing special purpose test code.  Blue supports incremental testing to occur early in the project, aiding the stability of the application.  Blue was created to aid teaching languages, and should be available online today.

Personal Thoughts  Its simplicity seems more detrimental than beneficial.  Blue may be an effective tool for simple unit testing, but seems too elementary for industry use.  First year students taught in the Blue environment may have trouble transitioning to actual programming environments.

Any Questions?