Lettuce, Salad and how you write beautiful tests
Amit Singh Sethi (~dusual) |
Wouldn't it be great if your Product Managers could understand your test. Wouldn't it be great if your tests represent in plain English your business problems as well.
Welcome to BDD
Behaviour Driven Development (BDD) is a development process based on Test-Driven Development – but makes a significant modification. With TDD – the main goal was to achieve test-coverage (what percentage of your code is covered by tests). With BDD – the driving question – “What percentage of my user stories are covered?” The main test-unit is the user story.
Feature: Manipulate strings In order to have some fun As a programming beginner I want to manipulate strings Scenario: Uppercased strings Given I have the string "lettuce leaves" When I put it in upper case Then I see the string is "LETTUCE LEAVES"
With lettuce[] you can convert your user stories into fully automated test framework. This is what we have been doing at siminars to make our tests simple and fun.
Basic knowledge of Python.
Basic understanding of testing and automated testing
I am the technical architect at online education company called siminars.com I have been working with software for last 6 years in fields like scientific computing, web development and cloud telephony. I am passionate about testing and organising software development around business problems. And it is this interest that led me to BDD and lettuce.