Test-Driven Development in Perl: How To Set Up Your Testing Environment For Perl TDD
The Genealogy Webmaster’s Journal is a series of articles advancing the technological State of the Art underlying our online genealogy.
Test-Driven Development has several flavors when practiced in Perl. I was looking for a way to transfer my experience with jUnit, PHPUnit, and CppUTest to my Perl development. I have created a set-up that works for me, and I thought I’d share that with you!
This essay does not contain a lot of explanation. I’m assuming you can follow the links and read the tutorials. If you’re like me, the missing piece is the working setup – how the files are organized for my test environment.
How to Use Test::Class for Perl Unit Testing and Perl TDD
So far, the Perl CPAN module Test::Class seems to fill the bill. Start by reading the documentation:
- Test::Class Read this page from top to bottom. Take particular note of the section, “Help for confused jUnit users.” See the “Community” section for links on where to discuss and get help.
- Test::More Test::Class sits on top of Test::More, so be sure to read this documentation and tutorial if you’re not already familiar with how this style of Perl testing works. Note the links to “Related Modules” at the upper right of this page.
- Test::Tutorial A more complete tutorial for Test::Simple and Test::More.
- Prove We will use the Perl Application, prove, to run our tests.
Perl Testing Bookmarks Including Perl CGI Testing
I also found the following articles useful: Read more…
Categories: Perl Webmastery Tags: Perl CGI testing, Perl TDD, Perl Test Driven Development, Perl testing, Perl unit testing, Perl xUnit testing, Webmaster testing
File Ownership: Web Server Secrets, Part 2
Let’s start with perhaps the trickiest concept of all – file ownership.
I’m sure you’re too young to recall this, but back in the mid 20th century, there was something known as a typewriter. A typewriter typically had one owner – that is, any specific typewriter was only used by one person.
In the same way, your laptop or desktop computer is probably a single-user machine. You don’t need to worry about working around or interfering with somebody else’s files. You might worry about people snooping, but that’s a different issue. Generally speaking, each person has his or her own personal computer.
Departmental Computing
There was, of course, a gap between everyone (or everyone’s secretary) having a typewriter, and everyone having their own personal computer. We had computers, but they were shared. On a small to medium scale, we had departmental computers. Each person had their own account. Same computer, different accounts, just like your local bank. That’s how we kept things separate.
That’s when Unix came to be. Unix evolved on medium-sized computers, in universities and research laboratories. Same computer, different accounts. Therefore, the idea of ownership became extremely important. Every file, every transaction is owned by somebody, and who that somebody is, makes a difference as to how that transaction is handled. Later, when Linux came along, Linux took on precisely the same concepts of file ownership. Read more…
Categories: Web Site Security Tags: apache security, linux file permissions, linux security, unix file permissions, unix security, web site security
Web Server Secrets, Part 1: About This Series of Articles
I wrote this series under the title Server Secrets more than a decade ago. I wrote this article as a means of gaining credibility while investigating groups of pay site hackers. I published my results as How to Hack a Pay Site and I Can Hack You.
By time my articles were published, I was “sysadmin” for various hackers’ boards, and amongst at least one “elite” circle. When my investigations were published, I was thrown out of everywhere, of course, though one hacker in Denmark wrote to tell me he’d been laughing for days. He was very impressed!
Internet Billing Companies Learned
Two internet billing companies did change their software as a result of my published investigations and techniques. Read more…