All Projects → ObjectivityLtd → DBTestCompare

ObjectivityLtd / DBTestCompare

Licence: MIT license
Application to compare results of two SQL queries

Programming Languages

java
68154 projects - #9 most used programming language
powershell
5483 projects

Projects that are alternatives of or similar to DBTestCompare

Yuniql
Free and open source schema versioning and database migration made natively with .NET Core.
Stars: ✭ 156 (+940%)
Mutual labels:  snowflake, mariadb, database-migrations, sqlserver
Liquibase
Main Liquibase Source
Stars: ✭ 2,910 (+19300%)
Mutual labels:  mariadb, database-migrations, sqlserver
Tbls
tbls is a CI-Friendly tool for document a database, written in Go.
Stars: ✭ 940 (+6166.67%)
Mutual labels:  snowflake, mariadb, sqlserver
r2dbc-migrate
R2DBC database migration tool & library
Stars: ✭ 83 (+453.33%)
Mutual labels:  mariadb, database-migrations, sqlserver
thinkorm
A flexible, lightweight and powerful Object-Relational Mapper for Node.js. Support TypeScript!!
Stars: ✭ 33 (+120%)
Mutual labels:  mariadb, sqlserver
typetta
Node.js ORM written in TypeScript for type lovers.
Stars: ✭ 44 (+193.33%)
Mutual labels:  mariadb, sqlserver
Evolve
Database migration tool for .NET and .NET Core projects. Inspired by Flyway.
Stars: ✭ 477 (+3080%)
Mutual labels:  mariadb, sqlserver
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+121020%)
Mutual labels:  mariadb, sqlserver
upscheme
Database migrations and schema updates made easy
Stars: ✭ 737 (+4813.33%)
Mutual labels:  database-migrations, sqlserver
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+176960%)
Mutual labels:  mariadb, sqlserver
Gosora
Gosora is an ultra-fast and secure forum software written in Go that balances usability with functionality.
Stars: ✭ 131 (+773.33%)
Mutual labels:  mariadb, sqlserver
nocodb
🔥 🔥 🔥 Open Source Airtable Alternative - turns any MySQL, Postgres, SQLite into a Spreadsheet with REST APIs.
Stars: ✭ 28,894 (+192526.67%)
Mutual labels:  mariadb, sqlserver
db-doc
📝一款生成在线/离线数据库文档的小工具
Stars: ✭ 98 (+553.33%)
Mutual labels:  mariadb, sqlserver
ormdb
ORM tool for .Net / .Net.Core
Stars: ✭ 14 (-6.67%)
Mutual labels:  mariadb, sqlserver
migration
Simple library writen in PHP without framework dependancy for database version control. Supports Sqlite, MySql, Sql Server and Postgres
Stars: ✭ 142 (+846.67%)
Mutual labels:  database-migrations, sqlserver
Ebean
Ebean ORM
Stars: ✭ 1,172 (+7713.33%)
Mutual labels:  mariadb, sqlserver
Qxorm
QxOrm library - C++ Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository
Stars: ✭ 176 (+1073.33%)
Mutual labels:  mariadb, sqlserver
Sharding Method
分表分库的新思路——服务层Sharding框架,全SQL、全数据库兼容,ACID特性与原生数据库一致,能实现RR级别读写分离,无SQL解析性能更高
Stars: ✭ 188 (+1153.33%)
Mutual labels:  mariadb, sqlserver
Mindsdb
Predictive AI layer for existing databases.
Stars: ✭ 4,199 (+27893.33%)
Mutual labels:  snowflake, mariadb
pipe-mysql.vim
MySQL client runner to query MySQL / Amazon Aurora / MariaDB database in Vim interactively (also remotely)
Stars: ✭ 51 (+240%)
Mutual labels:  mariadb

DBTestCompare

Application to compare results of two SQL queries

Build Status Azure DevOps tests

It reads tests definitions in XML format form specified directory and than runs them (as TestNG test).

