Blue - PowerPoint PPT Presentation

About This Presentation
Title:

Blue

Description:

Under the parameters is another field to provide a name for the object to be created. ... on the object with the right mouse button displays a menu that includes all ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 26
Provided by: Chris1458
Learn more at: https://www.ecs.csun.edu
Category:
Tags: blue

less

Transcript and Presenter's Notes

Title: Blue


1
Blues Support for Object-Oriented Testing
  • By
  • James Majidian
  • Christopher Nersisyan

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

3
Abstract
  • Reasons for Object-Oriented testing
  • Object-Oriented programming is commonly used for
    large scale projects.
  • 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.

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

5
Introduction (Contd)
  • Difficulties of Object-Oriented Testing
  • Advantages of Object-Oriented Programming become
    disadvantages
  • Advantages
  • Excellent structuring mechanism.
  • Implementation Hiding.
  • Disadvantages
  • Large number of individual units must be tested
  • State of internal data not accessible via
    interfaces
  • 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.
  • Various combinations of these method calls must
    be exercised.
  • Resulting test program may be more complex and
    larger than the class being tested

6
Introduction (Contd)
  • Solutions for Object-Oriented Testing
  • Debug print statements
  • Advantages
  • Prints out relevant internal data.
  • Disadvantages
  • Could introduce new errors.
  • Large volume of output may become difficult to
    interpret.
  • Symbolic debugger
  • Advantages
  • Insert break points and examine data.
  • Disadvantages
  • Adds complexity.
  • May not be able to display complex link
    structures.
  • Blue

7
Introduction (Contd)
  • What is Blue?
  • Specifically designed for testing object-oriented
    applications.
  • 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.
  • 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.

8
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.

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

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

11
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).

12
Blue Environment Testing (contd)
  • Object Creation Dialogue
  • Appears after create operation is invoked
  • 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.
  • 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.
  • 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.

13
Blue Environment Testing (contd)
  • 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.
  • The object is then available to the user for
    direct interaction.

14
Blue Environment Testing (contd)
  • 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.
  • Also included in the menu are two special
    operations available for all objects inspect and
    remove.

15
Blue Environment Testing (contd)
  • 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.

16
Blue Environment Testing (contd)
  • How interactive creation helps
  • 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.
  • No need to write special purpose test code.

17
Blue Environment Testing (contd)
  • Composition
  • 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.

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

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

20
Blue Environment Testing (contd)
  • Pedagogical Benefits
  • Blue environment was initially developed as a
    teaching environment for first year students.
  • Benefits as a teaching aid
  • Incremental development
  • 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.
  • Leads to greater motivation and earlier error
    detection (which is also beneficial for
    professional development).
  • Class/object distinction.
  • 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.
  • Programming without I/O
  • Allows a clearer understanding of the abstraction
    concepts if routine calls are taught before
    language exceptions
  • Interface/implementation distinction
  • Testing support
  • As was the goal of Blue, good testing is
    supported much better than in conventional
    systems.

21
Blue Environment Testing (contd)
  • Implementation
  • 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.
  • This shell class will store the interval objects
    values and this data will be shown in the result
    dialogue box.

22
Blue Environment Testing (contd)
  • Interactive call under testing.
  • Blue Shell Source Code

23
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.

24
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.

25
Any Questions?
Write a Comment
User Comments (0)
About PowerShow.com