Testing Archives

Showcasing Test::TinyMocker

For a while we've been using in Dancer a few mocking subroutines that we've put together quite elegantly as TinyMocker in our 't/lib' folder to assist us in tests.

However, with time we've been asked (okay, Sukria has been asked) to separate this so others could use it outside of Dancer. Sukria has released this as Test::TinyMocker.

Test::TinyMocker allows to mock subroutines (be it in object oriented or basic packaged subroutines). Here is how it will look:


What I would change about POE::Test::Helpers

Since plunging into the event-based programming world POE offers, I've been infatuated with combining the tests I've learned to write (Perl Testing Handbook FTW!), which proved to be a pesky task.

Writing tests was fun, writing POE was a bit difficult for me at first and combining them seemed close to impossible.

I started off by using MooseX::POE by (++Chris Prather) and it helped me instantaneously understand and write event-based code. However, with time I learned to se…

Dist::Zilla strictures tip

So, mst wrote up strictures which basically bundles the "Kensho" pragmas, so to speak: strict, warnings (FATAL!), no indirect (vpit++). It plans for clean separation of different versions so you can maintain compatibility using specific versions of the pragma. How nifty is that? That's right, very nifty!

I'm using Dist::Zilla with Dist::Zi…

Perl on Android, progressing...

First, the meeting:

I arrived a bit late but hadn't missed much. Gabor was in the middle of explaining the benefits of getting Perl on Android. He went over a lot of API examples, showing code and explaining and doing a damn goo job at it!

After that, I tried to explain how to install the Android emulator on a Linux machine, configure it and run it. My slides weren't displaying properly on the projector so it was annoying to explain and probably harder to understand.

Then Shmuel went over perl512delta and explained to us the bigger differences and their implications. H…

Elegance Fail

Elegance might seem like a lost trait in programming these days, but it is live and vibrant in Perl. A rather large part of the Test namespace is devoted to providing an elegant way to write "run this code, get the result, compare it with this one".

Today I found myself at a loss of an elegant solution to a problem.

I want to run a set of tests. Theoretically I can write each subset of tests as a Role in a test object (there are at ="http://search.cpa…

Hello Clarity

For two weeks we've been working hard on defining a rather complex construct of DNS zone files, using multiple servers for multiple domains with cross referencing them and a lot of other complex-sounding terms.

We wrote DNS tests for the zones to make sure all the servers are configured correctly and the general DNS fetching provides correct information. This turned out to be quite difficult.

The original script is 130 lines. This is without taking into account even more testing we wanted. There was a lot of analyzing done which was rather repetitive and the overall code was u…

Testing for Fun and Profit


Yesterday I presented him the idea of tests and showed him Test::More. Yo…

Tests Are Divine

One of the first posts on my old journal (which I still don't know if I want to copy the entries here) was entitled Tests are Heavenly. In that post I wrote about how I started adopting TDD for administration purposes.

Recently I've been getting CPANTS reports (<3 CPANTS!) on my WWW::FMyLife module. At first I thought my tests were off. Yesterday I finally got down to take a c…

About Sawyer X

user-pic Gots to do the bloggingz