Each common test suite can have a "data" directory. This directory can contain anything you want. For example, a test suite mytest_SUITE , can have mytest_SUITE_data/ "data" directory. The path to data directory can be obtained from the Config parameter in test cases.
someTest(Config) ->
DataDir = ?config(data_dir, Config),
%% TODO: do something with DataDir
?assert(false). %% include eunit header file for this to work
Running tests in parallel
To run tests in parallel you need to use groups. Add a group/0 function to the test suite
groups() -> ListOfGroups.
Each member in ListOfGroups is a tuple, {Name, Props, Members} . Name is an atom, Props is list of properties for the groups, and Members is a list of test cases in the group. Setting Props to [parallel|OtherProps] will enable the test cases in the group to be executed in parallel.
2条答案
按热度按时间lqfhib0f1#
Short answer: No.
Long answer: No. I even tried using Ghost Functions
And… as soon as I add the undefined function handler,
rebar3 ct
start reporting…Clearly common test is also using the fact that some functions are undefined to work. 🤷♂️
dgenwo3n2#
Data Directory
Each common test suite can have a "data" directory. This directory can contain anything you want. For example, a test suite
mytest_SUITE
, can havemytest_SUITE_data/
"data" directory. The path to data directory can be obtained from theConfig
parameter in test cases.Running tests in parallel
To run tests in parallel you need to use groups. Add a
group/0
function to the test suiteEach member in
ListOfGroups
is a tuple,{Name, Props, Members}
.Name
is an atom,Props
is list of properties for the groups, andMembers
is a list of test cases in the group. SettingProps
to[parallel|OtherProps]
will enable the test cases in the group to be executed in parallel.Dynamic Test Cases
Checkout cucumberl project.