Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Challenges

Writing perl unit tests which need to simulate a web browser with cookie support connecting to a server from multiple network interfaces is challenging. Why would I need to do that? Well, when you work for a company whose business is providing controlled internet access to hotels, these sorts of things come up.

I’m not asking for help — I already know how to approach the problem. I’m just stating a fact. You know, in case anybody was curious about what I’m working on these days.

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in Hardware, Personal, Tech, Work and tagged , . Bookmark the permalink.

4 Responses to Challenges

  1. Alex says:

    Not sure if you’re coding in PHP or not, if so this couold be useful.

  2. Nope, this doesn’t involve any PHP, just Perl (Apache/mod_perl, Mason). But I’m always happy to have links to good PHP resources 🙂

  3. Peter says:

    Are you using WWW::Mechanize?

  4. Yes, we’re using WWW::Mechanize for the browser emulation. The tricky part for my testing is that I need to simulate a computer which switches network interfaces. For example, a laptop that first connects via a wired ethernet port, then later connects via a wireless interface.

    To test this, I have to change the MAC address of my test computer on the fly, as well as mucking about with our custom subclass of WWW::Mechanize.

Leave a Reply

%d bloggers like this: