Is it possible to run another Common Test test suite within a Common Test test case? I am writing a Common Test Hook module and need a way to test it. I figured the best way to the hook would be to define two test suite modules. One that's intended to be used with the hook, and the other to run the first suite with the hook in place and verify the results.
I tried calling ct:run_test/1
in a test case in the first module like this:
-module(ct_hook_SUITE).
my_test_case(_Config) ->
Result = ct:run_test([{suite, [ct_hook_usage_SUITE]}, {ct_hooks, [hook]}, {logdir, "logs/example_test"}]),
ct:pal("~w", [Result]),
ok.
But I got the following error:
common test {error,{error,interactive_mode}}
I don't really understand this error and there aren't any options related to interactive mode for ct:run_test/1
. Any suggestions?