1420
1422
(erlang-skel-separator 2)
1421
"%% Function: all(Clause) -> Descr | TestCases | {skip,Reason}" n
1423
"%% Function: all(Clause) -> Descr | Spec | {skip,Reason}" n
1423
1425
"%% Clause = doc | suite" n
1424
1426
"%% Indicates expected return value." n
1425
1427
"%% Descr = [string()] | []" n
1426
"%% String that describes the test suite." n
1427
"%% TestCases = [TestCase] " n
1428
"%% TestCase = atom()" n
1429
"%% Name of a test case." n
1428
"%% String that describes the test suite." n
1429
"%% Spec = [TestCase]" n
1430
"%% A test specification." n
1431
"%% TestCase = ConfCase | atom()" n
1432
"%% Configuration case, or the name of a test case function." n
1433
"%% ConfCase = {conf,Init,Spec,End} |" n
1434
"%% {conf,Properties,Init,Spec,End}" n
1435
"%% Init = End = {Mod,Func} | Func" n
1436
"%% Initialization and cleanup function." n
1437
"%% Mod = Func = atom()" n
1438
"%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]" n
1439
"%% Execution properties of the test cases (may be combined)." n
1440
"%% Shuffle = shuffle | {shuffle,Seed}" n
1441
"%% To get cases executed in random order." n
1442
"%% Seed = {integer(),integer(),integer()}" n
1443
"%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |" n
1444
"%% repeat_until_any_ok | repeat_until_any_fail" n
1445
"%% To get execution of cases repeated." n
1446
"%% N = integer() | forever" n
1430
1447
"%% Reason = term()" n
1431
1448
"%% The reason for skipping the test suite." n
1433
"%% Description: Returns a description of the test suite (doc) and a" n
1434
"%% list of all test cases in the suite (suite)." n
1450
"%% Description: Returns a description of the test suite when" n
1451
"%% Clause == doc, and a test specification (list" n
1452
"%% of the conf and test cases in the suite) when" n
1453
"%% Clause == suite." n
1435
1454
(erlang-skel-separator 2)
1436
1455
"all(doc) -> " n >
1437
1456
"[\"Describe the main purpose of this suite\"];" n n
1526
1546
(erlang-skel-separator 2)
1547
"%% Function: init_per_group(GroupName, Config0) ->" n
1548
"%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
1550
"%% GroupName = atom()" n
1551
"%% Name of the test case group that is about to run." n
1552
"%% Config0 = Config1 = [tuple()]" n
1553
"%% A list of key/value pairs, holding configuration data for the group." n
1554
"%% Reason = term()" n
1555
"%% The reason for skipping all test cases and subgroups in the group." n
1557
"%% Description: Initialization before each test case group." n
1558
(erlang-skel-separator 2)
1559
"init_per_group(_GroupName, Config) ->" n >
1562
(erlang-skel-separator 2)
1563
"%% Function: end_per_group(GroupName, Config0) ->" n
1564
"%% void() | {save_config,Config1}" n
1566
"%% GroupName = atom()" n
1567
"%% Name of the test case group that is finished." n
1568
"%% Config0 = Config1 = [tuple()]" n
1569
"%% A list of key/value pairs, holding configuration data for the group." n
1571
"%% Description: Cleanup after each test case group." n
1572
(erlang-skel-separator 2)
1573
"end_per_group(_GroupName, _Config) ->" n >
1576
(erlang-skel-separator 2)
1527
1577
"%% Function: init_per_testcase(TestCase, Config0) ->" n
1528
1578
"%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
1554
1604
"%% Description: Cleanup after each test case." n
1555
1605
(erlang-skel-separator 2)
1556
1606
"end_per_testcase(_TestCase, _Config) ->" n >
1559
1609
(erlang-skel-separator 2)
1560
"%% Function: sequences() -> Sequences" n
1562
"%% Sequences = [{SeqName,TestCases}]" n
1563
"%% SeqName = atom()" n
1564
"%% Name of a sequence." n
1565
"%% TestCases = [atom()]" n
1566
"%% List of test cases that are part of the sequence" n
1568
"%% Description: Specifies test case sequences." n
1610
"%% Function: groups() -> [Group]" n
1612
"%% Group = {GroupName,Properties,GroupsAndTestCases}" n
1613
"%% GroupName = atom()" n
1614
"%% The name of the group." n
1615
"%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]" n
1616
"%% Group properties that may be combined." n
1617
"%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]" n
1618
"%% TestCase = atom()" n
1619
"%% The name of a test case." n
1620
"%% Shuffle = shuffle | {shuffle,Seed}" n
1621
"%% To get cases executed in random order." n
1622
"%% Seed = {integer(),integer(),integer()}" n
1623
"%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |" n
1624
"%% repeat_until_any_ok | repeat_until_any_fail" n
1625
"%% To get execution of cases repeated." n
1626
"%% N = integer() | forever" n
1628
"%% Description: Returns a list of test case group definitions." n
1569
1629
(erlang-skel-separator 2)
1570
"sequences() -> " n >
1573
1633
(erlang-skel-separator 2)
1574
"%% Function: all() -> TestCases | {skip,Reason}" n
1634
"%% Function: all() -> GroupsAndTestCases | {skip,Reason}" n
1576
"%% TestCases = [TestCase | {sequence,SeqName}]" n
1636
"%% GroupsAndTestCases = [{group,GroupName} | TestCase]" n
1637
"%% GroupName = atom()" n
1638
"%% Name of a test case group." n
1577
1639
"%% TestCase = atom()" n
1578
1640
"%% Name of a test case." n
1579
"%% SeqName = atom()" n
1580
"%% Name of a test case sequence." n
1581
1641
"%% Reason = term()" n
1582
"%% The reason for skipping all test cases." n
1642
"%% The reason for skipping all groups and test cases." n
1584
"%% Description: Returns the list of test cases that are to be executed." n
1644
"%% Description: Returns the list of groups and test cases that" n
1645
"%% are to be executed." n
1585
1646
(erlang-skel-separator 2)
1586
1647
"all() -> " n >
1587
"[a_test_case]." n n
1648
"[my_test_case]." n n
1590
1651
(erlang-skel-separator 2)
1620
1681
"%% A comment about the test case that will be printed in the html log." n
1622
1683
"%% Description: Test case function. (The name of it must be specified in" n
1623
"%% the all/0 list for the test case to be executed)." n
1624
(erlang-skel-separator 2)
1625
"a_test_case(Config) -> " n >
1684
"%% the all/0 list or in a test case group for the test case" n
1685
"%% to be executed)." n
1686
(erlang-skel-separator 2)
1687
"my_test_case(_Config) -> " n >
1690
"*The template of a library module.
1691
Please see the function `tempo-define-template'.")
1693
(defvar erlang-skel-ct-test-suite-s
1694
'((erlang-skel-include erlang-skel-large-header)
1695
"-compile(export_all)." n n
1697
"-include(\"ct.hrl\")." n n
1699
(erlang-skel-separator 2)
1700
"%% Function: suite() -> Info" n
1701
"%% Info = [tuple()]" n
1702
(erlang-skel-separator 2)
1704
"[{timetrap,{seconds,30}}]." n n
1706
(erlang-skel-separator 2)
1707
"%% Function: init_per_suite(Config0) ->" n
1708
"%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
1709
"%% Config0 = Config1 = [tuple()]" n
1710
"%% Reason = term()" n
1711
(erlang-skel-separator 2)
1712
"init_per_suite(Config) ->" n >
1715
(erlang-skel-separator 2)
1716
"%% Function: end_per_suite(Config0) -> void() | {save_config,Config1}" n
1717
"%% Config0 = Config1 = [tuple()]" n
1718
(erlang-skel-separator 2)
1719
"end_per_suite(_Config) ->" n >
1722
(erlang-skel-separator 2)
1723
"%% Function: init_per_group(GroupName, Config0) ->" n
1724
"%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
1725
"%% GroupName = atom()" n
1726
"%% Config0 = Config1 = [tuple()]" n
1727
"%% Reason = term()" n
1728
(erlang-skel-separator 2)
1729
"init_per_group(_GroupName, Config) ->" n >
1732
(erlang-skel-separator 2)
1733
"%% Function: end_per_group(GroupName, Config0) ->" n
1734
"%% void() | {save_config,Config1}" n
1735
"%% GroupName = atom()" n
1736
"%% Config0 = Config1 = [tuple()]" n
1737
(erlang-skel-separator 2)
1738
"end_per_group(_GroupName, _Config) ->" n >
1741
(erlang-skel-separator 2)
1742
"%% Function: init_per_testcase(TestCase, Config0) ->" n
1743
"%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}" n
1744
"%% TestCase = atom()" n
1745
"%% Config0 = Config1 = [tuple()]" n
1746
"%% Reason = term()" n
1747
(erlang-skel-separator 2)
1748
"init_per_testcase(_TestCase, Config) ->" n >
1751
(erlang-skel-separator 2)
1752
"%% Function: end_per_testcase(TestCase, Config0) ->" n
1753
"%% void() | {save_config,Config1}" n
1754
"%% TestCase = atom()" n
1755
"%% Config0 = Config1 = [tuple()]" n
1756
(erlang-skel-separator 2)
1757
"end_per_testcase(_TestCase, _Config) ->" n >
1760
(erlang-skel-separator 2)
1761
"%% Function: groups() -> [Group]" n
1762
"%% Group = {GroupName,Properties,GroupsAndTestCases}" n
1763
"%% GroupName = atom()" n
1764
"%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]" n
1765
"%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]" n
1766
"%% TestCase = atom()" n
1767
"%% Shuffle = shuffle | {shuffle,{integer(),integer(),integer()}}" n
1768
"%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |" n
1769
"%% repeat_until_any_ok | repeat_until_any_fail" n
1770
"%% N = integer() | forever" n
1771
(erlang-skel-separator 2)
1775
(erlang-skel-separator 2)
1776
"%% Function: all() -> GroupsAndTestCases | {skip,Reason}" n
1777
"%% GroupsAndTestCases = [{group,GroupName} | TestCase]" n
1778
"%% GroupName = atom()" n
1779
"%% TestCase = atom()" n
1780
"%% Reason = term()" n
1781
(erlang-skel-separator 2)
1783
"[my_test_case]." n n
1785
(erlang-skel-separator 2)
1786
"%% Function: TestCase() -> Info" n
1787
"%% Info = [tuple()]" n
1788
(erlang-skel-separator 2)
1789
"my_test_case() -> " n >
1792
(erlang-skel-separator 2)
1793
"%% Function: TestCase(Config0) ->" n
1794
"%% ok | exit() | {skip,Reason} | {comment,Comment} |" n
1795
"%% {save_config,Config1} | {skip_and_save,Reason,Config1}" n
1796
"%% Config0 = Config1 = [tuple()]" n
1797
"%% Reason = term()" n
1798
"%% Comment = term()" n
1799
(erlang-skel-separator 2)
1800
"my_test_case(_Config) -> " n >
1628
1803
"*The template of a library module.