Loading ...
Sorry, an error occurred while loading the content.

the LectroTest framework for Perl

Expand Messages
  • bauhaus@metaperl.com
    QUOTE: Unit testing is like finding needles in a haystack. The haystack is your code s behavior. The needles are erroneous behavior. Traditional unit testing
    Message 1 of 3 , Feb 17, 2005
    View Source
    • 0 Attachment
      QUOTE:

      Unit testing is like finding needles in a haystack. The haystack is
      your code's behavior. The needles are erroneous behavior.

      Traditional unit testing practices require us to point out to the
      computer each and every piece of hay in the haystack that we want to
      check for errors. Hey, computer, check that piece of hay, please. Now
      this one. Now this one, too. And over here, thank you. And, yes, that
      one, too... That's a tedious process that grows old fast.

      LectroTesting is different. Rather than pointing out the individual
      pieces of hay, we merely point out the shape of the haystack. We also
      tell the computer what a needle looks like, in general, so it will
      know if it sees one along the way.

      The computer takes care of the rest. It hunts through the haystack
      until it finds a needle or we tell it to stop. If it finds a needle,
      it outputs a counterexample t wrong, and we can add it to a list of
      regression tests for future testing.

      That's the idea, in a nutshell. A much better explanation can be found
      in the slides for my talk on LectroTest.

      SOURCE: http://community.moertel.com/ss/space/LectroTest

      CPAN module:

      [29] Test-LectroTest-0.201 - Easy, automatic, specification-based
      tests
      Uploaded: 16 Feb 2005
      CPAN id: TMOERTEL (Tom Moertel)
      Package: Test-LectroTest-0.201
      URL: http://search.cpan.org/dist/Test-LectroTest


      --
      Carter's Compass: I know I'm on the right track when,
      by deleting something, I'm adding functionality.
    • Ed Grimm
      ... I d prefer something like the described Haskell module, which apparently creates unit tests. That is, I d like the module to build a test file, which does
      Message 2 of 3 , Feb 20, 2005
      View Source
      • 0 Attachment
        On Thu, 17 Feb 2005 bauhaus@... wrote:

        > QUOTE:
        >
        > Unit testing is like finding needles in a haystack. The haystack is
        > your code's behavior. The needles are erroneous behavior.
        >
        > Traditional unit testing practices require us to point out to the
        > computer each and every piece of hay in the haystack that we want to
        > check for errors. Hey, computer, check that piece of hay, please. Now
        > this one. Now this one, too. And over here, thank you. And, yes, that
        > one, too... That's a tedious process that grows old fast.
        >
        > LectroTesting is different. Rather than pointing out the individual
        > pieces of hay, we merely point out the shape of the haystack. We also
        > tell the computer what a needle looks like, in general, so it will
        > know if it sees one along the way.
        >
        > The computer takes care of the rest. It hunts through the haystack
        > until it finds a needle or we tell it to stop. If it finds a needle,
        > it outputs a counterexample t wrong, and we can add it to a list of
        > regression tests for future testing.
        >
        > That's the idea, in a nutshell. A much better explanation can be found
        > in the slides for my talk on LectroTest.
        >
        > SOURCE: http://community.moertel.com/ss/space/LectroTest

        I'd prefer something like the described Haskell module, which apparently
        creates unit tests. That is, I'd like the module to build a test file,
        which does not depend upon the LectroTest module being installed on the
        end user's machine. Yes, I know I could include the module in my
        packages. But running a machine with five different perl installs, due
        to vendors feeling the same way about perl in general demonstrates the
        problem of this thought process.

        Ed
      • Adrian Howard
        On 20 Feb 2005, at 20:58, Ed Grimm wrote: [snip] ... [snip] I don t understand why generated unit tests would be any more useful than including the module with
        Message 3 of 3 , Feb 21, 2005
        View Source
        • 0 Attachment
          On 20 Feb 2005, at 20:58, Ed Grimm wrote:
          [snip]
          > I'd prefer something like the described Haskell module, which
          > apparently
          > creates unit tests. That is, I'd like the module to build a test file,
          > which does not depend upon the LectroTest module being installed on the
          > end user's machine. Yes, I know I could include the module in my
          > packages. But running a machine with five different perl installs, due
          > to vendors feeling the same way about perl in general demonstrates the
          > problem of this thought process.
          [snip]

          I don't understand why generated unit tests would be any more useful
          than including the module with your tests ?

          Adrian
        Your message has been successfully submitted and would be delivered to recipients shortly.