Test-A8N - Story Driven Development tools

konobi on 2008-04-11T17:30:36

NACHBAUR recently released Test-A8N to CPAN. This is a tools that we've been developing here for a while at work and thankfully Sophos have agreed to let us release this to the masses.

So, Test-A8N is a wrapper around Test-FITesque that we use to do story driven development around features that are needed in our product. To start out with, our QA persons along with our product manager decide what is needed and end up coming out with something like:

ID:     admin_creates_system_administrator_in_same_timezone

TAGS:
    - timezone

SUMMARY: |

    This test case verifies that when an admin creates a new user,
    if the admin does not specify the new user's timezone, it defaults to the same timezone as the admin.

PRECONDITIONS:
    - reset user list to: default state
    #- set system timezone to: Vancouver, Canada/Pacific

INSTRUCTIONS:

    - login:
        to page: Administrators
    - modify user:
        username: admin
        current password:    testpass
        timezone:   &test_tz Dawson Creek
    - add user:
        username: new_user
        role: helpdesk
    - logout 
    - login:
        as: new_user
    - is current time in timezone: *test_tz
    - verify timezone label: "All times displayed in: (GMT-07:00) Dawson Creek"

EXPECTED: 

    - After the admin changes their timezone and adds a new user, the
      default timezone displayed in the Add User popup is now the admin's
      new timezone.
    - After logging in as the newly created user,
      the log status bar displays the time in the timezone of the admin.

Now we, the developers have a good idea of what behaviour is expected from the feature. But hold on... that looks rather like... oh... it is... it's YAML.

So now we have human readable, but parsable information which we can use to automate testing this feature with (btw, A8N is shorthand for automation). Test-A8N provides the ability to slurp in YAML files and have it execute tests based on the instructions in the YAML.

For us to get "acceptance" on a story/feature, we must make sure that the automation is written, fixture classes spruced up and that all the tests pass. It's been working out great for us, working with a fleet of machines, multiple web technologies (WWW::Mech, Selenium, LWP, etc) along with controlling the fleet of machines via SSH, serial connections and more.

Hopefully someone else will find the idea useful.

ta!

--
-Scott McWhirter- | -konobi-


Nice!

stu42j on 2008-04-11T18:16:41

That sounds pretty cool. I will definitely have to try it out if I ever find time to work on my testing project.

Ha!

hex on 2008-04-12T20:53:29

I pretty much wrote that, or most of it, back in 2003 when I was working at Fotango. Then someone higher up the chain told me to drop it as it was a bad idea. Well, I liked it. Good work, I hope people do great things with it.