Automated Testing

version 1/090116 by Roger Carbol

  • Home page
  • Beginning
  • Previous
  • Next



  • Example: * Testing the Waters 1 - Some basic tests.

        "Testing the Waters 1"

        Include Automated Testing by Roger Carbol.

        Use timer delay of at least 100.
        Use maximum capture buffer length of at least 1024.

        Chapter 1 - The Game

        The Cabin is a room. "The front of the small cabin is entirely occupied with navigational instruments, a radar display, and radios for calling back to shore. Along each side runs a bench with faded blue vinyl cushions, which can be lifted to reveal the storage space underneath. A glass case against the wall contains several fishing rods.
        
        Scratched windows offer a view of the surrounding bay, and there is a door south to the deck. A sign taped to one wall announces the menu of tours offered by the Yakutat Charter Boat Company."

        The Cabin contains a glass case. In the glass case is a collection of fishing rods.

        The case is closed, transparent, and openable.

        The bench is in the cabin. On the bench are some blue vinyl cushions.

        The bench is enterable.

        Chapter 2 - The Tests - Not for release

        Table of Scripts (continued)
      Index  
      3  
      2  
      1  

        Verify Player Description is a test.
            The index of Verify Player Description is 1.
            The steps of Verify Player Description is the Table of Steps for Verify Player Description.

        Table of Steps for Verify Player Description
      order  command  response  
      1  "examine me"  "^As good\-looking as ever\.\n\n$"  
      2  "x myself"  "^As good\-looking as ever\.\n\n$"  

        Verify Cabin Description is a test.
            The index of Verify Cabin Description is 2.
            The steps of Verify Cabin Description is the Table of Steps for Verify Cabin Description.

        Table of Steps for Verify Cabin Description
      order  command  response  
      1  "l"  "^Cabin\nThe front of the small cabin is entirely occupied with navigational instruments, a radar display, and radios for calling back to shore\. Along each side runs a bench with faded blue vinyl cushions, which can be lifted to reveal the storage space underneath\. A glass case against the wall contains several fishing rods\.\n\nScratched windows offer a view of the surrounding bay, and there is a door south to the deck\. A sign taped to one wall announces the menu of tours offered by the Yakutat Charter Boat Company\.\n\nYou can see a glass case \(closed\) \(in which is a collection of fishing rods\) and a bench \(on which are some blue vinyl cushions\) here\.\n\n$"  
        
        Verify Rods-and-Case is a test.
            The index of Verify Rods-and-Case is 3.
            The steps of Verify Rods-and-Case is the Table of Steps for Verify Rods-and-Case.

        Table of Steps for Verify Rods-and-Case
      order  command  response  
      1  "take rods"  "^The glass case isn't open\.\n\n$"  
      2  "open case"  "^You open the glass case\.\n\n$"  
      3  "take rods"  "^Taken\.\n\n$"  
      4  "i"  "^You are carrying:.*a collection of fishing rods\n\n$"  


        test me with "assert all"