1TestML(3)             User Contributed Perl Documentation            TestML(3)
2
3
4

NAME

6       TestML - A Generic Software Testing Meta Language
7

SYNOPSIS

9           # file t/testml/encode.tml
10           %TestML 0.1.0
11
12           Title = 'Tests for AcmeEncode'
13           Plan = 3
14
15           *text.apply_rot13 == *rot13
16           *text.apply_md5   == *md5
17
18           === Encode some poetry
19           --- text
20           There once was a fellow named Ingy,
21           Combining languages twas his Thingy.
22           --- rot13
23           Gurer bapr jnf n sryybj anzrq Vatl,
24           Pbzovavat ynathntrf gjnf uvf Guvatl.
25           --- md5: 7a1538ff9fc8edf8ea55d02d0b0658be
26
27           === Encode a password
28           --- text: soopersekrit
29           --- md5: 64002c26dcc62c1d6d0f1cb908de1435
30
31       This TestML document defines 2 assertions, and defines 2 data blocks.
32       The first block has 3 data points, but the second one has only 2.
33       Therefore the rot13 assertion applies only to the first block, while
34       the the md5 assertion applies to both. This results in a total of 3
35       tests, which is specified in the meta Plan statement in the document.
36
37       To run this test you would have a normal test file that looks like
38       this:
39
40           use TestML;
41           use t::Bridge;
42
43           TestML->new(
44               testml => 'testml/encode.tml',
45               bridge => 't::Bridge',
46           )->run;
47
48       The apply_* functions are defined in the bridge class that is specified
49       outside this test ("t/Bridge.pm").
50

DESCRIPTION

52       TestML is a generic, programming language agnostic, meta language for
53       writing unit tests. The idea is that you can use the same test files in
54       multiple implementations of a given programming idea. Then you can be
55       more certain that your application written in, say, Python matches your
56       Perl implementation.
57
58       In a nutshell you write a bunch of data tests that have inputs and
59       expected results. Using a simple syntax, you specify what functions the
60       data must pass through to produce the expected results. You use a
61       bridge class to write the data functions that pass the data through
62       your application.
63
64       In Perl 5, TestML is the evolution of the Test::Base module. It has a
65       superset of Test:Base's goals. The data markup syntax is currently
66       exactly the same as Test::Base.
67

SEE ALSO

69       ·   <http://www.testml.org/>
70
71       ·   <irc://irc.freenode.net#testml>
72

AUTHOR

74       Ingy döt Net <ingy@cpan.org>
75
77       Copyright 2009-2014. Ingy döt Net.
78
79       This program is free software; you can redistribute it and/or modify it
80       under the same terms as Perl itself.
81
82       See <http://www.perl.com/perl/misc/Artistic.html>
83
84
85
86perl v5.28.0                      2017-01-11                         TestML(3)
Impressum