260 likes | 373 Views
Discover the best practices for automated builds and testing in software development. Learn how effective automation enhances team collaboration, increases code quality, and simplifies processes across projects. This presentation covers key topics such as the benefits of automated testing, handling multi-developer environments, and resolving common issues like merging changes and writing unit tests. Explore tools including MSBuild, NAnt, and automated testing frameworks like Selenium. Gain insights to improve your software development lifecycle, ensuring cleaner and more efficient code management.
E N D
Automated Builds and Testing Wm. Barrett Simms FrontRunnerMD wbsimms@gmail.com 781.405.4686 Twitter : @wbsimms
Systems Administrator • Linux – Solaris • Perl • Java • .NET/C# • Agile Project Manager • I love what I do for work. Whoami – Past to Present
How I build software How this helps teams Techniques Tools Show a fairly complete approach What you’ll learn
Dependent Projects Code Smell: Shotgun Surgery!!
Branching and Merging Main Line ??? Branch 2 Branch 1
Buildservers Test results are published to team and viewable by all.
Unit tests = Quality Software Automated testing
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. Common resistance
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) Databases – The tricky part
Use SQL scripts! • Table • View • Procedures • Key and Constraints • Default Data • Test Data A decent answer
Automated Build Server • TFS • Auto Generate Database • DumpDatabase/CreateDatabase • Automated Testing • MSTest My one slide solution
DumpDatabaseToSql.exe • Microsoft.SqlServer.Management.Smo Generating the scripts
All schema files in revision control. Database Files
EdmGen2 • http://archive.msdn.microsoft.com/EdmGen2 Another trick: Entity Framework
Boy Scout Rule • Leave the campground cleaner than you found it. • At least… leave it as you found it. Unit testing with the database
Wrap it all up in a build script. • MSBuild, NAnt…. • I’m using MSBuild… • But prefer NAnt. Finally… sort of…