1

We have a setup like the following created with FitNesse for test automation:

MainPageSuite

        SetupPage
        ChildPage1Suite
                    SetupPage
                    Test
        ChildPage2Suite
                    SetupPage
                    Test

We would like to use the SetupPage(s) to define the variables that need to be used. Currently when having the variables defined on the SetupPage(s) they are not functioning. When we just define them directly in the Test page they do work.

When the variabales are on the SetupPage we receive the following error:

fit:fit.FitServer Date: 9:06:22 AM (CEST) on donderdag, april 3, 2014 Test Page: .MainPageSuite.ChildPage1Suite.Test

Command: java -cp fitnesse.jar;defaultPath fit.FitServer BDACCTEST 51439 3863 Exit code: 1 Time elapsed: 1.046 seconds Standard Error: Error: Could not find or load main class fit.FitServer

The following variables were defined:

variable defined: TEST_SYSTEM=slim 
variable defined: COMMAND_PATTERN=%m -r fitSharp.Slim.Service.Runner,c:\FitNesse\dotnet2\fitsharp.dll %p 
variable defined: TEST_RUNNER=c:\FitNesse\dotnet2\Runner.exe 

Does anyone have an idea what is wrong with our structure causing the SetupPage(s) not to work?

4

1 回答 1

2

Add the variables to the root page of the Slim tests. This could be the root of the FitNesse wiki (e.g., localhost:8080/root) if we're only doing Slim tests, or on the Slim test page or suite page if we have a mix of Slim and Fit tests in the wiki.

You may have Java paths defined. Make sure the FitNesse root (e.g., localhost:8080/root) and any other pages don't contain Java paths. If you find the following, remove them.

!path classes
!path fitnesse.jar
!path fitlibrary.jar

From http://fitsharp.github.io/Slim/GettingStarted.html

If these variables are in the set up page, FitNesse is already processing the page as a Fit Java page before it reads them, instead of a Slim .NET page.

于 2014-04-03T14:18:58.250 回答