You can generate automated tests for your database using DBTestCompareGenerator

If two SQL returns different results -> test fails.

Application supports TeamCity Service Messages (##teamcity messages) so if teamcityLogsEnabled is set to "true" (config file or command line parameter), you will see nice test tree in TeamCity logs.

To execute tests run program (Java 8 must be installed first (JDK or JRE)):

If you set JAVA_HOME variable:

java -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar

or to add automatically all drivers from the directory to the classspath (jdbc_drivers/*) Windows

java -cp "DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar;jdbc_drivers/*" uk.co.objectivity.test.db.RunTests

Linux

java -cp "DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar:jdbc_drivers/*" uk.co.objectivity.test.db.RunTests

or e.g.

"C:\Program Files\Java\jdk1.8.0_92\bin\java" -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar

The application provides the following features:

  • Platform independence - possibility to run on Windows and Linux as well (Java Runtime Environment 8 needed)
  • Supports all databases with JDBC drivers provided (tested with Microsoft SQL Server, Teradata, Snowflake, PostgreSQL and MySQL\MariaDB)
  • Supports all Continuous Integration tools thanks to TestNG Java unit test framework
  • Possibility to compare data between two different database engines even for huge data sets without "Out of memory problem" thanks to an incremental solution, more details here
  • Possibility to compare query to expected data defined in csv file and generate Excel test report, more details here
  • Possibility to compare data in one database engine in the fastest way using MINUS/EXCEPT Sql operator, more details here
  • No need to compile program in order to add new tests - thanks to Test Adapter DataDriven mechanism from TestNG
  • Possibility to execute tests in parallel by setting Threads parameter in the connection file.
  • Possibility to build multilevel tests structure
  • Possibility to save query results to flat files
  • Real-time test execution progress in TeamCity, more details here
  • Possibility to store Queries in separated files or inline in xml test definitions, more details here
  • Connection pool used for executing tests - connections to databases are not closed after each tests, but when all tests are finished
  • Possibility to compare query to expected data defined in csv file, more details here
  • Possibility to compare query to expected number of rows defined in XML test definition, more details here
  • Possibility to choose exit code in case of test failure
  • Possibility to connect to OLAP - compare mdx queries, more details here
  • Possibility to define "delta" precision of comparing floating-point numbers
  • Possibility to filter tests for execution by including or excluding, more details here
  • Standard TestNG html test report in "test-output" folder, more details here

How DBTestCompare works:

Comparing databases:

DBTestCompare

With test data delivered by file:

DBTestCompare

The program searches for test definitions by default in folder "test-definitions".

JDBC drivers must be present in "jdbc_drivers" folder. Licensed database drivers are NOT included, only open source like MySQL, MariaDB and PostgreSQL. Download licensed database drivers from the producer of the database e.g. Microsoft and put them in "jdbc_drivers" folder (on the same level as *.jar file).

More details here

You can override some of the application configuration properties, run app with:

-DtestsDir=path -set tests directory (default: test-definitions)

-DteamcityLogsEnabled=true -log test output in TeamCity format

-DfilterInclude=a.b,g.z.f -comma separated directories or test files which you want to include

-DfilterExclude=a.b.test -comma separated directories or test files which you want to exclude

for example:

java -DtestsDir=my_tests -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar

More details here

3'rd party libraries: Software:

  • SIROCCO :: Text Table Formatter
  • Apache Log4j
  • com.sun.xml.bind :: JAXB Runtime
  • com.mchange :: c3p0 - a JDBC Connection pooling / Statement caching library

More details here

Where to start?


Checkout the code or get compiled jar file from releases page


To compile app to a runnable fat jar file, run (Maven must be installed first):

mvn clean compile assembly:single

jar will be created in target directory.


You can manage the application by attached ANT (ANT must be installed first) build.xml file (in folder \deploy), the script allows to :

-compile app

-replace tokens in connection definition

-replace tokens in SQL queries

more details here and here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].