Cucumber nagios / webrat presents empty forms

I'm a complete newbie with ruby ​​and start using cucumber nagios to test BDD.

I installed cucumber-nagios on my Mac Pro using the instructions here:

http://auxesis.github.com/cucumber-nagios/

My Mac works with Snow Leapord 10.6.6 and has a ruby ​​1.8.7.

I created some simple functions for mechanizing form submission. However, no matter how hard I try, when I submit the form, the values ​​of the form fields are not transmitted with the request. Errors are not returned (except for the error message for the last step on the expected response page).

Thinking that maybe the forms were too complicated, I used the very simple form on the w3 website as the simplest test case.

http://www.w3schools.com/html/html_forms.asp

The submitted form is as follows:

Username:

and these are my actions:

When I go to "http://www.w3schools.com/html/html_forms.asp"

And I fill in "user" with "Chinese"

And I press "Submit"

Then I should see "user=Chinese"

Filling out the form is done using the standard step code supplied with cucumber-nagios at http_steps.rb =>

When /^I fill in "(.*) with "(.*)"$/ do | field, value|
    fill_in(field, :with => value)
end

At startup

cucumber-nagios features/form.feature

all the steps go through, except for the last one, and the status of the HTML response, I did not send any data with my form.

I have turned on Webrat logging, but this does not provide any useful information.

As I said, I tried similar code on other websites and forms with exactly the same results.

The only thing I can think of is that I have lost some vital part of the whole cucumber-nagios plant. Do I need to create and configure a database, for example, with Rails applications? Excuse my ignorance.

+3
source share
1 answer

, , webrat .

, , webrat, Rails, .

features/support/env.rb , cucumber-nagios .

Webrat.configure do |config|
 config.mode = :rails
 config.open_error_files = false
end

" Cucumber-Nagios" , .

+1

All Articles