Page 1 of 1

When is SETUP section executed?

Posted: Tue Dec 13, 2016 5:18 pm
by aterrong
Hi all,
I usually create my TestSuite with this structure:

TestSuite
- Setup
- TestCase1
- TestCase2
...
- TestCaseN

If I run the entire suite setup is executed.

But if I run separate TestCases individually it's NOT executed.

Is there any way I can make sure that setup is run before EVERY TestCase (e.g. as the setUp() method in JUnit)

Thanks.

Re: When is SETUP section executed?

Posted: Tue Dec 13, 2016 5:43 pm
by krstcs
The SETUP/TEARDOWN section for the suite is ONLY run when the suite is run.

However, there are SETUP/TEARDOWN sections for EACH TEST CASE as well. You could put your setup modules in those sections if you want them run when the test case is run without the suite.