Download presentation
Presentation is loading. Please wait.
Published byClarence Paul Modified over 9 years ago
1
Automated Builds and Testing Wm. Barrett Simms FrontRunnerMD wbsimms@gmail.com 781.405.4686 Twitter : @wbsimms
2
Whoami – Past to Present Systems Administrator Linux – Solaris Perl Java .NET/C# Agile Project Manager I love what I do for work.
3
What you’ll learn How I build software How this helps teams Techniques Tools Show a fairly complete approach
5
Automated Build/Test Benefits ProcessPersonal MergingConfidence Onboarding employeesImproved skills Testing/QACollective Ownership CollaborationCommunication
7
Multiple Developers Main JoeSueTedJan
8
Dependent Projects Common Middle Layer Business Logic Code Smell: Shotgun Surgery!!
9
Database Changes JanBob Main
10
Branching and Merging Main Line Branch 1 Branch 2 ???
11
Mainline merge process Build/Test Dev branch Build/Test Mainline Merge Dev branch to Mainline Build/Test Mainline Check code into Mainline
12
Buildservers Developer merges to mainline Buildserver gets changes Buildserver builds, runs all tests and notifies team Test results are published to team and viewable by all.
13
Automated testing Unit tests = Quality Software
14
Typical bug velocity
15
Negative bug velocity
16
Common resistance I can’t write unit tests because… I have a UI WaitN, QTP, Selenium Fixing someone else’s poorly written code Refactoring, training I use a database The tricky part.
17
Databases – The tricky part Common Questions How do I write unit tests when I require a database How do I merge changes? How do I add default/test data? How do I update… Buildserver Production site(s)
18
A decent answer Use SQL scripts! Table View Procedures Key and Constraints Default Data Test Data
19
My one slide solution Automated Build Server TFS Auto Generate Database DumpDatabase/CreateDatabase Automated Testing MSTest
20
Generating the scripts DumpDatabaseToSql.exe Microsoft.SqlServer.Management.Smo
21
Generating the scripts (2)
22
Database Files All schema files in revision control.
23
Creating the database
24
Another trick: Entity Framework EdmGen2 http://archive.msdn.microsoft.com/EdmGen2
25
Unit testing with the database Boy Scout Rule Leave the campground cleaner than you found it. At least… leave it as you found it.
26
Finally… sort of… Wrap it all up in a build script. MSBuild, NAnt…. I’m using MSBuild… But prefer NAnt.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.