Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    TestML 0.27

    Download button

    No screenshots available
    Downloads: 114  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ingy d%uFFFDt Net | More programs
    Perl Artistic License / FREE
    September 22nd, 2012, 09:06 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    TestML description

    A Generic Software Testing Meta Language

    TestML is a Perl generic, programming language agnostic, meta language for writing unit tests. The idea is that you can use the same test files in multiple implementations of a given programming idea. Then you can be more certain that your application written in, say, Python matches your Perl implementation.

    In a nutshell you write a bunch of data tests that have inputs and expected results. Using a simple syntax, you specify what functions the data must pass through to produce the expected results. You use a bridge class to write the data transform functions that pass the data through your application.

    In Perl 5, TestML is the evolution of the Test::Base module. It has a superset of Test:Base's goals. The data markup syntax is currently exactly the same as Test::Base.

    SYNOPSIS

     # file t/testml/encode.tml
     %TestML 1.0

     Title = 'Tests for AcmeEncode';
     Plan = 3;

     *text.apply_rot13 == *rot13;
     *text.apply_md5 == *md5;

     === Encode some poetry
     --- text
     There once was a fellow named Ingy,
     Combining languages twas his Thingy.
     --- rot13
     Gurer bapr jnf n sryybj anzrq Vatl,
     Pbzovavat ynathntrf gjnf uvf Guvatl.
     --- md5: 7a1538ff9fc8edf8ea55d02d0b0658be

     === Encode a password
     --- text: soopersekrit
     --- md5: 64002c26dcc62c1d6d0f1cb908de1435


    This TestML document defines 2 assertions, and defines 2 data blocks. The first block has 3 data points, but the second one has only 2. Therefore the rot13 assertion applies only to the first block, while the the md5 assertion applies to both. This results in a total of 3 tests, which is specified in the meta Plan statement in the document.

    To run this test you would have a normal test file that looks like this:

     use TestML::Runtime::TAP;

     TestML::Runtime::TAP->new(
     testml => 'testml/encode.tml',
     bridge => 't::Bridge',
     )->run();


    or more simply:

     use TestML -run,
     -testml => 'testml/encode.tml',
     -bridge => 't::Bridge';


    The apply_* transform functions are defined in the bridge class that is specified outside this test (t/Bridge.pm).


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    programming language | meta language | Perl module | Perl | programming | meta

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM