diff --git a/JoseTorrez/cucumber_session_1/dry_run b/JoseTorrez/cucumber_session_1/dry_run new file mode 100644 index 0000000..78bbed5 --- /dev/null +++ b/JoseTorrez/cucumber_session_1/dry_run @@ -0,0 +1,80 @@ +==> With dry-run +*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows +Feature: search customer + + # + #Copy Right + # + Scenario: Search a customer # search_customer.feature:5 + Given goes to Customer page search # search_customer.feature:6 + When I fill the search field # search_customer.feature:7 + And I click on submit button # search_customer.feature:8 + Then The search result shows every customer with coincidences in the search # search_customer.feature:9 + +1 scenario (1 undefined) +4 steps (4 undefined) + +You can implement step definitions for undefined steps with these snippets: + +Given(/^goes to Customer page search$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +When(/^I fill the search field$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +When(/^I click on submit button$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +Then(/^The search result shows every customer with coincidences in the search$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +==> Without dry-run +*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows +Feature: search customer + + # + #Copy Right + # + Scenario: Search a customer # search_customer.feature:5 + Given goes to Customer page search # search_customer.feature:6 + When I fill the search field # search_customer.feature:7 + And I click on submit button # search_customer.feature:8 + Then The search result shows every customer with coincidences in the search # search_customer.feature:9 + +1 scenario (1 undefined) +4 steps (4 undefined) +0m0.037s + +You can implement step definitions for undefined steps with these snippets: + +Given(/^goes to Customer page search$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +When(/^I fill the search field$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +When(/^I click on submit button$/) do + pending # Write code here that turns the phrase above into concrete actions +end + +Then(/^The search result shows every customer with coincidences in the search$/) do + pending # Write code here that turns the phrase above into concrete actions +end +==> Conclusion + +-Without --dry-run +This run all feature with step definition and you see a result with pass, error,undefined of feature + +1 scenario (1 pending) +4 steps (3 skipped, 1 pending) + +-With --dry-run +This only the file feature +1 scenario (1 skipped) +4 steps (4 skipped) \ No newline at end of file diff --git a/JoseTorrez/cucumber_session_1/features/search_customer.feature b/JoseTorrez/cucumber_session_1/features/search_customer.feature new file mode 100644 index 0000000..80a6766 --- /dev/null +++ b/JoseTorrez/cucumber_session_1/features/search_customer.feature @@ -0,0 +1,15 @@ +Feature: search customer +# +#Copy Right +# + Scenario: Search a customer + Given goes to Customer page search + When I fill the search field + And I click on submit button + Then The search result shows every customer with coincidences in the search + + Scenario: create a customer + Given goes to the main page + When I create a new customer + And I click on Save Button + Then The message "Successfully saved" is shown \ No newline at end of file diff --git a/JoseTorrez/cucumber_session_1/features/step_definitions/my_steps.rb b/JoseTorrez/cucumber_session_1/features/step_definitions/my_steps.rb new file mode 100644 index 0000000..3176afb --- /dev/null +++ b/JoseTorrez/cucumber_session_1/features/step_definitions/my_steps.rb @@ -0,0 +1,31 @@ +Given(/^goes to Customer page search$/) do + puts "HOLA" +end + +Then(/^The search result shows every customer with coincidences in the search$/) do + pending +end + +When(/^I fill the search field$/) do + pending +end + +And(/^I click on submit button$/) do + pending +end + +Given(/^goes to the main page$/) do + pending +end + +When(/^I create a new customer$/) do + pending +end + +And(/^I click on Save Button$/) do + pending +end + +Then(/^The message "([^"]*)" is shown$/) do |arg| + pending +end \ No newline at end of file diff --git a/JoseTorrez/cucumber_session_1/research b/JoseTorrez/cucumber_session_1/research new file mode 100644 index 0000000..1d4b04c --- /dev/null +++ b/JoseTorrez/cucumber_session_1/research @@ -0,0 +1,67 @@ +Research : + 1.- When and why BDD was defined + When + BDD is a methodology on develop of SW since 2003 + + Why + This is a Collaboration, Helps a business and its technical + team deliver software that fulfils business goals. + + 2.- The most important aspects of BDD + + This is a Guide with an approach to development that improves communication between business + and technical teams to create software with business value. + + 3.- Why is useful and when could be applied. + + This is useful for all people that have don't knowledge + about develop a software or a little knowledge. + + When + Is a direct communication PO <-> DEV <-> QA + + 4.-Which type of teams could implement BDD + + BDD is to provide a single answer to what many Agile teams view as separate activities: the creation + of unit tests and "technical" code on one hand, the creation of functional tests and "features" on the + other hand. This should lead to increased collaboration between developers, test specialists, and domain experts + + 5.- Structure of a feature – Give an example + + The structure of a feature is Feature - Background - Scenario - step + Example: + + Feature: Serve coffee + Coffee should not be served until paid for + Coffee should not be served until the button has been pressed + If there is no coffee left then money should be refunded + + + 6.- Structure of a user story – Give an example + + Is Feature - Background - Scenario - step + Feature: Serve coffee + Coffee should not be served until paid for + Coffee should not be served until the button has been pressed + If there is no coffee left then money should be refunded + Scenario: Buy last coffee + Given there are 1 coffees left in the machine + And I have deposited 1$ + When I press the coffee button + Then I should be served a coffee + + + 7.- Structure of a scenario – Give an example + The structure of a scenario is Feature - Background - Scenario - step + + Scenario: Buy last coffee + Given there are 1 coffees left in the machine + And I have deposited 1$ + When I press the coffee button + Then I should be served a coffee + + 8.- Differences between BDD and BDT + The differences between BDD and BDT is that: + + BDT is focused on testing + BDD is focused behavior \ No newline at end of file diff --git a/features/support/env.rb b/features/support/env.rb new file mode 100644 index 0000000..e69de29