RLJB wroteGuest access only works on Published site, Guest access doesn't work in test.
That is not entirely true. It is true that you can not use the guest URL in testing mode, but you can create a user with loginname, password and AccessLevel of guest. You can then login as that user in testing mode and test your guest functionality.