filmov
tv
Outside in TDD and Unit Test Isolation with Python, Django and Selenium
Показать описание
Originally aired June 5, 2014. This webcast will explore the methodology of "outside-in" test-driven development (TDD), as applied to a web application.
In the style of a pair-programming session or a code kata, it will feature a real example web application, and demonstrate implementing a new feature using outside-in TDD.
We will demonstrate a "double-loop" TDD process involving a functional test that drives a real web browser with selenium, and move inwards towards unit tests using the various Django testing tools. The outside-in process will go through the various layers of a web application stack: presentation layer, templates, URL mappings, "view" functions, the controller layer, forms, and down towards the database model layer.
Taking an outside-in approach can drive the design of code, a useful way to build your application, in contrast to a "bottom-up" approach.
We will also explore the theme of test isolation: "pure" unit tests that are fully isolated, removing dependencies on the web stack or database, how to write them, and why you might want to.
If you've experimented with automated testing and are looking for ideas on how to structure your tests, what tests to write, and in what order, you'll find some useful ideas and tools here.
About Harry Percival
Follow O'Reilly Media:
In the style of a pair-programming session or a code kata, it will feature a real example web application, and demonstrate implementing a new feature using outside-in TDD.
We will demonstrate a "double-loop" TDD process involving a functional test that drives a real web browser with selenium, and move inwards towards unit tests using the various Django testing tools. The outside-in process will go through the various layers of a web application stack: presentation layer, templates, URL mappings, "view" functions, the controller layer, forms, and down towards the database model layer.
Taking an outside-in approach can drive the design of code, a useful way to build your application, in contrast to a "bottom-up" approach.
We will also explore the theme of test isolation: "pure" unit tests that are fully isolated, removing dependencies on the web stack or database, how to write them, and why you might want to.
If you've experimented with automated testing and are looking for ideas on how to structure your tests, what tests to write, and in what order, you'll find some useful ideas and tools here.
About Harry Percival
Follow O'Reilly Media: