~/talk

Test-Drive Your Database

Talkat TestCon Vilnius 2017 · 2017-10-18..10-20· [databases, testing]
links:none on file
slides:none on file

Shows how to write and run real database unit tests using T-SQLT on Microsoft SQL Server with the Chinook sample data set, starting test-first by creating a failing test for albums_for_artist_by_name then implementing the stored procedure until the assertion matches; runs each test inside its own transaction and groups suites by schema; demonstrates faking tables and spying on procedures, a test-data-builder pattern for concise fixtures, and CI automation via SQLCMD plus a TeamCity runner so tests run and the DB is dropped afterwards.

AI-written summary · about

  1. 0:00Intro
  2. 1:11Why test databases
  3. 2:16Unit testing frameworks
  4. 5:38Test recommendations
  5. 6:58Demos
  6. 8:07Chinook Database
  7. 10:22Sequel CLR
  8. 11:52Writing tests
  9. 13:22Creating a test class
  10. 14:22Creating a table
  11. 20:22Creating a new procedure
  12. 23:22Testing the new procedure
  13. 24:22Testing the new procedure again
  14. 25:22Adding an inner join
  15. 27:22Test Data Builder Pattern
  16. 29:22Fluent Syntax
  17. 30:22Copy Paste
  18. 31:22Create Procedure
  19. 34:22Run Tests
  20. 35:22TeamCity fro
  21. 36:22Three Steps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.