[Automated] TDD with SQL Server using nUnit Daniel de Sousa SQL Saturday #464, Melbourne 20th February 2016
Housekeeping Mobile Phones Evaluations Wifi Details please set to “stun” during sessions Evaluations complete online to be in the draw for fantastic prizes Wifi Details SSID: eduroam Login: ext-sqlsat Password: sqlsaturd4y SESSIONS EVENT http://www.sqlsaturday.com/464/ sessions/sessionevaluation.aspx http://www.sqlsaturday.com/464/ eventeval.aspx
Connect with the Community Event staff, volunteers and speakers are here to help and answer questions. Scan the QR code on the speaker badges to connect and network with them. speaker @SQLDropbear I attack SQL challenges by dropping onto them from above.
Who am I? BI Architect/Developer/Consultant/Troubleshooter for consulting company in Health Working with SQL Server since 2001 Working in the Health industry since 2009 Volunteer at SQL Saturday and PASS Summit March 2015
Validation 5 million rows here and 5 million rows there? How do you validate your solutions now? SRC = STG = DEST
Requirements nUnit (http://nunit.org) ORAYLIS BI.Quality (https://biquality.codeplex.com/) MSBuild (Installed together with .NET Framework) MSBuildCommunityTasks (https://github.com/loresoft/msbuildtasks)
nUnit NUnit is a unit-testing framework for all .Net languages. This is where the coding happens. Installation to C:\Program Files\nUnit X.X.X
ORAYLIS BI.Quality “BI.Quality” project is a test framework that is specifically designed to connects both worlds, BI and testing(Nunit). Installs to C:\Program Files (x86)\ORAYLIS(it does not confirm the installation at the end) Structure: Bin Connections Lib Queries Reports
MSBuild Part of .NET Framework Will be used for the automation of tests Path C:\Windows\Microsoft.NET\Framework\<version> needs to be added to the PATH environment variable MSBuildCommunityTasks: is used to make special tasks available, e.g. for NUnit or XSL. These are used during report generation.
ORAYLIS BI.Quality - Bin Contains “BI.Quality.proj” project file which contains the settings and properties for the automation of the process. First step is to make sure the nUnit folder is correct:
ORAYLIS BI.Quality - Connections Contains all the connections that will be used in the project(e.g Sources, Datawarehouse(destinations), Cubes, etc) in XML format. SQL Relational MDX
ORAYLIS BI.Quality - Lib Contains the libraries, config files and test results(when ran manually)
ORAYLIS BI.Quality - Queries This folder contains the tests to be run XML(test) Sql(support) Any additional file(e.g csv, xml, etc) Recommended to group in sub-folders to make it understandable and organised. Can have multiple tests in one folder
ORAYLIS BI.Quality - Query Example Table Connection Name Query compares the number of rows of a Table with a given target compares two tables
ORAYLIS BI.Quality - Create/Read CSV Connection Name Table Query Create CSV Read CSV Number of expected rows Compare tables
Demo
Questions? Please make sure you visit our fantastic sponsors:
How did we do? Please complete an online Evaluation to be included the draw for a fantastic prize! There is a prize for each session timeslot and for the overall event survey – so the more feedback you provide the more chances you have. Post-Event Survey http://www.sqlsaturday.com/464/ eventeval.aspx Session Surveys http://www.sqlsaturday.com/464/ sessions/sessionevaluation.aspx
Thank you Twitter: @dcasousa Linkedin: https://au.linkedin.com/in/daniel-de-sousa-0b419828