SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
SQL Server Unit Testing
      Joel Champagne
  President, CodeX
  President CodeX Enterprises




                 July 2011
      Mark Ginnebaugh, User Group Leader, 
            mark@designmind.com
            mark@designmind com
Who am I?
                 Who am I?
• President CodeX Enterprises LLC
  President CodeX Enterprises LLC
• 20 years consulting experience
  –LLarge mission critical systems
            i i     iti l t
  – .NET, SQL 2000‐2008, SSAS, SSRS, SSIS
  – Architecture, Data Architecture
• Focus on developer productivity tools
Why?
• Unit Testing…  what’s a “unit”?
• U it t ti h
  Unit testing has proven valuable in many 
                              l bl i
  languages
• Things can break for countless reasons – find
  Things can break for countless reasons  find 
  those breakages early
• Some may say SQL has gotten the short end of 
  the stick here for various reasons
   h i kh        f      i
  – Harder:  time/effort to write tests for possibly 
    thousands of objects (many of which could be CRUD)
                     j    (    y                        )
  – Separation of development process
  – Statefulness:  dependence on specific data to make it 
    fly (well)
    fly (well)
Scenarios for Failure
         Scenarios for Failure
• Suppose there’s an existing procedure which 
  has been working for ages
• Someone renames a table column, missed
  Someone renames a table column, missed 
  updating this procedure for whatever reason 
  (e.g. different database)
  (e.g. different database)
• Fails at run‐time…  you would have known, 
  however, if it had at least been  exercised
  however if it had at least been “exercised”
• Also, what does SSMS tell us when we commit 
  the broken procedure…?
  th b k             d     ?
Integration Points
            Integration Points
• On Demand
  On Demand
• Scheduled
• S
  Strategic
         i
  – Build / moving objects
• Automation
  – Includes “on change”
  – Continuous Integration strategies
Visual Studio 2010
           Visual Studio 2010
• Ability to run tests within VS
  Ability to run tests within VS
• Setup tests, per object
• Can have “expected results”
  C h        “        d      l ”
• Schema View offers easy way to script, per 
  object
• Demo
Observations…
• Quite powerful as we can craft data driven 
  tests using a bit of C#
  tests using a bit of C#
  – Not necessarily testing SQL directly (can be .NET 
    components)
        p        )
  – Next slide example
