ChiliProject is not maintained anymore.
Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and
we urge all existing users to migrate their data to a maintained
system, e.g. Redmine. We will
provide a migration script later. In the meantime, you can use the
instructions by
Christian Daehn.
Forums » Develop »
[Proposal] - Improve integration tests by using webrat or capybara
Added by Eric Davis at 2011-02-27 10:36 pm
I've been doing some more integration testing in my plugins using both webrat and capybara. I think if we include one of them into ChiliProject we can do some higher level tests for actual user workflows. Since both of these actually click links and submit forms, this would make refactoring the controllers and routes less risky because they would catch some broken links.
So:
- is this a good idea?
- does any one have strong arguments against either of these?
- does any one have a preference?
- is there an alternative we can use? (no cucumbers please)
Eric Davis
P.S. Example of a complex test that clicks through several pages, fills out a form, submits a form, and checks that records were created. https://github.com/edavis10/redmine_contracts/blob/master/test/integration/deliverables_edit_test.rb#L38-65
I'm sorry that asking here.
I think this is good idea and looking for something similar to PHP script tests. That we can setup tests to fill in the form, check the pages and etc. Do you know any?
Eric Davis wrote:
- is there an alternative we can use? (no cucumbers please)
State your case against cucumber :-)
Felix Schäfer wrote:
State your case against cucumber :-)
I saw no value in having to maintain the text and the code separately. I felt like I was having to duplicate test code from the unit/functional tests in order to have cucumber working.
Eric Davis
Eric Davis wrote:
I saw no value in having to maintain the text and the code separately. I felt like I was having to duplicate test code from the unit/functional tests in order to have cucumber working.
Not the experience I've had, I haven't tried webrat nor capybara on their own though.
On a more practical side, we already use cukes at Finnlabs, are familiar with (to varying degrees), can contribute code and I think setting it up in the CI wouldn't be too hard either. I'll see if I can get our "testing evangelist" to chime in ;-)