質問

I'm starting with Selenium and FitNesse. My goal is to create an acceptance tests suite which can be run easily in different browsers.

At first I wrote a very short wrapper around Seleniums WebDriver. The wrapper functions are used in Scenario Tables, Script Tables and Query Tables. So far, everything is fine.

My idea was to create a wiki page hierarchy called ParameterizedSuites, which has sub-suites and tests in any possible depth. Now I wanted to create one suite called FirefoxSuite defining an variable ${BROWSER} with value "firefox" and include the ParameterizedSuites only. In ParameterizedSuites.SuiteSetUp a WebDriver instance will be instantiated using ${BROWSER}.

But my idea does not work. It seems that I must include every SetUp, TearDown, Suite and Test page seperately? Is my idea completely wrong or am I missing something?

Does anybody something similar?

Hope my description is clear enough to understand the scenario.

Kind regards, Andi

役に立ちましたか?

解決

I think what you want is SymbolicLinks. You can use Symbolic Links to include a subtree of the wiki into a different place in the wiki.

For more information on SymbolicLinks, check your local users guide or the copy online: http://www.fitnesse.org/FitNesse.UserGuide.FitNesseWiki.SymbolicLinks

A common way to do this is to actually create your ParameterizedSuite and then symbolically link it into the Pages that define the configuration and supply specialized SetUp and TearDown pages. This is sort of the oposite of what you are describing, but I think what you are doing could work as well, provided you use SymbolicLinks to make the pages part of the wiki structure of your parameterized tests.

FrontPage
  SuiteOne
     TestOne
  ConfigurationOne
     SetUp
     TearDown
     SuiteOneSymolicLink
  ConfigurationTwo
     SetUp
     TearDown
     SuiteOneSymolicLink

In the structure above, SuiteOne can be run via the symbolic link in ConfigurationOne or ConfigurationTwo. Variables defined in the ConfigurationOne or ConfigurationTwo pages will inherit to SuiteOne when is is run via the SuiteOneSymbolicLink in each configuration hierarchy. Additionally, the SetUp and TearDown from the Confiugration Pages will be inherited as well.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top