• Hosts tests in “runnable” code (SQL scripts 
                                   ( Q     p
  themselves stored in resource file)
• Integrates as part of a larger testing 
      g         p            g         g
  infrastructure available with Visual Studio
  – Test rigs, agents, etc.
  – Can make as complex as desired
Data‐driven example
SQL‐Hero
• Problems trying to address:
   – Developers often don’t like to invest time in writing tests
      • At least get some “touch tests” as a starting point
        At least get some  touch tests as a starting point
   – Want to exercise tests early and often!
      • On ALTER and scheduled (and on demand)
   –L
    Leverage tests we do have at strategic times:  e.g. scripting 
                      d h               i i                i i
    changes to a new place
      • Can include these automatically from the schema compare tool!
   – Setting of targets, not just thresholds (so we can do 
     reporting / analysis vs. targets)
   – Tests can be somewhat “portable” (i.e. do not need to 
     Tests can be somewhat  portable (i.e. do not need to
     strictly tie to a single database)
   – Reality of databases with hundreds of tables, reference 
     data, etc. – may not be practical to re‐gen the entire thing 
     data etc may not be practical to re gen the entire thing
     from scripts, etc.
Configuration
     g
TestingPolicies.xml
Example:  a proc parameter that ends in AreaID, populate using a select from Area table that is filtered
<PARAMETER>
               <PATTERN>AreaID$</PATTERN>
               <SQL_LOOKUP>SELECT AreaID FROM Area a WHERE a.AreaAbbr LIKE 'A%'</SQL_LOOKUP>
                                                                                         /
</PARAMETER>

Example:  a proc parameter of @DocTypeID that relates to a table called CommDocumentType
<PARAMETER>
 PARAMETER
               <NAME>@DocTypeID</NAME>
               <CHANGE_NAME_TO>CommDocumentType</CHANGE_NAME_TO>
</PARAMETER>

Example:  a sample plug‐in, put in the program filessqlheroplugins directory
<PLUGIN>
              <ASSEMBLY_FILE>SampleTestingPlugIn.dll</ASSEMBLY_FILE>
              <TYPENAME>SampleTestingPlugIn.MyTestPolicy</TYPENAME>
</PLUGIN>

Example:  all objects in the Debug schema would be excluded from testing
<OBJECT>
               <PATTERN>^[?Debug]?.</PATTERN>
               <IS_EXCLUDED>True</IS_EXCLUDED>
</OBJECT>
Notes
• The test generation process will look at
  The test generation process will look at 
  captured workloads to see if an already‐
  executed invocation  will work
  executed invocation “will work”
• Is using a randomized process, but influenced 
  by testing policy file
  by testing policy file
• No “side‐effects”
  – Rollback per object
  – Advantages / Disadvantages
Creating Tests
       g
Running Tests
                Running Tests
•   Scheduling
•   Via Template
•   Via Template, with parallel execution!
     i       l     ih      ll l       i !
•   From SHCommand.exe
•   From .sqlheroproj Visual Studio project type
•   Demo
Some Observations…
• Presence of touch testing has proven value from 
  experience 
  experience ‐ example
• SQL‐Hero testing can augment VS testing:
  – VS for formal unit tests which are part of build 
    process, complex cases where can use C#
  – SH for touch tests that are just “there” behind the 
    scenes to find certain issues for you transparently
                                      y        p      y
  – Output of SH testing template can be used in VS, if 
    you like!
• Not intending SQL Hero to “do it all” but 
  Not intending SQL‐Hero to  do it all but
  considering some new features along the lines of 
  turning captured workloads into complex test 
  cases (C#)
        ( )
Some Observations…
• Presence of touch testing has proven value from 
  experience 
  experience ‐ example
• SQL‐Hero testing can augment VS testing:
  – VS for formal unit tests which are part of build 
    process, complex cases where can use C#
  – SH for touch tests that are just “there” behind the 
    scenes to find certain issues for you transparently
                                      y        p      y
  – Output of SH testing template can be used in VS, if 
    you like!
• Not intending SQL Hero to “do it all” but 
  Not intending SQL‐Hero to  do it all but
  considering some new features along the lines of 
  turning captured workloads into complex test 
  cases (C#)
        ( )
A more complex use case…
                  p
• Problems trying to address:
   –   Data quality in development regions
   –   Security and isolation of production data
   –   In progress work (using external source control?)
   –   Making this easy
       Making this easy
• How does unit testing relate?
   – Integrated as part of the process to ensure things “still 
     work” at the end (could be a different process too)
     work” at the end (could be a different process too)
   – Overall process can serve as one way to achieve the 
     coveted “known starting point” – easily
• YMMV – may be simpler or more complex (likely 
               b i l                     l (lik l
  supported!)
                   p p            g         g
• Watch for a whitepaper describing this in great detail
• Demo
A more complex use case ‐ illustrated…
 Production                             QA/Development




        Prod
                             QANew                       QA
      (remote)
                             Backup


                 Backup / 
                 Restore
                               Backup




                  QANew
                              Remove…
                 (remote)

Scramble 
sensitive 
data
A more complex use case ‐ illustrated…
Production                       QA/Development



                                    Detach, Move 
                                    Detach, Move
      Prod                          Files, Attach…
                QANew                                                QA
    (remote)
                Backup


                                                            Sync 
                                                            Pending 
                                                            Changes
                                     QANew
                                     Backup
                                                     Restore


                                                                 QANew
                                   FTP Landing 
                                      Zone

                                                     Perform tests
A more complex use case ‐ illustrated…
Production                       QA/Development




      Prod
                                                     QAOld
    (remote)




                                    E‐mail 
                                    relevant
                                    parties about 
                                    parties about
                                    completion…
                                                       QA
Putting it together…
• VS Database Project
  VS Database Project
   –   “Build” ‐> Deploy (local or shared)
   –   Can exercise static code analysis
   –   Can include unit testing
       Can include unit testing
   –   Can use MSBuild, which in turn integrates with TFS / CI options
• SQL‐Hero
   – Precludes none of the above
     Precludes none of the above
   – Adds touch testing capability during development cycle, transparently
   – Source control integration interops with Database Projects!
   – Large data sets are encouraged and easy to build
   – Compliance checking incorporated there acts against “real” databases, can 
     be scheduled, email delivery (advantages!)
   – Supports automated operations
        • Example: DB reconcile from branched dev to branched QA (both stateful worked
          Example:  DB reconcile from branched dev to branched QA (both stateful, worked 
          pretty flawlessly with a simple .cmd script)
   – More use cases to support:  testing from a collected workload
• Your environment
   – Do developers do actual data modeling?
   – Do developers want a shared environment?
Offers…
• Looking for Customer Advisory Board 
  members
  – Free enterprise edition in exchange for on‐going 
    feedback (iterative development on v next 
    feedback (iterative development on v‐next
    features)
• Next release coming soon (along with new 
                    g      (    g
  whitepapers)
  – Still free!
  – www.codexframework.com (Library)
  – @sqlheroguy
  – joelc@codexframework.com
To learn more or inquire about speaking opportunities, please contact:
 o ea     o e o qu e about spea g oppo tu t es, p ease co tact:

                Mark Ginnebaugh, User Group Leader
                      mark@designmind.com

Weitere ähnliche Inhalte

Was ist angesagt?

SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...Stephan H. Wissel
 
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testableTestability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testableAlexander Tarlinder
 
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Dan Allen
 
Improve DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data ManagementImprove DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data Managementsoftbasemarketing
 
Continuous delivery chernivcy
Continuous delivery chernivcyContinuous delivery chernivcy
Continuous delivery chernivcyVolodymyr Yelchev
 
JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)
JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)
JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)Dan Allen
 
Adopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy ContextAdopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy ContextXavier Warzee
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
(ATS3-APP14) Troubleshooting Symyx Notebook client performance
(ATS3-APP14) Troubleshooting Symyx Notebook client performance(ATS3-APP14) Troubleshooting Symyx Notebook client performance
(ATS3-APP14) Troubleshooting Symyx Notebook client performanceBIOVIA
 
Intro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUGIntro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUGRay Ploski
 
AD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even EasierAD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even Easierpdhannan
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server PerformanceBIOVIA
 
Sqlsat154 maintain your dbs with help from ola hallengren
Sqlsat154 maintain your dbs with help from ola hallengrenSqlsat154 maintain your dbs with help from ola hallengren
Sqlsat154 maintain your dbs with help from ola hallengrenAndy Galbraith
 
PL/SQL Development
PL/SQL DevelopmentPL/SQL Development
PL/SQL DevelopmentThanh Nguyen
 
02 - Build and Deployment Management
02 - Build and Deployment Management02 - Build and Deployment Management
02 - Build and Deployment ManagementSergii Shmarkatiuk
 
(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should know(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should knowBIOVIA
 
Blue Monitor Software Development
Blue Monitor Software DevelopmentBlue Monitor Software Development
Blue Monitor Software Developmenturbantech
 
Team Development and Release Management
Team Development and Release ManagementTeam Development and Release Management
Team Development and Release ManagementSalesforce Partners
 

Was ist angesagt? (20)

SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
SHOW107: The DataSource Session: Take XPages data boldly where no XPages data...
 
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testableTestability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testable
 
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
 
Improve DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data ManagementImprove DB2 z/OS Test Data Management
Improve DB2 z/OS Test Data Management
 
Continuous delivery chernivcy
Continuous delivery chernivcyContinuous delivery chernivcy
Continuous delivery chernivcy
 
JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)
JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)
JSR-299 (CDI), Weld & the Future of Seam (JavaOne 2010)
 
Adopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy ContextAdopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy Context
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
(ATS3-APP14) Troubleshooting Symyx Notebook client performance
(ATS3-APP14) Troubleshooting Symyx Notebook client performance(ATS3-APP14) Troubleshooting Symyx Notebook client performance
(ATS3-APP14) Troubleshooting Symyx Notebook client performance
 
Intro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUGIntro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUG
 
AD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even EasierAD116 XPages Extension Library: Making Application Development Even Easier
AD116 XPages Extension Library: Making Application Development Even Easier
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
 
Jenkins-meetup
Jenkins-meetupJenkins-meetup
Jenkins-meetup
 
Sqlsat154 maintain your dbs with help from ola hallengren
Sqlsat154 maintain your dbs with help from ola hallengrenSqlsat154 maintain your dbs with help from ola hallengren
Sqlsat154 maintain your dbs with help from ola hallengren
 
PL/SQL Development
PL/SQL DevelopmentPL/SQL Development
PL/SQL Development
 
02 - Build and Deployment Management
02 - Build and Deployment Management02 - Build and Deployment Management
02 - Build and Deployment Management
 
(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should know(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should know
 
Blue Monitor Software Development
Blue Monitor Software DevelopmentBlue Monitor Software Development
Blue Monitor Software Development
 
Team Development and Release Management
Team Development and Release ManagementTeam Development and Release Management
Team Development and Release Management
 

Ähnlich wie Microsoft SQL Server Testing Frameworks

Continuous Delivery at Wix
Continuous Delivery at WixContinuous Delivery at Wix
Continuous Delivery at WixYoav Avrahami
 
SUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoSUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoAOE
 
How to eat an elephant
How to eat an elephantHow to eat an elephant
How to eat an elephantAOE
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesMarc Müller
 
Azure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 FeaturesAzure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 FeaturesMarc Müller
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
Testing in the cloud
Testing in the cloudTesting in the cloud
Testing in the cloudMCARaghu
 
Comprehensive Performance Testing: From Early Dev to Live Production
Comprehensive Performance Testing: From Early Dev to Live ProductionComprehensive Performance Testing: From Early Dev to Live Production
Comprehensive Performance Testing: From Early Dev to Live ProductionTechWell
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Cωνσtantίnoς Giannoulis
 
Exploring Scalability, Performance And Deployment
Exploring Scalability, Performance And DeploymentExploring Scalability, Performance And Deployment
Exploring Scalability, Performance And Deploymentrsnarayanan
 
Infrastructure as Code to Maintain your Sanity
Infrastructure as Code to Maintain your SanityInfrastructure as Code to Maintain your Sanity
Infrastructure as Code to Maintain your SanityDewey Sasser
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsSOASTA
 
Hadoop: Big Data Stacks validation w/ iTest How to tame the elephant?
Hadoop:  Big Data Stacks validation w/ iTest  How to tame the elephant?Hadoop:  Big Data Stacks validation w/ iTest  How to tame the elephant?
Hadoop: Big Data Stacks validation w/ iTest How to tame the elephant?Dmitri Shiryaev
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграцииSQALab
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity7mind
 

Ähnlich wie Microsoft SQL Server Testing Frameworks (20)

Continuous Delivery at Wix
Continuous Delivery at WixContinuous Delivery at Wix
Continuous Delivery at Wix
 
SUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoSUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with Magento
 
How to eat an elephant
How to eat an elephantHow to eat an elephant
How to eat an elephant
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 Features
 
Azure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 FeaturesAzure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 Features
 
Testing in the cloud
Testing in the cloudTesting in the cloud
Testing in the cloud
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Testing in the cloud
Testing in the cloudTesting in the cloud
Testing in the cloud
 
Comprehensive Performance Testing: From Early Dev to Live Production
Comprehensive Performance Testing: From Early Dev to Live ProductionComprehensive Performance Testing: From Early Dev to Live Production
Comprehensive Performance Testing: From Early Dev to Live Production
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
 
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAUTest Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
 
Exploring Scalability, Performance And Deployment
Exploring Scalability, Performance And DeploymentExploring Scalability, Performance And Deployment
Exploring Scalability, Performance And Deployment
 
Infrastructure as Code to Maintain your Sanity
Infrastructure as Code to Maintain your SanityInfrastructure as Code to Maintain your Sanity
Infrastructure as Code to Maintain your Sanity
 
Testing 101
Testing 101Testing 101
Testing 101
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
Hadoop: Big Data Stacks validation w/ iTest How to tame the elephant?
Hadoop:  Big Data Stacks validation w/ iTest  How to tame the elephant?Hadoop:  Big Data Stacks validation w/ iTest  How to tame the elephant?
Hadoop: Big Data Stacks validation w/ iTest How to tame the elephant?
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity
 

Mehr von Mark Ginnebaugh

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Mark Ginnebaugh
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Mark Ginnebaugh
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataMark Ginnebaugh
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMark Ginnebaugh
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerMark Ginnebaugh
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsMark Ginnebaugh
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Mark Ginnebaugh
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMark Ginnebaugh
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopMark Ginnebaugh
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMark Ginnebaugh
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Mark Ginnebaugh
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMark Ginnebaugh
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Mark Ginnebaugh
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012Mark Ginnebaugh
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Mark Ginnebaugh
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesMark Ginnebaugh
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Mark Ginnebaugh
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMark Ginnebaugh
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMark Ginnebaugh
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMark Ginnebaugh
 

Mehr von Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Kürzlich hochgeladen

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Microsoft SQL Server Testing Frameworks

  • 1. SQL Server Unit Testing Joel Champagne President, CodeX President CodeX Enterprises July 2011 Mark Ginnebaugh, User Group Leader,  mark@designmind.com mark@designmind com
  • 2. Who am I? Who am I? • President CodeX Enterprises LLC President CodeX Enterprises LLC • 20 years consulting experience –LLarge mission critical systems i i iti l t – .NET, SQL 2000‐2008, SSAS, SSRS, SSIS – Architecture, Data Architecture • Focus on developer productivity tools
  • 3. Why? • Unit Testing…  what’s a “unit”? • U it t ti h Unit testing has proven valuable in many  l bl i languages • Things can break for countless reasons – find Things can break for countless reasons  find  those breakages early • Some may say SQL has gotten the short end of  the stick here for various reasons h i kh f i – Harder:  time/effort to write tests for possibly  thousands of objects (many of which could be CRUD) j ( y ) – Separation of development process – Statefulness:  dependence on specific data to make it  fly (well) fly (well)
  • 4. Scenarios for Failure Scenarios for Failure • Suppose there’s an existing procedure which  has been working for ages • Someone renames a table column, missed Someone renames a table column, missed  updating this procedure for whatever reason  (e.g. different database) (e.g. different database) • Fails at run‐time…  you would have known,  however, if it had at least been  exercised however if it had at least been “exercised” • Also, what does SSMS tell us when we commit  the broken procedure…? th b k d ?
  • 5. Integration Points Integration Points • On Demand On Demand • Scheduled • S Strategic i – Build / moving objects • Automation – Includes “on change” – Continuous Integration strategies
  • 6. Visual Studio 2010 Visual Studio 2010 • Ability to run tests within VS Ability to run tests within VS • Setup tests, per object • Can have “expected results” C h “ d l ” • Schema View offers easy way to script, per  object • Demo
  • 7. Observations… • Quite powerful as we can craft data driven  tests using a bit of C# tests using a bit of C# – Not necessarily testing SQL directly (can be .NET  components) p ) – Next slide example • Hosts tests in “runnable” code (SQL scripts  ( Q p themselves stored in resource file) • Integrates as part of a larger testing  g p g g infrastructure available with Visual Studio – Test rigs, agents, etc. – Can make as complex as desired
  • 9. SQL‐Hero • Problems trying to address: – Developers often don’t like to invest time in writing tests • At least get some “touch tests” as a starting point At least get some  touch tests as a starting point – Want to exercise tests early and often! • On ALTER and scheduled (and on demand) –L Leverage tests we do have at strategic times:  e.g. scripting  d h i i i i changes to a new place • Can include these automatically from the schema compare tool! – Setting of targets, not just thresholds (so we can do  reporting / analysis vs. targets) – Tests can be somewhat “portable” (i.e. do not need to  Tests can be somewhat  portable (i.e. do not need to strictly tie to a single database) – Reality of databases with hundreds of tables, reference  data, etc. – may not be practical to re‐gen the entire thing  data etc may not be practical to re gen the entire thing from scripts, etc.
  • 11. TestingPolicies.xml Example:  a proc parameter that ends in AreaID, populate using a select from Area table that is filtered <PARAMETER> <PATTERN>AreaID$</PATTERN> <SQL_LOOKUP>SELECT AreaID FROM Area a WHERE a.AreaAbbr LIKE 'A%'</SQL_LOOKUP> / </PARAMETER> Example:  a proc parameter of @DocTypeID that relates to a table called CommDocumentType <PARAMETER> PARAMETER <NAME>@DocTypeID</NAME> <CHANGE_NAME_TO>CommDocumentType</CHANGE_NAME_TO> </PARAMETER> Example:  a sample plug‐in, put in the program filessqlheroplugins directory <PLUGIN> <ASSEMBLY_FILE>SampleTestingPlugIn.dll</ASSEMBLY_FILE> <TYPENAME>SampleTestingPlugIn.MyTestPolicy</TYPENAME> </PLUGIN> Example:  all objects in the Debug schema would be excluded from testing <OBJECT> <PATTERN>^[?Debug]?.</PATTERN> <IS_EXCLUDED>True</IS_EXCLUDED> </OBJECT>
  • 12. Notes • The test generation process will look at The test generation process will look at  captured workloads to see if an already‐ executed invocation  will work executed invocation “will work” • Is using a randomized process, but influenced  by testing policy file by testing policy file • No “side‐effects” – Rollback per object – Advantages / Disadvantages
  • 14. Running Tests Running Tests • Scheduling • Via Template • Via Template, with parallel execution! i l ih ll l i ! • From SHCommand.exe • From .sqlheroproj Visual Studio project type • Demo
  • 15. Some Observations… • Presence of touch testing has proven value from  experience  experience ‐ example • SQL‐Hero testing can augment VS testing: – VS for formal unit tests which are part of build  process, complex cases where can use C# – SH for touch tests that are just “there” behind the  scenes to find certain issues for you transparently y p y – Output of SH testing template can be used in VS, if  you like! • Not intending SQL Hero to “do it all” but  Not intending SQL‐Hero to  do it all but considering some new features along the lines of  turning captured workloads into complex test  cases (C#) ( )
  • 16. Some Observations… • Presence of touch testing has proven value from  experience  experience ‐ example • SQL‐Hero testing can augment VS testing: – VS for formal unit tests which are part of build  process, complex cases where can use C# – SH for touch tests that are just “there” behind the  scenes to find certain issues for you transparently y p y – Output of SH testing template can be used in VS, if  you like! • Not intending SQL Hero to “do it all” but  Not intending SQL‐Hero to  do it all but considering some new features along the lines of  turning captured workloads into complex test  cases (C#) ( )
  • 17. A more complex use case… p • Problems trying to address: – Data quality in development regions – Security and isolation of production data – In progress work (using external source control?) – Making this easy Making this easy • How does unit testing relate? – Integrated as part of the process to ensure things “still  work” at the end (could be a different process too) work” at the end (could be a different process too) – Overall process can serve as one way to achieve the  coveted “known starting point” – easily • YMMV – may be simpler or more complex (likely  b i l l (lik l supported!) p p g g • Watch for a whitepaper describing this in great detail • Demo
  • 18. A more complex use case ‐ illustrated… Production QA/Development Prod QANew QA (remote) Backup Backup /  Restore Backup QANew Remove… (remote) Scramble  sensitive  data
  • 19. A more complex use case ‐ illustrated… Production QA/Development Detach, Move  Detach, Move Prod Files, Attach… QANew QA (remote) Backup Sync  Pending  Changes QANew Backup Restore QANew FTP Landing  Zone Perform tests
  • 20. A more complex use case ‐ illustrated… Production QA/Development Prod QAOld (remote) E‐mail  relevant parties about  parties about completion… QA
  • 21. Putting it together… • VS Database Project VS Database Project – “Build” ‐> Deploy (local or shared) – Can exercise static code analysis – Can include unit testing Can include unit testing – Can use MSBuild, which in turn integrates with TFS / CI options • SQL‐Hero – Precludes none of the above Precludes none of the above – Adds touch testing capability during development cycle, transparently – Source control integration interops with Database Projects! – Large data sets are encouraged and easy to build – Compliance checking incorporated there acts against “real” databases, can  be scheduled, email delivery (advantages!) – Supports automated operations • Example: DB reconcile from branched dev to branched QA (both stateful worked Example:  DB reconcile from branched dev to branched QA (both stateful, worked  pretty flawlessly with a simple .cmd script) – More use cases to support:  testing from a collected workload • Your environment – Do developers do actual data modeling? – Do developers want a shared environment?
  • 22. Offers… • Looking for Customer Advisory Board  members – Free enterprise edition in exchange for on‐going  feedback (iterative development on v next  feedback (iterative development on v‐next features) • Next release coming soon (along with new  g ( g whitepapers) – Still free! – www.codexframework.com (Library) – @sqlheroguy – joelc@codexframework.com
  • 23. To learn more or inquire about speaking opportunities, please contact: o ea o e o qu e about spea g oppo tu t es, p ease co tact: Mark Ginnebaugh, User Group Leader mark@designmind.com