lundi 10 octobre 2016

How to set up a FitNesse suite hierarchy that executes “SuiteSetUp” only once?

I currently have the following structure for my suite: • OuterSuite • SuiteSetUp • InnerSuite1 • SuiteSetUp • Test1 • Test2 • Test3 • SuiteTearDown • InnerSuite2 • SuiteSetUp • Test1 • Test2 • Test3 • SuiteTearDown

In 'SuiteSetUp' I have some initialization which have to be made only once before the test starts. But 'SuiteSetUp' gets added up and gets executed for each and every 'Test1', 'Test2', 'Test3' of InnerSuite1 and InnerSuite2 leading to errors in the system to be checked.

I want 'SuiteSetUp' to be executed only once when the 'OuterSuite' is called and not for every 'Test1', 'Test2', 'Test3' of InnerSuite1 and InnerSuite2. I looked at FitNesse documentation but unable to find any help. Is there a possibility to run 'SuiteSetUp' only once at the beginning and exclude it for further tests??.

Aucun commentaire:

Enregistrer un commentaire