Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to Test When User Sees Same Thing?

by hippo (Bishop)
on Sep 09, 2020 at 12:55 UTC ( [id://11121512]=note: print w/replies, xml ) Need Help??


in reply to How to Test When User Sees Same Thing?

Here are some things you might consider depending upon what it is you really want to achieve.

  1. Make the results different for the user (then the problem goes away). Why not tell the user that the reason for the error is that foo is more than 10 - isn't this useful information to them?
  2. If you want to continue to hide the specific error from the user for some reason then simply add in a differing response for your own use which the user won't see. This might be:
    1. Throw different exceptions
    2. Raise different warnings
    3. Return different values from the subroutine
  3. Use Devel::Cover to ensure that your test suite is exercising all the possibilities. You do have a test suite, don't you?

🦛

  • Comment on Re: How to Test When User Sees Same Thing?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121512]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found