DbFit for FitNesse with Data Warehouse worked examples

Slides:



Advertisements
Similar presentations
Database Management Using Microsoft Access Xinhua Chen, Ph.D. Chinese Association of Professionals in Science and Technology March 23, 2003.
Advertisements

Working with Tables 1 of 5. Working with Tables 2 of 5.
State of Connecticut Core-CT Project Query 8 hrs Updated 6/06/2006.
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
BY LECTURER/ AISHA DAWOOD DW Lab # 4 Overview of Extraction, Transformation, and Loading.
Exploring Microsoft Access
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Databases Week 1, lab 2 Simple selects. About the environment We are using SQL Server for the moment. The server we are using is: –Cian.student.comp.dit.ie.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
MIS2502: Data Analytics MySQL and SQL Workbench David Schuff
Structured Query Language SQL: An Introduction. SQL (Pronounced S.Q.L) The standard user and application program interface to a relational database is.
1 Working with MS SQL Server II. 2 The sqlcmd Utility Command line utility for MS SQL Server databases. Previous version called osql Available on classroom.
SQL Basics. SQL SQL (Structured Query Language) is a special-purpose programming language designed from managing data in relational database management.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Chapter 9 Using the SqlDataSource Control. References aspx.
Rationale Aspiring Database Developers should be able to efficiently query and maintain databases. This module will help students learn the Structured.
Creating Data Marts from COBOL Files (ISAM to RDBMS)
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
Learningcomputer.com SQL Server 2008 – Introduction to Transact SQL.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Examining.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
Data Management Console Synonym Editor
Searching Business Data with MOSS 2007 Enterprise Search Presenter: Corey Roth Enterprise Consultant Stonebridge Blog:
Said Salomon Unitrin Direct Insurance T-SQL for Beginners Said Salomon CODE CAMP
Database Systems Microsoft Access Practical #3 Queries Nos 215.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Intro to DatabasesClass 4 SQL REVIEW To talk to the database, you have to use SQL SQL is used by many databases, not just MySQL. SQL stands for Structured.
ADO.NET Data Access. Page  2 SQL  When we interact with the datasource through ADO.NET we use the SQL language to retrieve,modify,update information.
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
In this session, you will learn to: Use functions to customize the result set Summarize and group data Objectives.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Using SQL Connecting, Retrieving Data, Executing SQL Commands, … Svetlin Nakov Technical Trainer Software University
IT Faculty Software Engineering Seniors UML for a simple DataBase Management System Prepared by: أنس الأسود بشير الفروان زهير الزعبي ياسر المحمد.
SQL.. AN OVERVIEW lecture3 1. Overview of SQL 2  Query: allow questions to be asked of the data and display only the information required. It can include.
(SQL - Structured Query Language)
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
05 | SET Operators, Windows Functions, and Grouping Brian Alderman | MCT, CEO / Founder of MicroTechPoint Tobias Ternstrom | Microsoft SQL Server Program.
1 Database Programming with ADO.NET Kashef Mughal.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Aggregator  Performs aggregate calculations  Components of the Aggregator Transformation Aggregate expression Group by port Sorted Input option Aggregate.
Confidencial - TRACASA Automatize test [e- Reporting]
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
INCREMENTAL AGGREGATION After you create a session that includes an Aggregator transformation, you can enable the session option, Incremental Aggregation.
1 SQL Chapter 9 – 8 th edition With help from Chapter 2 – 10 th edition.
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
MYSQL AND MYSQL WORKBENCH MIS2502 Data Analytics.
 CONACT UC:  Magnific training   
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
MySQL Tutorial. Databases A database is a container that groups together a series of tables within a single structure Each database can contain 1 or more.
Lecture 9 Using Structured Query Language (SQL) Jeffery S. Horsburgh Hydroinformatics Fall 2012 This work was funded by National Science Foundation Grant.
DbFit for FitNesse with Data Warehouse worked examples Chris SAUNDERS - September 2014 [AdventureWorks2014] Source Data (multiple.
John Tran Business Program Manager, The Suddath Companies
mysql and mysql workbench
SQL: Advanced Options, Updates and Views Lecturer: Dr Pavle Mogin
Database Management  .
Database systems Lecture 3 – SQL + CRUD
SQL Fundamentals in Three Hours
SQL .. An overview lecture3.
Introduction To Structured Query Language (SQL)
Contents Preface I Introduction Lesson Objectives I-2
Relational Database Design
Lessons Vocabulary Access 2016.
Chapter 11 Managing Databases with SQL Server 2000
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

DbFit 3.0.1 for FitNesse with Data Warehouse worked examples Presented by Chris SAUNDERS - September 2014 @chrisrsaunders

99% Presentation Presenter’s Background [2%] Audience Survey [4%] DbFit Intro [5%] Data Warehouse Intro [8%] Worked Examples [75%] Discussion [5%]

Presenter’s Background

as a professional occupation. Chris SAUNDERS a little more background… Test & Agile Practitioner One who practices testing & agile software development, as a professional occupation.

Chris SAUNDERS Originally a Systems Engineer. Spent a decade on my OE in the United Kingdom. Returned to Christchurch as a Test Manager; contracted for 5 years & now permanent. 2008   Healthcare Education Payroll Local Government Christchurch Aviation New Zealand Christchurch Auckland Wellington Palmerston North Utilities Degree Education Bachelor of Technology (Honours), Information Engineering Graduated 1997 Massey University Tauranga School & Polytechnic Education Healthcare Financial Services Power Generation   Fashion IT United Kingdom Harrogate Stockport Stirling Edinburgh 1999

Audience Survey

Audience Survey Who… has used FitNesse? has used DbFit? has worked with Data Warehouses? has an understanding SQL? (Structured Query Language) What is the result of the following SQL? (Bottom table is the Fridge table) SELECT DISTINCT Drink FROM the.Fridge WHERE Temperature = 'Cold' AND Drink IN ( 'Coke' ,'Ginger Beer' ) AND ( Quality > 0 OR Quality IS NOT NULL dbo is the "default" schema for SQL Server; (database owner)

DbFit Intro

What is DbFit? DbFit is a set of fixtures which enables FIT/FitNesse tests to execute directly against a database.

What is DbFit? DbFit is a set of fixtures which enables FIT/FitNesse tests to execute directly against a database.

What is DbFit? DbFit is a set of fixtures which enables FIT/FitNesse tests to execute directly against a database.

Data Warehouse Intro Environment

Data Warehouse Environment [AdventureWorks2014] ETL [AdventureWorksDW2014] Extract Transform Load Source Data (multiple sources) Load Stage Data Warehouse Person BusinessEntityID FirstName LastName MiddleName PersonType … Person BusinessEntityID FirstName LastName MiddleName PersonType … WorkingPerson EmployeeKey BusinessEntityID FirstName LastName MiddleName SalesPersonFlag … DimPerson EmployeeKey FirstName LastName MiddleName SalesPersonFlag …

What Point to Test Source Data Warehouse Source Load Data Warehouse [AdventureWorks2014] [AdventureWorksDW2014] Extract Transform Load Source Data (multiple sources) Load Stage Data Warehouse Source Data Warehouse Source Load Data Warehouse Load Stage

What Point to Test Considered each possible test points on the threads. Source Load Stage Test Points Data Warehouse To test the whole system, one needs each thread.

Data Warehouse Intro Facts & Dims

Facts & Dimensions Fact Table Dimension Table [AdventureWorksDW2014].[dbo]. [FactResellerSales] [AdventureWorksDW2014].[dbo].[DimEmployee] Consists of the measurements, metrics or facts of a business process Calculations can be done on the measures (e.g. sum, count, min, max) Provides filtering, grouping and labelling

Worked Examples

Connection to the Database Connect command Specifying the full connection string using the full ADO.NET or JDBC connection string. or Specifying server, username, password, and database name. Connect Using File command A file contains the connection information, therefore can be environment related.

Count Data Warehouse Records table DimCustomer [AdventureWorks2014] [AdventureWorksDW2014].[dbo].[DimCustomer] ETL Known Source Data Data Warehouse Data Warehouse COUNT 18444 Check Data Warehouse table DimCustomer count record against a fixed value in FitNesse wiki page.

Count Data Warehouse Records Query command with fixed result Brittle test due to the fact this test requires updating every time test data changes as the DimCustomer table record will change. Which SQL for COUNT and why?

Count Data Warehouse Records table FactInternetSales [AdventureWorksDW2014].[dbo].[FactInternetSales] [AdventureWorks2014] ETL Known Source Data Data Warehouse COUNT Source Data Warehouse COUNT Check Data Warehouse table FactInternetSales count records against a Source data.

Count Data Warehouse Records Store Query command Compare stored queries command

Visualise SQL with Design Query in Editor

Sum Data Warehouse fields UnitPrice, table FactInternetSales [AdventureWorks2014] [AdventureWorksDW2014].[dbo].[FactInternetSales] ETL Known Source Data Data Warehouse SUM Source Data Warehouse SUM Check Data Warehouse field’s UnitPrice total sum in table FactInternetSales, against a Source data. Measures can be summed up, for all records or for a sub-set of records.

Sum Data Warehouse fields Store Query command Compare stored queries command

Check each Data Warehouse field, ListPrice in table DimProduct [AdventureWorks2014] [AdventureWorksDW2014].[dbo].[DimProduct] ETL Known Source Data Data Warehouse EXCEPT (both ways) Source Data Warehouse Check each Data Warehouse ListPrice field, in table DimProduct, against Source data. SQL’s EXCEPT function, returns any distinct values from the left query that are not also found on the right query.

Check each Data Warehouse field Limit number of errors in FitNesse. TOP 3 Return results in the same order. ORDER BY 1, 2 (or else missing records will be displayed)

Lets Change Focus

Test Database

Test Database Data Warehouse Test Database is used for: [DbFitNesseTest] [AdventureWorksDW2014] data Test Database Data Warehouse Data Warehouse Test Database is used for: Store Test data (either as a source or created from other sources) Store procedures (to be executed from FitNesse) Storing results (to compare in the future)

Test Database Report User Story Example European Internal Sales Report As an European Sales Manager, I want a Report on total “Europe Internal Sales" for each year, So that future business decisions can be made. Acceptance Criteria : 1. To include all available years 2. Only 3 countries; France, UK & Germany 3. … Year France Germany UnitedKingdom 2014 $0.00 2013 $1,578,511.80 $1,761,876.36 $2,124,007.29 2012 $648,065.54 $608,657.98 $712,700.96 2011 $410,845.33 $520,500.16 $550,591.22 2010 $3,399.99 $699.10

Test Database Data Warehouse Create a table with expected results. [DbFitNesseTest] [AdventureWorksDW2014] data Test Database Data Warehouse Data Warehouse Create a table with expected results.

Create Expected Results Table Execute command Commit command Create a table and commit to database.

Truncate Expected Results Table Inspect Table command Truncate table and commit to database. Inspect Table to confirm it’s truncated (does not Pass or Fail).

Insert into Expected Results Table Insert command Insert data into table and commit to database.

Count Data Warehouse Records Store Query command

Count Data Warehouse Records Compare Stored Queries command Data 0.00 Rounding

Count Data Warehouse Records Compare Stored Queries command

Drop Expected Results Table Drop table and commit to database.

Other Commands

Other Commands Update command Execute Procedure command Update command similar to insert command. Execute Procedure will executes a stored procedure or function for each row of data table and will bind input/output parameters to columns of the data table.

Thank you

DbFit 3.0.1 for FitNesse with Data Warehouse worked examples Adventure Works 2014 Sample Databases http://msftdbprodsamples.codeplex.com/releases/view/125550 Microsoft SQL Server 2014 Express http://msdn.microsoft.com/en-us/evalcenter/dn434042.aspx Poor Man's T-SQL Formatter http://www.architectshack.com/PoorMansTSqlFormatter.ashx DbFit examples http://www.testrun.co.nz/presentations.html (place under FitNesseRoot\DbFit\AcceptanceTests\DotNetTests) DbFit 3.0.1 for FitNesse with Data Warehouse worked examples Presented by Chris SAUNDERS - September 2014 @chrisrsaunders