Save and Test Parsing Set |
Top Previous Next |
As you're setting up your parsing rules, it's helpful to test them frequently to see how they're working. You'll probably want to do this after each new rule is added at first, but don't get lazy about it -- you should test it with various combinations of data before trying it for real requests.
Entering Test Data
When you click "Save & Test Parsing Set" on the Edit Parsing Set dialog, a large window will open where you can enter sample data, for instance a sample E-mail that would need to be parsed. You can type in the data manually, or copy and paste it from another program.
If you already have an E-mail request that you've received, then naturally you would want to use that to test with. Just copy/paste the E-mail text into this window. However it gets even easier the next time -- the last test data used with each parsing set is saved in the database, so you don't have to paste it in each time. Of course you will eventually want to test with various requests with different data, etc. to make sure it works for any possible combination.
E-mail Message Text
When testing the parsing rules for E-mail requests that you expect to eventually have Campground Master retrieve directly from your E-mail box, you should include the full header and raw text as it comes from the POP3 server. Depending on your E-mail program, this means selecting a "Full header" option, or perhaps a "View Source" option to see the raw E-mail text. If you can't find a way to do this, then you may need to get the E-mail request connection portion functioning so you can actually retrieve an E-mail from the server through Retrieve Online Reservations, then copy that E-mail text from the "email.txt" file (where Campground Master puts retrieved messages). If you're working with Reservation Friend requests instead of E-mail requests, the E-mail text will be in the file "email_friend.txt" instead.
Testing the Rules
Once you have the test data entered, click "Test". It will parse the data using the current parsing rules for this set, and also check to make sure the Identifying Text for the set is present. If there's an error in the rules definition or other serious error, it will show an error message. If there is no error that aborts the parsing, then the Online Reservation Request Details dialog will be shown, just as if you're processing a request received the normal way. Any fields parsed successfully from the data will be shown in the list, so you can check the accuracy of the parsing rules. Of course the "Save" functions are disabled since this is just a test.
Further Topics: