-
Notifications
You must be signed in to change notification settings - Fork 1
Grouping Tests
Future support planned.
Using the -easy_group([Opt])
module (where Opt is a 2-tuple), common_test groups can be fully customized, including their parent group (what easy_test calls a context) and options like sequence
and shuffle
. Tests belonging to a group can also be listed in this module attribute as opposed to using -easy_test(...)
(although, currently, the level of customization is the same as using the 'test_' prefix but support for customization like the easy_test module attribute is planned). If a context is not specified the group will be in the list returned by all/0.
The following Opt 2-tuples are required:
-
{group, GroupName::atom()}
- the name of the group.
The following are optional:
-
{context, Context::atom()}
- the parent group. Defaults toall
. -
{opts, [atom()]}
- list of opts used in the group specification. This is the same list as the second element in a group tuple returned by groups/0 in a common_test suite. -
{tests, [atom()]}
- list of test names that are part of the group. Tests are automatically exported just like if they were prefixed withtest_
or if specified witheasy_test(...).
.
The 2-tuple {group, GroupName::atom()}
can be one of the elements in an -easy_test(...)
attribute. If given, the test will be part of the group, GroupName
. If is not specified with a corresponding -easy_group(...)
then all
will be GroupName
's parent group.