[Purdue-pm] A Testing Question

Dave Jacoby jacoby.david at gmail.com
Thu Jun 11 10:01:14 PDT 2020

This is the kind of thing that would send to Gizmo as a "Rubber Duck
Debugging" thing, but I don't believe the answer to this is with in my
head, where explaining it in depth will bring it out, or in Gizmo's, where
he could ask insightful questions and break my mental logjam.

I'm testing a feature in our web tool, which uses PSGI. I have a some tests
in a branch off master, and I have added $self->{use_feature} = 1 to the
tests, and they pass.

These tests involve having *X* as a cookie, *munge(X)* as a field in the
form, and the application taking both from input, and testing if *remunge(X)
== munge(X)*. This means I have to tease the *munge(X)* field out of the
output, and this combines my unfamiliarity with testing syntax, *Test::More*
and *Test::WWW::Mechanize::PSGI* (as well as *WWW::Mechanize* itself) with
the standard "can you parse HTML?" problem. (see:

At this point in the process, I want to be able to tell the application
"This should be in the form, and this should be a cookie" and test if those
values come out. I'm looking in MetaCPAN and in our tests and I'm not
seeing much about testing cookies.

Dave Jacoby
jacoby.david at gmail.com

“There is nothing obvious”
    — Theo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/purdue-pm/attachments/20200611/52181f56/attachment.html>

More information about the Purdue-pm mailing list