Automated Testing

version 1/090116 by Roger Carbol

  • Home page
  • Beginning
  • Previous
  • Next



  • Part 7 -- The Turn Sequence Rule

    This is the handle test response rule:
        if testcontroller is active:
            now testcontroller is stable;
            stop capturing text;
            say "[line break][captured text]";
            let captext be text;
            change captext to "[captured text]";
            if captext matches the regular expression the response of testcontroller:
                say "[first custom style][unicode success sign] success: [index of testcontroller] [testname of testcontroller], step [current-step of testcontroller][roman type] -- matched '[response of testcontroller]'[line break]";
                choose a blank row in Table of Reports;
                change index entry to index of testcontroller;
                change step entry to current-step of testcontroller;
                change result entry to 0;
                write File of Reports from the Table of Reports;
            otherwise:
                say "[second custom style][unicode failure sign] FAIL: [index of testcontroller] [testname of testcontroller], step [current-step of testcontroller][roman type] -- did not match '[response of testcontroller]'[line break]";
                choose a blank row in Table of Reports;
                change index entry to index of testcontroller;
                change step entry to current-step of testcontroller;
                change result entry to 1;
                write File of Reports from the Table of Reports;
            if the current-step of testcontroller is the total-steps of testcontroller:
                reboot;
            otherwise:
                increase the current-step of testcontroller by 1;
                choose row the current-step of testcontroller in underway of testcontroller;
                now the command of testcontroller is the command entry;
                now the response of testcontroller is the response entry.


    The handle test response rule is listed last in the turn sequence rules.