Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Can I make a scenario of RestFixture table?, or is there another way to make reusable components? #79

richard-delorenzi opened this Issue · 1 comment

2 participants


I have a working table:

#some javascript stuff
!define or { || }

#my stuff
!define headers { !-Authorization: Basic YWRtaW46cGFzc3dvcmQ=
Accept: application/json -! }

|setHeaders|${headers} |
|DELETE    |/q-couch | | | jsonbody.ok ${or} jsonbody.error=="not_found"  |

I now want to re-factor to make reusable component, and more readable test.
I tried this:

#what I hoped would be a reusable component.
|setHeaders|${headers} |
|DELETE|/@dbName | | |jsonbody.ok ${or} jsonbody.error=="not_found"  |   

#A more readable test

When I press test I get The instance scriptTableActor. does not exist on every line in the scenario, within the script.

Is what I am doing valid? What am I doing wrong?


I have never tried RestFixture in scenarios. You'll have to investigate it.
Rest fixture doesn't lend itself at that sort of things though. The point is to explicitly capture interactions on your API for test and documentation purposes.
If you have more than one table (or part of) that look identical you probably have test duplication that you want to remove.
Typically reuse is of plumbing code or framework code.
Point being - if you are testing the DB deletion you want to explicitly test the variations using explicit sequences of api calls for test and api documentation purposes
if you need DB deletion to support your tests, hide it however you prefer.

In that context you could
1 - do your own fixture to capture that behaviour and use it alongside your RestFixture tables
2 - extend the rest fixture to expose that behaviour as methods to be used in the rest fixture.

@smartrics smartrics closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.