Open rvijai92 opened 5 years ago
setUpClass
will only be invoked once at the initialization stage of class TestSuite
or TestCase
. Here is an example of how to run cases together https://github.com/AirtestProject/my-testflow/blob/master/testflow/scripts/multitests_together.py . Please note that together means all testcases will be run without a guaranteed sequence. If u really want simultaneously, u have to connect multiple smart phones.
more differences about setUpClass
and setUp
. setUpClass
of each TestCase or TestSuite invoke before running all testcases, while setUp is invoking just at the beginning of the TestSuite or TestCase.
a sequence flow looks like:
...setUpClass -> setUp1 -> tearDown1 -> setUp2 -> tearDown2 -> ...tearDownClass
Thanks adolli, If there are 10 test cases, Will be able to write that 10 test cases in the 10 .py modules. So every time SetUp, setUpClass, tearDown and tearDownClass will it be invoked right for Every test run. In that scenario, Every time app will be closed and reopened often for each runTest().
Base Module: (.py) SetUpClass: SetUp: TearDown: TearDownClass:
TestCase1 module( Extends with Base): runTest:
TestCase2 module( Extends with Base): runTest:
TestCase3 module( Extends with Base): runTest:
TestCase4 module( Extends with Module 1): runTest:
Questions:
pocounit.run(xxx)
where xxx is your testcase or testsuite. @rvijai92 sorry for the inconvenience and late reply, i am too busy all the time.
Hi, I have done the setup for multiple test cases to run using pocotestsuite module but whenever executing runner file, only listening to the setUp() function, not listening the setUpClass(). Can you provide clear details on how to execute the multiple test cases simultaneously.