Second and subsequent lines of a test table fail #72

Closed
davecb opened this Issue Oct 8, 2013 · 9 comments

2 participants

@davecb

Uisng 2.0 (although this also happens under 3.0), the second line in a test table fails with then message "not found in smartrics.rest.fitnesse.fixture.RestFixture"

The screen looks like
fitnessefail

The code was:
...
!contents -R2 -g -p -f -h

!define TEST_SYSTEM {slim}
!path /usr/local/RestFixture-2.0/RestFixture.jar
!path /usr/local/RestFixture-2.0/RestFixture_fitnesse.jar

!path /usr/local/RestFixture-2.0/lib/commons-beanutils.jar
!path /usr/local/RestFixture-2.0/lib/commons-codec-1.3.jar
!path /usr/local/RestFixture-2.0/lib/commons-collections-3.2.jar
!path /usr/local/RestFixture-2.0/lib/commons-httpclient-3.1.jar
!path /usr/local/RestFixture-2.0/lib/commons-lang-2.3.jar
!path /usr/local/RestFixture-2.0/lib/commons-logging-1.1.jar
!path /usr/local/RestFixture-2.0/lib/cos.jar
!path /usr/local/RestFixture-2.0/lib/ezmorph-1.0.4.jar
!path /usr/local/RestFixture-2.0/lib/jettison-1.0.1.jar
!path /usr/local/RestFixture-2.0/lib/js.jar
!path /usr/local/RestFixture-2.0/lib/json-lib-2.2.2-jdk15.jar
!path /usr/local/RestFixture-2.0/lib/jsr173_1.0_api.jar
!path /usr/local/RestFixture-2.0/lib/PicBuilder.jar
!path /usr/local/RestFixture-2.0/lib/RestClient.jar
!path /usr/local/RestFixture-2.0/lib/xbean.jar
!path /usr/local/RestFixture-2.0/lib/xstream-1.3.1.jar

!path /usr/local/slf4j-1.7.5/slf4j-api-1.7.5.jar

#verb |uri |?ret|?headers |?body |actual
!|smartrics.rest.fitnesse.fixture.RestFixture|http://api-test.virgingaming.com/platform|
|POST|/j_spring_security_check?j_username=testuser110@test.com&j_password=vert2012&submit=Login"|250|Content-Type : text/xml|//title|
|POST|/j_spring_security_check?j_username=foo&j_password=vert2012&submit=Login"|500|Content-Type : text/xml|'some text'|

@smartrics
Owner
@smartrics
Owner
@davecb
@davecb
@davecb

I've created a new instance, with logging turned on, but instead of the problem reported I'm getting a reoccurance of the failure in the previous step, testing the installation using the example in the README.

I'm starting fitnesse with the commands

VER=2
FITNESSE=/usr/local/fitnesse/fitnesse-standalone.jar
path=${HOME}/.fitnesse${VER}

echo "Starting fitnesse server from $path on port 808${VER}"
cd $path
exec java -jar $FITNESSE -p 808${VER} -l `pwd` "$@"

when run it reports

Starting fitnesse server from /export/home/davecb/.fitnesse2 on port 8082
FitNesse (v20130530) Started...
    port:              8082
    root page:         fitnesse.wiki.FileSystemPage at ./FitNesseRoot
    logger:            /export/home/davecb/.fitnesse2
    authenticator:     fitnesse.authentication.PromiscuousAuthenticator
    page factory:      fitnesse.responders.PageFactory
    page theme:        fitnesse_straight
    page version expiration set to 14 days.

This is a new fitnesse downloaded last week.

The installation-test code is

!contents -R2 -g -p -f -h

!define TEST_SYSTEM {slim}

!path /usr/local/RestFixture-2.0/RestFixture.jar
!path /usr/local/RestFixture-2.0/RestFixture_fitnesse.jar

!path /usr/local/RestFixture-2.0/lib/commons-beanutils.jar
!path /usr/local/RestFixture-2.0/lib/commons-codec-1.3.jar
!path /usr/local/RestFixture-2.0/lib/commons-collections-3.2.jar
!path /usr/local/RestFixture-2.0/lib/commons-httpclient-3.1.jar
!path /usr/local/RestFixture-2.0/lib/commons-lang-2.3.jar
!path /usr/local/RestFixture-2.0/lib/commons-logging-1.1.jar
!path /usr/local/RestFixture-2.0/lib/cos.jar
!path /usr/local/RestFixture-2.0/lib/ezmorph-1.0.4.jar
!path /usr/local/RestFixture-2.0/lib/jettison-1.0.1.jar
!path /usr/local/RestFixture-2.0/lib/js.jar
!path /usr/local/RestFixture-2.0/lib/json-lib-2.2.2-jdk15.jar
!path /usr/local/RestFixture-2.0/lib/jsr173_1.0_api.jar
!path /usr/local/RestFixture-2.0/lib/PicBuilder.jar
!path /usr/local/RestFixture-2.0/lib/RestClient.jar
!path /usr/local/RestFixture-2.0/lib/xbean.jar
!path /usr/local/RestFixture-2.0/lib/xstream-1.3.1.jar

