BDD End-to-end Browser-Testing mit Node.js
unKonf 2016 · 16.4.2016
Markus Tacker
Channeller of Technological Obscurities (CTO)
Turning organizations �into entrepreneurial networks
“The way to creating
Leaders at every level is
The Way of Resourceful Humans”
“The way to creating
Leaders at every level is
The Way of Resourceful Humans”
Captain David L. Marquet
US Navy (retired) Captain
Nuclear Submarine USS Santa Fe
Captain David L. Marquet
US Navy (retired) Captain
Nuclear Submarine USS Santa Fe
Resourceful Technology
Resourceful Tools
netwoRHk
enables, promotes and visualizes truly customer-focused teamwork
staRHs
beautifully visualized 360-degree feedback
caRHds
enables, demands and visualises everybody to contribute to valuable meetings
BDD: Short intro
Let user stories drive your (product) development
Title (one line describing the story)��(Narrative)�As a [role]�I want [feature]�So that [benefit]��Scenario 1…n: Title�Given [context]� And [some more context]...�When [event]�Then [outcome]� And [another outcome]...
Read more at: http://dannorth.net/whats-in-a-story/
BDD: Benefits
Browser-based testing: PITA
applying BDD to browser based testing …
Yadda: BDD for Node.js
https://github.com/acuminous/yadda
Yadda: BDD for Node.js
How it works:
Context step definition example
Step:
When I enter "187.000 €" into the input amount
Step definition:
.when(/^I enter "([^"]+)" into the input (.+)$/, function (value, input, next) {� this.driver.findElement(By.name(input)).sendKeys(r(value)).then(next);� })
Live demo ☠
Questions?
Thank you!
Slides https://goo.gl/03zXZY
Code on GitHub https://goo.gl/o9OvQP
Please send feedback to @coderbyheart� markus@resourceful-humans.com