Now that your Rule is written, it's time to test it to see if it will work as you expect.  There are two parts of testing:


  1. Checking for errors in your RuleZ code.  This makes sure that SASSIE can understand what you've written.
  2. Viewing a test shop to make sure that your RuleZ do what you want.



Checking for errors in RuleZ code

To practice checking for errors in RuleZ code, let's add a mistake to our RuleZ code, just so you can see how the error checking works.  Remove the close quote from the error message so that your RuleZ code now says:

ifQ(11)                    // if start time
.greaterThan(Q(21))       // is later than end time
.setError("ERROR: the start time cannot be later than the end time.); // then write an error message to let the shopper know


Now click the Check for Errors button at the bottom of the RuleZ window.  You see an error message that describes the problem:




Using RuleZ Map

Another way you can test your RuleZ is by simply clicking the "RuleZ Map" button at the bottom of your RuleZ set.



The RuleZ Mapper will then appear at the bottom of the screen, showing which question IDs are affected by which RuleZ, allowing you to more easily spot potential rule conflicts (conflicts are marked with the yellow background).



Viewing a test shop

To test that the Rule behaves that you think it should, click "Create a Test Shop".  


Click the links to create a test shop and then to fill it out.  Now, enter a start time that is later than the end time, to make sure that your error message is displayed as expected:





Don't just check for your error case!  Check also for what happens in other cases too (if the input is correct).  If the times are entered correctly, you do not want to see an error message!


Once you have finished testing and troubleshooting your rules, don't forget to click the Save button to save them.