!path /usr/local/slf4j-1.7.5/slf4j-api-1.7.5.jar 

|Table:smartrics.rest.fitnesse.fixture.RestFixture | http://localhost:8082 |
| GET | /RestFixtureInstallTest?rss | | | //title[text()='RestFixtureInstallTest']|

and the result of running it is
/export/home/davecb/.fitnesse2/InitialFailure.png
initialfailure

@davecb davecb closed this Oct 11, 2013
@davecb davecb reopened this Oct 11, 2013
@davecb
@davecb

Ok, test with 3.0...

$ sh -x fitnesse3
+ VER=3
+ FITNESSE=/usr/local/RestFixture-3.0/lib/fitnesse-20111025.jar
+ path=/export/home/davecb/.fitnesse3
+ echo 'Starting fitnesse server from /export/home/davecb/.fitnesse3 on port 8083'
Starting fitnesse server from /export/home/davecb/.fitnesse3 on port 8083
+ cd /export/home/davecb/.fitnesse3
++ pwd
+ exec java -jar /usr/local/RestFixture-3.0/lib/fitnesse-20111025.jar -p 8083 -l /export/home/davecb/.fitnesse3
Unpacking new version of FitNesse resources.  Please be patient.
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................FitNesse (v20111024) Started...
    port:              8083
    root page:         fitnesse.wiki.FileSystemPage at ./FitNesseRoot
    logger:            /export/home/davecb/.fitnesse3
    authenticator:     fitnesse.authentication.PromiscuousAuthenticator
    html page factory: fitnesse.html.HtmlPageFactory
    page version expiration set to 14 days.

In this case the code was

!contents -R2 -g -p -f -h

!define TEST_SYSTEM {slim}

!path /usr/local/RestFixture-3.0/lib/commons-codec-1.2.jar
!path /usr/local/RestFixture-3.0/lib/commons-httpclient-3.1.jar
!path /usr/local/RestFixture-3.0/lib/commons-logging-1.0.4.jar
# but not including /usr/local/RestFixture-3.0/lib/fitnesse-20111025.jar
!path /usr/local/RestFixture-3.0/lib/jettison-1.3.2.jar
!path /usr/local/RestFixture-3.0/lib/rhino-1.7R3.jar
!path /usr/local/RestFixture-3.0/lib/slf4j-api-1.6.6.jar
!path /usr/local/RestFixture-3.0/lib/smartrics-RestClient-2.1.jar
!path /usr/local/RestFixture-3.0/lib/smartrics-RestFixture-3.0.jar
!path /usr/local/RestFixture-3.0/lib/stax-api-1.0.1.jar
!path /usr/local/RestFixture-3.0/lib/xmlpull-1.1.3.1.jar
!path /usr/local/RestFixture-3.0/lib/xpp3_min-1.1.4c.jar
!path /usr/local/RestFixture-3.0/lib/xstream-1.4.2.jar


|Table:smartrics.rest.fitnesse.fixture.RestFixture | http://localhost:8082 |
| GET | /RestFixtureInstallTest?rss | | | //title[text()='RestFixtureInstallTest']|

When I pressed "Test" I got

java.lang.Exception: Test system not started
    at fitnesse.responders.run.MultipleTestsRunner.startTestSystemAndExecutePages(MultipleTestsRunner.java:123)
    at fitnesse.responders.run.MultipleTestsRunner.executePagesInTestSystem(MultipleTestsRunner.java:106)
    at fitnesse.responders.run.MultipleTestsRunner.internalExecuteTestPages(MultipleTestsRunner.java:86)
    at fitnesse.responders.run.MultipleTestsRunner.executeTestPages(MultipleTestsRunner.java:58)
    at fitnesse.responders.run.TestResponder.performExecution(TestResponder.java:145)
    at fitnesse.responders.run.TestResponder.doSending(TestResponder.java:45)
    at fitnesse.responders.ChunkingResponder.startSending(ChunkingResponder.java:67)
    at fitnesse.responders.ChunkingResponder.access$000(ChunkingResponder.java:17)
    at fitnesse.responders.ChunkingResponder$RespondingRunnable.run(ChunkingResponder.java:106)
    at java.lang.Thread.run(Thread.java:722)

and the image
failure3

I'll email the log as the next comment...

@davecb
@smartrics
Owner

you seem to be missing a few jars.
after unzipping the restfixure zip, i assume you will find the dependency jars in some/directory

it should be sufficient to set

!path some/directory/*.jar

please re-open if the issue is still not fixed

@smartrics smartrics closed this Sep 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment