On 23/05/17 02:28, iaw4 wrote:

  1. I am still running in morbo development mode.  My error messages are deliberately worded for end users, and rely on "die ...".   When I switch to production and/or hypnotoad, how can I show these errors to the user?  is there a standard route I can use for this?  (Any other aspects to hypnotoad that I should become aware of at this stage?)
If your errors show up in the development exception page, you probably want to make a custom production exception page (hypnotoad's default is very tight-lipped, and reveals nothing) - see here (the 2nd code block)
http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages
  1. I have good tests for my Model (which also build a sample site).  Alas, I don't have automated tests for the web controller.  I don't want to learn fancy tools like selenium.  I really only want to send URLs, click on buttons, enter into form elements, maybe go forward-backward-browser, and test that the resulting page has a certain display.  the easier the scripting the better.  does anyone have a good suggestion without much learning curve?

Check out Test::Mojo perhaps? As long as you don't need actual client rendering (_javascript_, etc), it works pretty well.
http://mojolicious.org/perldoc/Test/Mojo#SYNOPSIS
Perhaps the tests in Joel Berger's Galileo can show how it's used in a full application:
https://metacpan.org/source/JBERGER/Galileo-0.042/t/basic.t

--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to