问题
I have a SetUp page at the root level which works fine. However, when I add a subwiki in FitNesse and I want to put a SetUp page at the level of the subwiki. This gets included but then the root level SetUp doesn't.
For example, with the following structure:
Foo suite
SetUp
TestPage
Bar suite
SetUp
NestedTestPage
How do I get FitNesse to include both SetUp pages in NestedTestPage?
回答1:
There is only one way I know of that you could do this. If you included the parent manually into the child.
So then in your FooSuite.BarSuite.SetUp you had the following line:
!include .FrontPage.FooSuite.SetUp
This would then include the Foo suite page in your Bar SetUp.
The general rule though is that any page has only one SetUp, so you have to force your way around it.
回答2:
if you don't want to include the complete path to the outer Setup, you can use the following syntax
!include -c <FooSuite.SuiteSetUp
来源:https://stackoverflow.com/questions/10684735/how-to-include-all-ancestral-setup-pages-in-fitnesse-subwikis