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.
ChallengesRelated posts:
- Job Interview 2: Return of the Interview
" Remember that telephone interview I had, and how I was hoping to get a call back for a second interview? I had just about..." - Wireless
" Here at home, we have a wireless network, necessitated by the fact that the house we’re renting is not wired for networking. The problem..." - Drinking the Ubuntu Kool-Aid
" For quite a while, I had considered nuking Windows from my laptop and starting fresh. A few weeks ago, I finally took the plunge...." - Another new start
" About two weeks ago, I started a new job (which explains at least part of my blogging lull, you see). I’m working on Free..." - Sprint courting bloggers?
" I mentioned in yesterday’s post that I’d have something about the Samsung A920 phone coming up. I don’t have the phone yet, but when..."















4 Comments
Not sure if you’re coding in PHP or not, if so this couold be useful.
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
Are you using WWW::Mechanize?
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.