The document discusses improving quality in software projects through behavior-driven development (BDD) and Cucumber features. It covers best practices for writing expressive Cucumber scenarios in Gherkin, including using a declarative style, backgrounds, tables, page objects, and matchers. The presentation emphasizes focusing scenarios on "what" should happen rather than "how" and avoiding tightly coupling scenarios to implementation details.
Perfect Styling - How to write better CSSArtem Tabalin
Learn how to write better CSS/LESS. Know about existing styling methodologies: OOCSS, ACSS, BEM, SMACSS. Find guidelines helping to make your styles reusable, modular, consistent, and compact.
Perfect Styling - How to write better CSSArtem Tabalin
Learn how to write better CSS/LESS. Know about existing styling methodologies: OOCSS, ACSS, BEM, SMACSS. Find guidelines helping to make your styles reusable, modular, consistent, and compact.
Software Engineering Thailand: Programming with ScalaBrian Topping
Meet-up, May 28, 2015, Launchpad, Bangkok. http://www.meetup.com/Software-Engineering-Thailand/events/222548484/.
Apologies for the rendering quality not matching the presentation, I did these with Apple Keynote and Slideshare does not support this format. I will try to edit them when there is more time.
Thanks to Bangkok LaunchPad (https://www.facebook.com/launchpadhq) for generously hosting this event!
When developing an Asterisk telephony application most developers that interact with Asterisk do so by using AGI alone. When AMI is used, it is usually just for spooling up outgoing calls. But when used together, AMI and AGI deliver powerful and flexible control over every call in the system. In this session, we will look at real life examples of applications that blend the use of AGI and AMI to do things you probably did not know you could do with Asterisk. Using the Adhearsion framework, we will demonstrate how you can build your own powerful telephony applications.
Presented by Ben Klang, Mojo Lingo at AstriCon 2011 in Denver, CO.
Automated UI test on mobile - with Cucumber/CalabashNiels Frydenholm
Automated UI tests with Cucucumber/Calabash - experiences from the trenches, and the lessons we have learned along the way at ebay Classifieds in Denmark.
How to structure your test code, run in it in a CI environment, and get fast feedback to make it a succes.
Outside-in Development with Cucumber and RspecJoseph Wilk
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 Engineering Thailand: Programming with ScalaBrian Topping
Meet-up, May 28, 2015, Launchpad, Bangkok. http://www.meetup.com/Software-Engineering-Thailand/events/222548484/.
Apologies for the rendering quality not matching the presentation, I did these with Apple Keynote and Slideshare does not support this format. I will try to edit them when there is more time.
Thanks to Bangkok LaunchPad (https://www.facebook.com/launchpadhq) for generously hosting this event!
When developing an Asterisk telephony application most developers that interact with Asterisk do so by using AGI alone. When AMI is used, it is usually just for spooling up outgoing calls. But when used together, AMI and AGI deliver powerful and flexible control over every call in the system. In this session, we will look at real life examples of applications that blend the use of AGI and AMI to do things you probably did not know you could do with Asterisk. Using the Adhearsion framework, we will demonstrate how you can build your own powerful telephony applications.
Presented by Ben Klang, Mojo Lingo at AstriCon 2011 in Denver, CO.
Automated UI test on mobile - with Cucumber/CalabashNiels Frydenholm
Automated UI tests with Cucucumber/Calabash - experiences from the trenches, and the lessons we have learned along the way at ebay Classifieds in Denmark.
How to structure your test code, run in it in a CI environment, and get fast feedback to make it a succes.
Outside-in Development with Cucumber and RspecJoseph Wilk
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.
Estimating software projects, features and tasks is not easy. This presentation shows a way to change the focus from "how long is going to take" to "what can I build in xx days"
Coderetreat hosting training slides for future hosts of coderetreat. It covers the basic components of hosting a coderetreat. From finding a location, to getting sponsors and what can go wrong.
For the video please go to https://youtu.be/QhDpq5hrRM8
There's no charge for (functional) awesomenessAmir Barylko
Presentation about adopting functional programming as a way of thinking and solving problems by embracing functional traits of languages like Haskell, F#, Scala and Clojure.
Presentation done in Jan at the Winnipeg Agile User Group about how to make your team more productive and communicate better developers, managers and business analysts.
From coach to owner - What I learned from the other sideAmir Barylko
I have been working in the software industry for more than twenty years and for the past ten years I have been a fervent advocate of high quality software, test-first development, lean practices and agile methodologies.
I worked as a developer, architect, business analyst, manager and agile coach, and two years ago the unthinkable happened. I became an owner. I decided to build my own product for lean project management called SmartView and doing so presented a set of challenges that I never encountered before.
I used to put always methodology first and never budge before a deadline. Now that the money was my own and the timelines seem more daunting I had to grab Agile by the horns and make decisions and sacrifices in order to stay on budget and hit the desired dates.
My journey gave me a new perspective on what is key to succeed and what agile means to owners and decision makers.
Let me share with you what I learned so far that can help you reach your goals, how to fight the fear of never releasing; and make sure that Agile works for you and not the other way around.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
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/
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
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
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
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.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
4. Amir Barylko - Better Cucumber Features
Why Projects Fail?
• Delivering late or over budget
• Delivering the wrong thing
• Unstable in production
• Costly to maintain
5. Amir Barylko - Better Cucumber Features
Improve Quality
• Unit Testing
• Integration Testing
• Acceptance Testing
6. Amir Barylko - Better Cucumber Features
BDD
• Implementing an application
• by describing its behavior
• from the perspective of the stakeholder
7. Amir Barylko - Better Cucumber Features
Outside In Approach
BDD TDD
8. Amir Barylko - Better Cucumber Features
Test First
• Write a test before any line of code
• Write minimum amount of code to make
the test pass
• Refactor code to eliminate “smells”
10. Amir Barylko - Better Cucumber Features
Gherkin DSL
• Business readable DSL
• Flush out requirements
• Documentation
• Automated testing
• Used by Cucumber,
SpecFlow, jBehave
11. Amir Barylko - Better Cucumber Features
Gherkin Keywords
• Feature • Then
• Scenario • And
• Given • But
• When
12. Amir Barylko - Better Cucumber Features
Features
Feature: Listing projects
As a user Free text!
I Want to see the list of projects
So I can choose one to see the details
Scenario: List all projects
(steps here to implement scenario)
Scenario: No projects are available
(steps here to implement scenario)
13. Amir Barylko - Better Cucumber Features
Scenario
Scenario: List all projects
Given I'm logged in Step 1
And I have some projects stored Step 2
When I browse the projects Step 3
Then I should see all of them listed Step 4
14. Amir Barylko - Better Cucumber Features
Running Features
• Parse the feature
• Parse the scenario
• For each scenario
• Find a step implementation
• Execute the code
15. Amir Barylko - Better Cucumber Features
Matching Step
• Matching regular expression
Given I have some projects stored Feature File
Given /^I have some projects stored$/
Step Def File
16. Amir Barylko - Better Cucumber Features
Step
Given /^I have some projects stored$/ do
projects = 10.times { random_valid_project }
fake_response = create_response(projects)
FakeWeb.register_uri(....)
end
Plain
Ruby!
18. Amir Barylko - Better Cucumber Features
What we want?
• Readability
• Ubiquitous Language
• Consistent use of terminology
• Express natural business intent
• Avoid technical aspects
19. Amir Barylko - Better Cucumber Features
Imperative style
Scenario: Redirect user to originally requested page
Given a User "dave" exists with password "secret"
And I am not logged in
When I navigate to the home page
Then I am redirected to the login form
When I fill in "Username" with "dave"
And I fill in "Password" with "secret"
And I press "Login"
20. Amir Barylko - Better Cucumber Features
What’s the problem?
• Who needs the passwords?
• Tightly coupled to page implementation
• Lacks domain language
• Brittle tests
• Does not tell a story (boring)
21. Amir Barylko - Better Cucumber Features
Declarative style
Scenario: Redirect user to originally requested page
Given I am an authenticated user
When I attempt to view restricted content
Then I am presented with a login form
When I authenticated with valid credentials
Then I should be shown the restricted content
22. Amir Barylko - Better Cucumber Features
Declarative vs Imperative
• Imperative is associated to “how” to do it
• Declarative is associated to “what” we
want
• Where’s the boundary?
23. Amir Barylko - Better Cucumber Features
Too abstract?
Scenario: The whole system
Given the system exists
When I use it
Then it should work, perfectly
24. Amir Barylko - Better Cucumber Features
Background steps
• Steps may have some degree of repetition
• Because they start with the same “state”
• So they share the first X steps
25. Amir Barylko - Better Cucumber Features
Similar scenarios
Scenario: Change Password
Given I am logged in
And I choose to change my password
When I enter a new password
Then my password should be changed
Scenario: Change Password with same credentials
Given I am logged in
And I choose to change my password
When I enter the same password
Then I should see an error message explaining the problem
26. Amir Barylko - Better Cucumber Features
Create Background
Background: I want to change my password
Given I am logged in
And I choose to change my password
Scenario: Change Password
When I enter a new password
Then my password should be changed
Scenario: Change Password with same credentials
When I enter the same password
Then I should see an error message explaining the problem
27. Amir Barylko - Better Cucumber Features
Using Tables
• Sometimes data is hard to put in a step
• with multiple entries
Scenario: Listing movies
Given the movie “Blazing saddles” released “7 Feb 1974”
And the movie “Young Frankenstein” released “15 Dec 1974”
And the movie “The Producers” released “10 Nov 1968”
28. Amir Barylko - Better Cucumber Features
That’s boring!
• Express data in tabular form
Scenario: Listing movies
Given these movies:
| title | release |
| Blazing saddles | 7 Feb 1974 |
| Young Frankenstein | 15 Dec 1974 |
| The Producers | 10 Nov 1968 |
29. Amir Barylko - Better Cucumber Features
Or just a list
• Don’t use the header
Scenario: Listing movies
Given these movies:
| Blazing saddles |
| Young Frankenstein |
| The Producers |
30. Amir Barylko - Better Cucumber Features
Why the detail though?
• Do you really need the list?
Scenario: Listing movies
Given I have some movies stored
When I browse the list
Then I should see the complete collection
31. Amir Barylko - Better Cucumber Features
Leaky Scenarios
• Each scenario leaves the system in a
particular state
• The state has to be cleaned up for the next
scenario
• Otherwise it will “leak” into it
• One scenario should not depend on another
32. Amir Barylko - Better Cucumber Features
Generating data
• Use a framework to generate valid data
• FactoryGirl is a very good option
• FactoryGirl.create(:customer)
• FactoryGirl.create(:invalid_bank_accout)
• Faker will help you to generate fake data
33. Amir Barylko - Better Cucumber Features
Transforms
• Steps can have arguments
• Though regular expression they don’t always
show intent
• And also we may need to “reuse” them
34. Amir Barylko - Better Cucumber Features
Steps with arguments
Given /^I search for a movie “([^"]*)”$/ do |name|
.... # some code here
end
Given /^I have a movie called “([^"]*)”$/ do |name|
.... # some code here
end
35. Amir Barylko - Better Cucumber Features
Capture the argument
Given /^I search for a movie “(#{MOVIE_NAME})”$/ do |name|
.... # some code here
end
MOVIE_NAME = Transform /^([^"]+)$/ do | movie_name |
movie_name.downcase
end
36. Amir Barylko - Better Cucumber Features
Helpers
• Helpers are a great tool to encapsulate
common functionality
• Or to help describe better our intention
• and to avoid looking at ugly code
37. Amir Barylko - Better Cucumber Features
Current Instance
• The World is created for each scenario
• Instance variables have to be set
• Instead we can use a helper method
• to store/create the resource
38. Amir Barylko - Better Cucumber Features
Helper Class
module ProjectHelper
def current_project(project = nil)
@current_project ||= project
end
def project_list_page
@project_list_page ||= ProjectListPage.new
end
end
World(ProjectHelper)
39. Amir Barylko - Better Cucumber Features
Custom matchers
RSpec::Matchers.define :match_stored_projects do
match do |actual|
actual == Project.all.map { ... }
end
failure_message_for_should do |actual|
"The projects in the page should match...n" +
"The page contains #{actual}' n" +
"But the storage contains #{@expected}"
end
end
40. Amir Barylko - Better Cucumber Features
Page Objects
• The steps rely on the HTML implementation
• Searching for elements can be repetitive
• or ugly
• and not always show intention
41. Amir Barylko - Better Cucumber Features
What can we do?
Then /^I should see the complete list of projects$/ do
actual = all(:css, "#projects tbody tr")
• .map { |tr| tr.all("td").map(&:text) }
.map { |cells| ... }
expected = Project.all.map { |p| ... }
actual.should == expected
end
42. Amir Barylko - Better Cucumber Features
Abstraction!
class ProjectListPage
include PageObject
•
def projects
all(:css, "#projects tr").
drop(1). #drop the header
map { |r| r.all(:css, 'td').map(&:text) }.
map { |r| Project.new(...) }
end
end
43. Amir Barylko - Better Cucumber Features
Nicer steps
Then /^I should see the complete list of projects$/ do
projects_page.list.should == stored_projects
•
end
Page Object Helper
44. Amir Barylko - Better Cucumber Features
With a custom matcher
Then /^I should see the complete list of projects$/ do
projects_page.should list_stored_projects
•
end
Custom
Matcher
46. Amir Barylko - Better Cucumber Features
Next steps
• Focus your scenarios on “what” not “how”
• Read about scenario outlines
• Follow “the Cucumber book” practices
• Learn more about page objects pattern
• Start with a simple project
47. Amir Barylko - Better Cucumber Features
Resources
• Email: amir@barylko.com,
• Twitter: @abarylko
• Blog: http://orthocoders.com
• Website: http://maventhought.com