Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday January 23, 2007
11:05 AM

Literate Functional Testing of Web Sites

[ #32240 ]

An email to a mailing list led me to remember what is probably the best testing presentation I have seen in a long time. This is Java code, but it should be easy, even easier, to do in Perl.

If someone were to write this module I strongly predict they would be a huge hero! The presentation lasts for an hour, but trust me, if you're interested in testing, particularly in testing the Web, it's mind-blowing. This conference was the Google London Test Automation Conference (LTAC) Google Tech Talks September 7th, 2006.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ...but is there a transcript or paper anywhere? I can't actually watch the video very easily..and it's quasi-impossible to cite.
    • I don't know if there is a transcript, it's an open-source project you can download from here [java.net]. From an example on that site:

      public class GoogleTest extends NavigatingLiftTestCase {

          public void testGoogleImageSearch() throws Exception {
              goTo("http://www.google.com/");
              assertThat(page, has(title("Google")));
              clickOn(link("Images"));
              enter("kizoom", into(textField()));
         

      • Oh. That looks a hell of a lot like Test::WWW::Declare that I've been working on with Audrey and my friend Nelson:

        session "check logins" => run {
                flow "basic connectivity" => check {
                        get 'http://fsck.com';
                        content should match qr{fsck.com};
                        click href qr{book};
                     
        • Nice. I look forward to a release.

          For the impatient, you can jump to 12:45 in the presentation to start seeing examples.

          One of the first ones shown looked like this:

          assertThat(TheCurrentPage,
          has(selectBox("region")
             .with( between(9,12), options()
             .including("London", "South East")));

          (which seems to be missing a closing paren on the slide.)

          It also brought to mind the ill-named-but-interesting App::SimpleScan [cpan.org]

      • which in turn sounds a bit like WWW::Mechanize, too:

                              $mech->get( $url );

                              $mech->follow_link( text_regex => qr/download this/i );

                              $mech->submit_form(
                                      form_number =
        • Did you watch the demonstration? It's a lot more than what Mech or Selenium tools allow us to do (not that there's anything wrong with the latter). It can almost completely bridge the gap between developer and customer because it reads naturally and doesn't have things like an invocant or funny words like a 'regex'. It also does one heck of a lot more than what little I've mentioned. It's pretty cool stuff.

  • Start here [cpan.org].

    And what they call "functional literate testing" looks to me like "Behavior Driven Development".