Skip to content

Project Idea: Improve Behaviour Testing Framework and Testing Suite

chillu edited this page Apr 23, 2012 · 2 revisions

Project Idea: Improve Behaviour Testing Framework and Test Suite

Author: Ingo Schommer, ingo@silverstripe.com

SilverStripe has good support for unit testing, and the framework is generally well tested. But those tests are developer centric, and don’t describe high level user goals very well. Even worse, a lot of high impact interface bugs are slipping through the cracks because of this unit-focused approach. A more behaviour-driven testing will make our interface more specified and solid in a sustainable fashion (see experimental project page).

Goals:

  • Extend the existing proof-of-concept based on Cuke4PHP and PHP Webdriver
  • Connect existing database fixture logic in SilverStripe’s testing framework to the setup/teardown logic of Cuke4PHP
  • Create reusable set of assertions (“Given … when … then”) fitting the problem space of a content management interface
  • Specify existing CMS behaviour based on examples
  • Start with high-level goals, e.g. “Given I am logged in as a CMS author, when I open a page, enter ‘new content’ and save the page, the website shows ‘new content’”
  • Document how to use the Cuke4PHP system, how the assertions are structured and how they can be used. The goal is to create a living specification, so a top priority should be spreading knowledge about it to other maintainers.

Requirements:

  • Ability to quickly grasp relatively complex user interactions by using an interface, and describing them in a clear way through examples
  • Intermediate PHP skills to write the test assertions
  • Beginner SilverStripe skills in order to create framework-specific extensions to the library

Discussions: