[erlang-questions] Testing of nifs
Lukas Larsson
lukas@REDACTED
Mon Oct 3 14:46:09 CEST 2011
Hi!
There are also built-in functions within common_test which allows you to
start erlang slaves. See http://www.erlang.org/doc/man/ct_slave.html for
details.
You could create tests in common_test which in the init_per_testcase
function start the slave node and then kills it in the end_per_testcase
function. We use this extensively to test common_test and lots of other
functionality within Erlang/OTP.
Lukas
On 01/10/11 16:57, Joseph Norton wrote:
> I'm not aware of any test frameworks for doing this sort of thing automatically.
>
> The stdlib's slave application is one (easy) way to implement your own framework.
>
> Here is a recipe for starting, restarting, and stopping slave nodes.
>
> https://github.com/norton/qc/blob/dev/src/qc_slave.erl
>
> Your test case(s) can then use the kernel's rpc application to invoke tests and/or commands on slave node(s).
>
> regards,
>
> Joe N.
>
>
> Joseph Norton
> norton@REDACTED
>
>
>
> On Oct 1, 2011, at 5:48 PM, Michael Uvarov wrote:
>
>> Hello,
>>
>> How to test NIFs?
>> I need to run different vms for each test case. Is there a test
>> framework which allows this?
>>
>> --
>> Best regards,
>> Uvarov Michael
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list