Topic: Integration testing with rspec and capybara

I am writing integration tests using rspec and capybara.

Something I would like to see is more detailed output and listing of steps as the tests run.

For example the workflow I am testing goes something like this

1) Enter data (data1) in form 1
2) Verify data1 appears on page 2
3) Add extended data to the original entry using form 2
4) Verify page associated with the data entered has been updated
5) Use web interface to manipulate the data1 and conclude the workflow

All of these steps have caused issues at one time or another so I feel the need to test them in detail.  The issue is with my current test configuration choices is that I end up with one long line in the test description -- while I know what the test is doing its not very friendly when I'm showing it to users and managers. 

it "enters data in form 1, verifies it on page two, updates it on form2, verifies it on an associated page and uses the web ui to updated the data and close the workflow"

I could break it down in to five separate tests, but then each step would need to call all of the preceding steps (ie step 3 would need to run all of step 1 and 2).

Is there a better way to do this?  Maybe I missed a fundamental concept.

In short, I would like a better way to list more detailed output in my integration tests.

Thanks for any input! smile

Last edited by deco10 (2012-08-03 10:52:34)