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

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTopCSSGallery
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 

Kürzlich hochgeladen (20)

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 

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