Behavior-Driven Development (BDD) is an Agile approach that mixes requirement gathering, documentation and acceptance testing. The idea is that you start by writing human-readable sentences that describe a feature of your application and how it should work. Then you implement this behavior in software. This description can produce automated tests that will verify that the feature is implemented correctly. On the testing side, BDD tools provide you the features to perform functional or acceptance tests. There are many tools that implement the BDD concept for different languages, including PHP.
This talk demonstrates to participants how they can use HTTP request libraries and WebDriver in harmony. A common pattern that Automator’s fall into is trying to execute every action of a test via the UI, from logging in, creating required data, navigating to that specific data and then running assertions on it before logging out. This can lead to tests that are slow to run and likely to break due to the reliance on many Web elements.
Software testing doesn’t stop when your website is live and monitoring your website uptime or response time is a key aspect of software quality assurance. If your website is slow or down, it means you are losing clients: with no access to your pages, how are they supposed to use your services and contact you?
Software testing is today a crucial part of software development, but if it comes to good programming practices a lot of teams have some issues to create sustainable and maintainable tests. Learning the usage of a testing tool is often not enough for writing those. It is also necessary to create a framework which abstracts the different concerns.
Like many Agile approaches, the principles of Test-Driven-Development (TDD) and its Red-Green-Refactor cycle seem deceptively simple. As often, things are more complicated in practice and this is why Jason Gorman wrote a 200 pages book about TDD that explores the multiples dimensions of this approach.