SPUG: March 8 Extreme Programming Meeting: Unit-Testing Techniques

JALIS,ASIM (HP-FtCollins,ex1) asim_jalis at hp.com
Tue Mar 6 18:14:51 CST 2001


I am giving a talk on Thursday at the Extreme Programming Group 
about unit-testing techniques. The talk will have some Java content 
so be warned. However, it still seems relevant here for the 
following reasons:

1. Perl has a unit-testing module (Test::Unit). The unit-testing
techniques that I will discuss (such as Mock Objects) are just as
applicable to Perl unit-testing as unit-testing in other languages.

2. There will be free pizza -- that great unifier of all 
programming language practitioners.

3. Perhaps this can inspire someone to write a better unit-testing
framework for Perl.

Here is the announcement:

EXTREME PROGRAMMING MEETING

TOPIC

    "Some Unit-Testing Techniques" by Asim Jalis

    We will tackle the following problem which comes up 
    frequently in unit-testing: How do you test objects 
    that talk to things outside the program, or have 
    external state. Examples: sockets, database code, 
    EJBs. (It is undesirable to unit-test database code 
    by hitting a live database, or to unit-test socket 
    code by sending out messages over a live wire.)

    The main idea is to use mock objects which have the 
    same method signatures as the underlying objects, 
    but which intercept the messages before they go to 
    the database or to the socket, and then serve them 
    up for unit-testing.

    This solves the problem but requires writing lots
    of mindless stub code for the mock objects. So to 
    solve this second problem I will demo a tool I have 
    developed which can generate these mock objects 
    automatically using reflection (in Java) and make
    unit-testing with mock objects painless.

    More generally this tool demonstrates how to use
    Java's reflection to autogenerate code.

    Bring your questions and insights into how to
    improve these ideas.

DATE AND SCHEDULE
    Thursday, March 8, 2001 (second Thursday of the month).
    6.30 pm - 7.00 pm : Pizza + Networking.
    7.00 pm - 9.00 pm : Presentations and Q&A.

LOCATION
    Suite 100, Lante's Main Conference Room 
    3180 139th Avenue SE
    Bellevue, WA 98005
    425.564.8800 (main desk)
  
DIRECTIONS
    I have refactored the directions into two parts. First, how to get to 
    139th Ave SE (which depends on which interstate you use) and then how 
    to get to 3180 which should be same for all cases:
  
    STEP 1: How to get to 139th Ave SE
   
    From I-405 South (going towards I-90) from Bellevue, Redmond.
        * Take exit 10 for Coal Creek Parkway and turn LEFT at the light
          as you get off the ramp onto Coal Creek Parkway.
        * Turn LEFT at Factoria Blvd (128th Av SE).
        * You will cross I-90 by going under it.
        * Turn RIGHT onto Eastgate Way SE, immediately after crossing I-90.
        * Take a LEFT at the light onto 139th Ave SE.
  
    From I-405 North (going towards I-90) from Renton.
        * Take exit 10 for Coal Creek Parkway and turn RIGHT at the light
          as you get off the ramp onto Coal Creek Parkway.
        * Turn LEFT at Factoria Blvd (128th Av SE).
        * You will cross I-90 by going under it.
        * Turn RIGHT onto Eastgate Way SE, immediately after crossing I-90.
        * Take a LEFT at the light onto 139th Ave SE
  
    From I-90 West (going towards I-405) from Bellevue, Issaquah, Redmond.
        * Take the 161st Ave SE/156th Ave SE/150th Ave SE exit (exit 11).
        * Keep LEFT at the fork in the ramp.
        * Keep RIGHT at the fork in the ramp.
        * Turn LEFT onto SE Eastgate Way.
        * Turn RIGHT onto 139th Ave SE.
  
    From I-90 East (going towards I-405) from Seattle, Mercer Island.
        * Take the Richards Road exit (exit 10).
        * Take a LEFT at the light off the exit ramp onto Richards Rd.
        * You will drive under I-90 crossing it.
        * Take the first RIGHT onto SE Eastgate Way.
        * Take a LEFT at the light onto 139th Ave SE
  
    STEP 2: How to find 3180 on 139th Ave SE
  
    * Drive past the turn for SE 32nd St.
    * 3180 will be the first building on your RIGHT. 
    * You will notice a parking entrance into the building on your RIGHT.
    * Drive into it and then drive up the parking garage to the top
      (the 4th floor) which has uncovered parking.
    * Park anywhere (parking is free).
    * The building entrance should be straight ahead and there will be 
      signs pointing to the XP meeting.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list