Talk given by Joseph Wilk at Scotland on Rails 2009. Examines how Cucumber and Rspec fit together in the testing workflow, how and why Cucumber is useful and how it works. Walks through a simple example based on renting DVDs showing how to use Cucumber and some of the best practices. Looks at how Webrat can drive Selenium to in-turn drive Cucumber features through the browser.
Software projects are rarely on-spec, on-time and on-budget, and the primary cause is miscommunication. As Martin Fowler says, there is a "yawning crevasse of doom" between stakeholders and developers, full of misunderstanding. How do you make sure that you're building something that adds value? How do you know you're building the thing that was asked for? How does your bottom line affect user experience?
Into the fray leaps Cucumber, a business-readable DSL combined with an awesome Ruby library that lets domain experts express business requirements as executable user stories. We'll cover outside-in, story-driven development with Cucumber, how to write effective stories, and how to make Cucumber work for your project.
(as given to CharlotteRuby on Jan 6, 2010)
Describes Outside-In development and Behvaiour Driven Development. Illustrates basic Cucumber usage within a Rails app and then goes over more advanced topics such as JS as web services.
Software projects are rarely on-spec, on-time and on-budget, and the primary cause is miscommunication. As Martin Fowler says, there is a "yawning crevasse of doom" between stakeholders and developers, full of misunderstanding. How do you make sure that you're building something that adds value? How do you know you're building the thing that was asked for? How does your bottom line affect user experience?
Into the fray leaps Cucumber, a business-readable DSL combined with an awesome Ruby library that lets domain experts express business requirements as executable user stories. We'll cover outside-in, story-driven development with Cucumber, how to write effective stories, and how to make Cucumber work for your project.
(as given to CharlotteRuby on Jan 6, 2010)
Describes Outside-In development and Behvaiour Driven Development. Illustrates basic Cucumber usage within a Rails app and then goes over more advanced topics such as JS as web services.
If you are new to WordPress, but already know how to program, the typical "Hello, World" examples aren't helpful. You need to know how to make the right API calls, and where to find documentation about the actions and filters that WordPress makes available to you.
This presentation is a brief introduction skimming the surface of the API hook system in WordPress. It does not go into deep detail, but gives brief "real world" examples of how to use filters and actions, along with pointers on where to find the main documentation that will help you get started on your own plugins.
Implementing Testing for Behavior-Driven Development Using CucumberTechWell
With the behavior-driven development (BDD) methodology, development teams write high level, plain natural language tests to describe and exercise a system. Unfortunately, it is difficult to develop BDD tests that encompass all interfaces and write tests that can be reused in multiple scenarios. Specifying BDD tests to run as part of different test scenarios without duplicating work frequently requires substantial effort and rework. But Cucumber provides a robust framework for writing BDD tests. Max Saperstone shows how—by using Cucumber’s flexible structure in combination with the Java language—to write singular tests to run over multiple testing interfaces. Building on Cucumber basics, this framework provides a generic model for testing any application. Additionally, Max shares some valuable suggestions to build on standard Cucumber reports, gives additional information for debugging and traceability, and describes test runners and their inputs to help you create more dynamic testing scenarios.
"Managing API Complexity". Matthew Flaming, TembooYandex
APIs are proliferating on the web, providing app developers with ready access to a wide range of data and services, yet very few apps take advantage of more than one or two API providers. Arbitrary inconsistencies between APIs -- from authentication to input/output formats to details as small as timestamps or pagination -- mean every new API brings its own unnecessarily redundent learning curve, draining developer's most precious resource: time.
Temboo is part of an emerging class of services for managing and scaling API usage. By NORMALIZING access to APIs (as well as their associated documentation and credentials) these services do for development what PaaS and server virtualization have already done for app deployment and infrastructure. "Code virtualization", whereby all the tedious details of API access are abstracted away in standardized cloud-based processes, will free developers to spend their time writing only the code that actually makes their app unique. And that means more unique apps for everyone.
Testing web front ends is a pain, partly because we end up testing the back end with them. Selenium helps by automating the input, but the selenium driver code lacks high-level interfaces for things like "find_and_click" or "find_and_key". Adding these with a wrapper makes data-driven selenium testing via Object::Exercise easy.
Does Behaviour Driven Development have a role in the infrastructure world? Enter Behaviour Driven Infrastructure where systems administrators can apply some simple open source tools and BDD principles to make infrastructure management more powerful, more insightful and deliver more value to their customers.
The typical enterprise monitoring and configuration management set-up for a website is:
- Is the Apache package installed and the appropriate version?
- Is the Apache service running?
- Can I connect to the HTTP port and is HTML returned?
- Multiply this by a few hundred iterations of hosts and types of services and you’re probably looking at your typical Nagios, Puppet, Cfengine, Hyperic set-up.
All this monitoring misses something critical though – we’re not actually monitoring that the service does what it should. Yes, it matters whether Apache is installed, the Apache service is running, and you can connect to HTTP but does this actually prove anything about the availability of the service we’re managing and providing for our customers? Nope…
We need to demonstrate more than just a check that says the Apache server is up. We need to demonstrate that the service delivered by that infrastructure was available to our customers AND functioning as intended.
Enter Behaviour Driven Infrastructure or BDI which applies the principles of Behavioural Driven Development to the management of infrastructure. In this presentation you’ll learn:
- How Behaviour Driven Development works
- What makes a behavioural test
- How to install and use Cucumber to perform BDI
- Practical examples of behavioural tests in Cucumber, and
- How to integrate BDI into your work flow and your enterprise monitoring and configuration management frameworks.
Presented at WordCamp Montreal 2014
Do you ever browse the WordPress Plugin Directory and wish you could see your creations up there? Have you ever written code for a personal site or customer and thought that others could benefit from having access to your work? ‘So, you want to be a plugin developer?’ covers numerous aspects of plugin development, including finding an idea for your plugin and securing a space for it in the directory, programming resources and code quality guidelines to make sure your add-on is top-notch, and more business-oriented topics like monetization and promotion. With all of these tips and tools in hand, your next idea could be the next great WordPress plugin.
Do you TDD or BDD? Why not both? Come learn the "Double Loop" workflow and discover how you can use both Behavior Driven Development and Test Driven Development to write well designed, tested and documented code. Double Loop works for lone engineers, small teams or entire product departments. I'll cover the steps you'll take in the workflow as each role as well as tools for executing Double Loop
Cucumber is a tool which supports development via behavior realization (BDD - Behavior-Driven Development). It is considered to be utilized for creating the tests which can be understood by each and all, even without special technical knowledge.
(by QATestLab)
If you are new to WordPress, but already know how to program, the typical "Hello, World" examples aren't helpful. You need to know how to make the right API calls, and where to find documentation about the actions and filters that WordPress makes available to you.
This presentation is a brief introduction skimming the surface of the API hook system in WordPress. It does not go into deep detail, but gives brief "real world" examples of how to use filters and actions, along with pointers on where to find the main documentation that will help you get started on your own plugins.
Implementing Testing for Behavior-Driven Development Using CucumberTechWell
With the behavior-driven development (BDD) methodology, development teams write high level, plain natural language tests to describe and exercise a system. Unfortunately, it is difficult to develop BDD tests that encompass all interfaces and write tests that can be reused in multiple scenarios. Specifying BDD tests to run as part of different test scenarios without duplicating work frequently requires substantial effort and rework. But Cucumber provides a robust framework for writing BDD tests. Max Saperstone shows how—by using Cucumber’s flexible structure in combination with the Java language—to write singular tests to run over multiple testing interfaces. Building on Cucumber basics, this framework provides a generic model for testing any application. Additionally, Max shares some valuable suggestions to build on standard Cucumber reports, gives additional information for debugging and traceability, and describes test runners and their inputs to help you create more dynamic testing scenarios.
"Managing API Complexity". Matthew Flaming, TembooYandex
APIs are proliferating on the web, providing app developers with ready access to a wide range of data and services, yet very few apps take advantage of more than one or two API providers. Arbitrary inconsistencies between APIs -- from authentication to input/output formats to details as small as timestamps or pagination -- mean every new API brings its own unnecessarily redundent learning curve, draining developer's most precious resource: time.
Temboo is part of an emerging class of services for managing and scaling API usage. By NORMALIZING access to APIs (as well as their associated documentation and credentials) these services do for development what PaaS and server virtualization have already done for app deployment and infrastructure. "Code virtualization", whereby all the tedious details of API access are abstracted away in standardized cloud-based processes, will free developers to spend their time writing only the code that actually makes their app unique. And that means more unique apps for everyone.
Testing web front ends is a pain, partly because we end up testing the back end with them. Selenium helps by automating the input, but the selenium driver code lacks high-level interfaces for things like "find_and_click" or "find_and_key". Adding these with a wrapper makes data-driven selenium testing via Object::Exercise easy.
Does Behaviour Driven Development have a role in the infrastructure world? Enter Behaviour Driven Infrastructure where systems administrators can apply some simple open source tools and BDD principles to make infrastructure management more powerful, more insightful and deliver more value to their customers.
The typical enterprise monitoring and configuration management set-up for a website is:
- Is the Apache package installed and the appropriate version?
- Is the Apache service running?
- Can I connect to the HTTP port and is HTML returned?
- Multiply this by a few hundred iterations of hosts and types of services and you’re probably looking at your typical Nagios, Puppet, Cfengine, Hyperic set-up.
All this monitoring misses something critical though – we’re not actually monitoring that the service does what it should. Yes, it matters whether Apache is installed, the Apache service is running, and you can connect to HTTP but does this actually prove anything about the availability of the service we’re managing and providing for our customers? Nope…
We need to demonstrate more than just a check that says the Apache server is up. We need to demonstrate that the service delivered by that infrastructure was available to our customers AND functioning as intended.
Enter Behaviour Driven Infrastructure or BDI which applies the principles of Behavioural Driven Development to the management of infrastructure. In this presentation you’ll learn:
- How Behaviour Driven Development works
- What makes a behavioural test
- How to install and use Cucumber to perform BDI
- Practical examples of behavioural tests in Cucumber, and
- How to integrate BDI into your work flow and your enterprise monitoring and configuration management frameworks.
Presented at WordCamp Montreal 2014
Do you ever browse the WordPress Plugin Directory and wish you could see your creations up there? Have you ever written code for a personal site or customer and thought that others could benefit from having access to your work? ‘So, you want to be a plugin developer?’ covers numerous aspects of plugin development, including finding an idea for your plugin and securing a space for it in the directory, programming resources and code quality guidelines to make sure your add-on is top-notch, and more business-oriented topics like monetization and promotion. With all of these tips and tools in hand, your next idea could be the next great WordPress plugin.
Do you TDD or BDD? Why not both? Come learn the "Double Loop" workflow and discover how you can use both Behavior Driven Development and Test Driven Development to write well designed, tested and documented code. Double Loop works for lone engineers, small teams or entire product departments. I'll cover the steps you'll take in the workflow as each role as well as tools for executing Double Loop
Cucumber is a tool which supports development via behavior realization (BDD - Behavior-Driven Development). It is considered to be utilized for creating the tests which can be understood by each and all, even without special technical knowledge.
(by QATestLab)
World: Melon Seed - Market Report. Analysis And Forecast To 2020IndexBox Marketing
IndexBox Marketing has just published its report: "World: Melon Seed - Market Report. Analysis And Forecast To 2020". The report provides an in-depth analysis of the global melon seed market. It presents the latest data of the market value, consumption, domestic production, exports and imports, price dynamics and food balance. The report shows the sales data, allowing you to identify the key drivers and restraints. You can find here a strategic analysis of key factors influencing the market. Forecasts illustrate how the market will be transformed in the medium term. Profiles of the leading producers are also included.
For the set goals achievement and successful A/B testing fulfillment, first of all, one should get acquainted with the peculiarities of such checking type and the algorithm of its performance.
(by QATestLab)
Potentiality of protected cultivation in West BengalSubham Ghosh
potential condition of West Bengal for making protected cultivation in green house, lath house, glass house and cost benefit ratio of high cost and low cost structure for farmers of west bengal.
This presentation is done by Export Agriculture students of 2010/11 batch of Uva Wellassa University of Sri Lanka as a requirement for the subject which is “Fruit & Vegetable Cultivation”. Note that the information included here is relevant to Sri Lankan condition
Behaviour-driven development (BDD) started as an improved variation on test-driven development, but has evolved to become a formidable tool that helps teams communicate more effectively about requirements, using conversation and concrete examples to discover what features really matter to the business. BDD helps teams focus not only on building features that work, but on ensuring that the features they deliver are the ones the client actually needs.
Learn what BDD is, and what it is not
Understand that the core of BDD is around conversation and requirements discovery, not around tools.
Understand the difference and similarities between BDD at the requirements level, and BDD at the coding level.
Learn what BDD tools exist for different platforms, and when to use them
Agile Software Development with Intrinsic QualityDemetrius Nunes
This is a little presentation to make absolutely clear why test automation and test driven development are key to any software development process that strives for high quality and high productivity.
Cucumber is a useful tool for testing software, but it has problems that aren't often considered. This presentation addresses its drawbacks and discusses potential alternatives.
As companies mature their software development practices, automated acceptance-level testing is becoming more commonplace. In particular, Cucumber and its Gherkin-based equivalents are enjoying widespread use. Through observing and facilitating the adoption and implementation of Cucumber test suites, I have found ways in which the technology has helped teams greatly, but I have also found ways in which it hindered them. I realized that Cucumber and its kin are appropriate tools in fewer situations than the ones in which they are currently employed. In other words, many teams that use such frameworks need to reevaluate whether they are right for the job, and perhaps replace them. I invite all involved in automated acceptance testing to attend as I try to build a compelling case for this notion.
Do you have multiple configuration management languages in production simultaneously? Do you find yourself having to accommodate for multiple deployment flows, dependencies, code structures and syntax for tools that do similar tasks? This talk will consist of demos, stories and structures to help you quantify and define what is slowing your flow, recognize equivalencies between languages for translation, and help you map the way to successfully iterate towards unity of tooling with Puppet. In this session, I will: *Discuss causes and prevention of duplicate tooling *Quantify resource cost of duplicate tooling *Define existing language roles *Identify similarities in language structure *Discuss and demonstrate conversion techniques
This talk presents a library, registry, supporting the creation of modular Haskell applications in a very approachable way. And since this library actually helps with wiring functions it can be reused in other contexts like creating data generators for property-based testing.
Ein Backend für ein weltweit erfolgreiches Social Game zu entwickeln ist nicht einfach, aber die eigentliche Herausforderung ist der Betrieb der Systeme! Bei Wooga sind dieselben zwei bis drei Entwickler für beides verantwortlich. Über die letzten zwei Jahren hat sich ein halbes Dutzend Teams dieser Herausforderung gestellt. Dabei konnten sie auf die Erfahrungen der vorhergehenden Teams zurückgreifen und hatten die Freiheit, eigene Lösungsansätze zu verfolgen. Der Vortrag wird die entstandene Evolution der Backends nachvollziehen: Anfangs LAMP, dann Ruby statt PHP, dann NoSQL statt MySQL und am Ende ohne Datenbank auf Basis von Erlang OTP. Die Darstellung dieser Reise wird anschaulich zeigen, welche Vorteile es haben kann, Entwicklern auch einmal freie Hand zu lassen.
This Friday, Albert Bellonch will speak about web performance optimization. We often hear engineers talking about strange topics: caching, CSS and Javascript optimization, loading time, deferred execution, expiration control headers… This next talk is focused on everyone understaning what web performance optimization is: which recurring problems there are, how are they solved, and why is important to solve them.
Who is Albert Bellonch?
Albert Bellonch is a Computer Engineer by the polytechnical universities of Catalonia and Turin. After finishing his Final Project in London, he returned to Barcelona in order to begin a new phase at Itnig, where he is the Chief Technological Officer and leads the development team.
日本語はコチラ
https://www.slideshare.net/ssuser741a3c/lookingglass-renderingoptimizeplanjp
This is the side for this event.
https://lookingglass.connpass.com/event/115508/
Similar to Outside-in Development with Cucumber and Rspec (20)
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
7. Scenario: Happy SoR attendees
Given people turned up
When Joseph talks
Then everyone should acquire some new knowledge
And no-one should fall asleep
And no rotten food should be thrown
24. Cucumber Feature
Not
executed
Feature: Be awesome
Narrative
Scenario: title Example of
Given <some context> behaviour
And <yet more context>
When <some action>
And <more actions>
Then <some outcome>
And <more outcomes>
25. regexp match
Step
definition
Given /^we like (.*)$/i do |fruit|
fruit.should == 'cukes'
Ruby tests #assert_equal(fruit, 'cukes')
end
Plaintext Given we like cukes
Feature
Cucumber
28. огурец Russian Chinese
concombre French Korean
gurka Swedish
Japanese
German castravete Romanian
Gurke
ogórek
Cucumber English Polish
pepino Spanish
Italian
cetriolo
Danish
agurk
ﺍﳋﻴﺎﺭ Arabic
Indonisean
ketimun
29. огурец Russian Chinese
concombre French Korean
gurka Swedish
Japanese
German castravete Romanian
Gurke
ogórek
Cucumber English Polish
pepino Spanish
Treetop Rocks
Italian
cetriolo
ANTLR
Danish
agurk
could rock
ﺍﳋﻴﺎﺭ Arabic
Indonisean
harder
ketimun
49. Feature (terrible)
Value
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user
Needs to be able to add movies to their rental list with a priority
Role Feature
50. Feature (terrible)
Value
Feature: select a movie to rent with priority
In order to maximise allocation of films
Narrative
The website user
Needs to be able to add movies to their rental list with a priority
Role Feature
51. Feature (terrible)
Value
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user
Needs to be able to add movies to their rental list with a priority
Role Feature
52. Feature (terrible)
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user
Needs to be able to add movies to their rental list with a priority
53. Feature (terrible)
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user
Needs to be able to add movies to their rental list with a priority
Noise
54. Feature (terrible)
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user
Needs to be able to add movies to their rental list with a priority
Too generic
role
55. Feature (terrible)
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user Film member
Needs to be able to add movies to their rental list with a priority
Too generic
role
56. Feature (terrible)
Role can change
feature
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user Film member
Needs to be able to add movies to their rental list with a priority
57. Feature (terrible)
Role can change
feature
Film Member selects a movie to rent with priority
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user Film member
Needs to be able to add movies to their rental list with a priority
58. Nice
Feature (terrible)
Film Member selects a movie to rent with priority
Feature: select a movie to rent with priority
In order to maximise allocation of films
The website user Film member
Needs to be able to add movies to their rental list with a priority
60. Scenarios
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Film member
Needs to add movies to their rental list with a priority
Scenario: High priority
61. Scenarios
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Film member
Needs to add movies to their rental list with a priority
Scenario: High priority
Then I should see quot;My rental listquot;
And I should see quot;Casshernquot; in my rental list
And quot;Casshernquot; should be marked as quot;High priorityquot;
62. Scenarios
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Film member
Needs to add movies to their rental list with a priority
Scenario: High priority
When I choose quot;High priorityquot;
And I press quot;Rentquot;
Then I should see quot;My rental listquot;
And I should see quot;Casshernquot; in my rental list
And quot;Casshernquot; should be marked as quot;High priorityquot;
63. Scenarios
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Film member
Needs to add movies to their rental list with a priority
Scenario: High priority
Given I'm logged in
And I am viewing the movie quot;Casshernquot;
When I choose quot;High priorityquot;
And I press quot;Rentquot;
Then I should see quot;My rental listquot;
And I should see quot;Casshernquot; in my rental list
And quot;Casshernquot; should be marked as quot;High priorityquot;
70. Fixtures
Scenario: search results found Given /^the Movies$/i do |movie_hash|
Given the Movies #{:title => quot;The colour whitequot;},
| title | #{:title => quot;The colour redquot;},
| The colour white | #{:title => quot;Casshernquot;}
| The colour red | movies.hashes.each do |values|
| Casshern | Movie.create!(values)
When I search for quot;colourquot; end
Then I will see 2 results end
Scenario: search results found
Given 2 films with quot;colourquot; in the title
When I search for quot;colourquot;
Then I will see 2 results
71. Stick it to the World
module NavigationHelpers
def path_to(page_name)
case page_name
when /the homepage/
root_path
else
raise quot;Can't find mapping from quot;#{page_name}quot; to a path.quot;
end
end
end
World do |world|
world.extend NavigationHelpers
world
end
72. Hooks
Hooks are GLOBAL!
Before do
# do something before each scenario.
end
After do
#do something after each scenario
end
73. How many scenarios is
enough?
• Given/When/Then
“Finite state machine” Uncle Bob
• What’s the Return on Investment?
75. Cowcumbers
Given /^dirty state$/ do
@movie = Movie.create!
Relying on state (too much) end
Given /^coupled by state$/ do
@movie.title = quot;yuckyquot;
end
Given /^does a user care$/ do
response.current_url == ‘silly’
end
Tests without user value Given /^checking the db$/ do
Movie.find(1).should_not == nil
end
77. Concrete vs Abstract
Scenarios
Given I'm logged in
Given I go to the login page
And I fill in quot;usernamequot; with quot;josephquot;
And I fill in quot;passwordquot; with quot;cukerquot;
And I click quot;loginquot;
Domain understanding
Concrete Abstract
78. Calling steps from steps
Given /I’m logged in/ do
User.create!(:user => 'josephwilk', :password => quot;passquot;)
Given 'I fill in quot;passwordquot; with quot;josephwilkquot;'
Given 'I fill in quot;passwordquot; with quot;passquot;'
Given 'I click quot;loginquot;'
end
82. Webrat / Selenium
# Sets up the Rails environment for Cucumber
ENV[quot;RAILS_ENVquot;] ||= quot;seleniumquot;
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/rails/world'
require 'cucumber/formatters/unicode'
Turn off
#Cucumber::Rails.use_transactional_fixtures
require 'webrat'
Webrat.configure do |config|
Switch to Selenium
config.mode = :selenium
end
require 'cucumber/rails/rspec'
require 'webrat/core/matchers'
Before do
Movie.delete_all
Manually cleanup
RentalRequest.delete_all
end