Hi All,
I would like to get a better feel for how the unit tests run with respect to
dependence/independence among tests both within the same test module and across
test modules.
So, for example, I am working on a unit test module that looks like this
— policyengine.cpp —
TEST(PolicyEngine, ServerInit)
{
...
result = OCInit(NULL, 0, OC_SERVER);
...
}
TEST(PolicyEngineCore, Anonymous) { … }
TEST(PolicyEngineSvr, Anonymous) { … }
TEST(PolicyEngine, ServerStop)
{
...
result = OCStop();
...
}
Questions:
Will these tests be run in the same process, i.e will the OCInitI() in the
first test apply to the state of the server in subsequent tests?
I have some evidence that this is the case
Will these tests be run sequentially and serially, i.e. can I assume that the
test with OCInit() will be run first, and to completion, prior to the next test
being run, and can I assume that all of the remaining tests will have completed
before the last test with OCStop() is run?
I have some evidence that this is NOT the case
Do the tests in policyengine.cpp run in an independent process i.e. can I
assume that the OCInit() / OCStop() will have no impact on unit tests running
from other modules.
I have some evidence that this is NOT the case
You insights are appreciated.
Kind Regards
Steve
_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev