Automated Testing

version 1/090116 by Roger Carbol

  • Home page
  • Beginning
  • Previous
  • Next



  • Part 4 -- Defining the Asserting and Test-Stopping

    Understand "assert [any things]" as asserting.

    Asserting is an action out of world and applying to one thing.

    Check asserting:
    if the noun is not a test, say "Testing Error: Tried to assert [noun] but that is not a test object." instead.

    Carry out asserting:
    now testcontroller is active;
    now underway of testcontroller is the steps of the noun;
    now testname of testcontroller is the printed name of the noun;
    choose row 1 in underway of testcontroller;
    now the command of testcontroller is the command entry;
    now the response of testcontroller is the response entry;
    now the total-steps of testcontroller is the number of rows in
    the underway of testcontroller;
    now the current-step of testcontroller is 1;
    start timer.


    Understand "assert all" as allasserting.
    Allasserting is an action out of world and applying to nothing.

    Check allasserting:
    if Table of Scripts is empty, say "The Table of Scripts is empty!" instead.

    Carry out allasserting:
    write File of Scripts from the Table of Scripts;
    reboot.


    Understand "stop the test" as teststopping.

    Teststopping is an action out of world and applying to nothing.

    Check teststopping:
    if testcontroller is not active, say "You're not testing right now!" instead.

    Carry out teststopping:
    stop the test.

    Report teststopping:
    say "[line break]All tests stopped."


    To stop the test:
        stop timer;
        now testcontroller is not active;
        if the Table of Executions is not empty:
            repeat through the Table of Executions:
                blank out the whole row;
            write File of Scripts from the Table of Executions;
        if the Table of Reports is not empty:
            repeat through the Table of Reports:
                blank out the whole row;
            write File of Reports from the Table of Reports;