{"id":19811138,"url":"https://github.com/accenture/dbtestcompare","last_synced_at":"2025-05-01T08:32:32.878Z","repository":{"id":13252882,"uuid":"74003169","full_name":"Accenture/DBTestCompare","owner":"Accenture","description":"Application to compare results of two SQL queries","archived":false,"fork":false,"pushed_at":"2025-04-26T08:23:13.000Z","size":14200,"stargazers_count":28,"open_issues_count":0,"forks_count":13,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-26T09:26:58.386Z","etag":null,"topics":["compare-data","database","database-migrations","jdbc-drivers","mariadb","mysql","postgresql","snowflake","sql-queries","sqlserver","teamcity","teradata","testng","tests"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Accenture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-17T07:49:28.000Z","updated_at":"2025-04-26T08:23:17.000Z","dependencies_parsed_at":"2025-02-24T08:26:55.955Z","dependency_job_id":"4e9c3c4d-8acd-41ea-9a22-027868ecd77b","html_url":"https://github.com/Accenture/DBTestCompare","commit_stats":null,"previous_names":["accenture/dbtestcompare","objectivityltd/dbtestcompare"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDBTestCompare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDBTestCompare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDBTestCompare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2FDBTestCompare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/DBTestCompare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251847828,"owners_count":21653582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compare-data","database","database-migrations","jdbc-drivers","mariadb","mysql","postgresql","snowflake","sql-queries","sqlserver","teamcity","teradata","testng","tests"],"created_at":"2024-11-12T09:24:58.100Z","updated_at":"2025-05-01T08:32:32.862Z","avatar_url":"https://github.com/Accenture.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"images/DBTestCompare.png\" alt=\"DBTestCompare\" width=\"200\"\u003e\n\n**Application to compare results of two SQL queries** \n\n[![.github/workflows/github-actions.yml](https://github.com/Accenture/DBTestCompare/actions/workflows/github-actions.yml/badge.svg)](https://github.com/Accenture/DBTestCompare/actions/workflows/github-actions.yml)\n\nIt **reads tests definitions in XML** format form [specified directory](https://github.com/ObjectivityLtd/DBTestCompare/tree/master/test-definitions) and than runs them (as TestNG test). \n\n**You can generate automated tests for your database using [DBTestCompareGenerator](https://github.com/ObjectivityLtd/DBTestCompareGenerator)**\n\nAI generated documentation [DeepWiki](https://deepwiki.com/Accenture/DBTestCompare)\n\nIf two SQL returns different results -\u003e test fails. \n\nApplication [supports TeamCity](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Real-time-test-execution-progress-in-TeamCity) Service Messages ([##teamcity messages](https://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity)) so if teamcityLogsEnabled is set to \"true\" (config file or command line parameter), you will see nice test tree in TeamCity logs.\n\nTo execute tests run program (Java 8 must be installed first (JDK or JRE)):\n\nIf you set JAVA_HOME variable:\n```\njava -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar\n```\nor to add automatically all drivers from the directory to the classspath (jdbc_drivers/*)\nWindows\n```\njava -cp \"DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar;jdbc_drivers/*\" uk.co.objectivity.test.db.RunTests\n```\nLinux\n```\njava -cp \"DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar:jdbc_drivers/*\" uk.co.objectivity.test.db.RunTests\n```\nor e.g.\n```\n\"C:\\Program Files\\Java\\jdk1.8.0_92\\bin\\java\" -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar\n```\n\nThe application provides the following features:\n- **Platform independence** - possibility to run on Windows and Linux as well (Java Runtime Environment 8 needed)\n- Supports **all databases with JDBC drivers provided** (tested with Microsoft SQL Server, Teradata, Snowflake, PostgreSQL and MySQL\\MariaDB)\n- Supports **all Continuous Integration tools** thanks to TestNG Java unit test framework\n- Possibility to compare data between **two different database engines** even for huge data sets \nwithout \"Out of memory problem\" thanks to an incremental solution, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Fetch)\n- Possibility to compare query to **expected data defined in csv file** and generate **Excel test report**, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/KEY)\n- Possibility to compare data in **one database engine in the fastest way** using MINUS/EXCEPT Sql operator, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Minus)\n- **No need to compile program** in order to add new tests - thanks to Test Adapter DataDriven mechanism from TestNG \n- Possibility to **execute tests in parallel** by setting Threads parameter in the connection file.\n- Possibility to build **multilevel tests structure**\n- Possibility to **save query results to flat files**\n- Real-time test execution progress in **TeamCity**, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Real-time-test-execution-progress-in-TeamCity)\n- Possibility to store Queries in **separated files or inline** in xml test definitions, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Storing-queries-in-separated-files-or-inline-in-xml-test-definitions)\n- **Connection pool** used for executing tests - connections to databases are not closed \nafter each tests, but when all tests are finished\n- Possibility to compare query to **expected data defined in csv file**, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/FILE)\n- Possibility to compare query to **expected number of rows** defined in XML test definition, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/NMB_OF_RESULTS)\n- Possibility to **choose exit code** in case  of test failure\n- Possibility to **connect to OLAP - compare mdx queries**, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/OLAP)\n- Possibility to define **\"delta\"** precision of comparing floating-point numbers\n- Possibility to **filter tests** for execution by including or excluding, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Filtering-tests-for-execution-by-including-or-excluding)\n- Standard **TestNG html test report** in \"test-output\" folder, more details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Test-results---TestNG-html-report-in-%22test-output%22-folder)\n\n### How DBTestCompare works:\n\nComparing databases:\n\n\u003cimg src=\"images/comparingDB.png\" alt=\"DBTestCompare\"\u003e\n\nWith test data delivered by file:\n\n\u003cimg src=\"images/comparingDataDB.png\" alt=\"DBTestCompare\"\u003e\n\nThe program searches for test definitions by default in folder \"test-definitions\".\n\nJDBC drivers must be present in \"jdbc_drivers\" folder.\nLicensed database drivers are NOT included, only open source like MySQL, MariaDB and PostgreSQL. \nDownload 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). \n\nMore details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Deploying-licensed-jdbc-drivers-(not-open-source))\n\nYou can override some of the application configuration properties, run app with:\n\n -DtestsDir=path             -set tests directory (default: test-definitions)\n \n -DteamcityLogsEnabled=true  -log test output in TeamCity format\n \n -DfilterInclude=a.b,g.z.f   -comma separated directories or test files which you want to include\n \n -DfilterExclude=a.b.test    -comma separated directories or test files which you want to exclude\n\nfor example:\n\n```\njava -DtestsDir=my_tests -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar\n```\nMore details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Command-line-parameters)\n\n3'rd party libraries:\nSoftware:\n- SIROCCO :: Text Table Formatter\n- Apache Log4j\n- com.sun.xml.bind :: JAXB Runtime\n- com.mchange :: c3p0 - a JDBC Connection pooling / Statement caching library\n\nMore details [here](https://github.com/ObjectivityLtd/DBTestCompare/blob/master/LICENSE-3RD-PARTY)\n\n#### Where to start?\n-------------\n- See [Getting started](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Getting-started).\n\nCheckout the code or get compiled jar file from [releases page](https://github.com/ObjectivityLtd/DBTestCompare/releases)\n\n-------------\n\nTo compile app to a runnable fat jar file, run (Maven must be installed first):\n```\nmvn clean compile assembly:single\n```\njar will be created in target directory.\n\n-------------\n\nYou can manage the application by attached ANT (ANT must be installed first) build.xml file (in folder \\deploy), the script allows to :\n\n-compile app\n\n-replace tokens in connection definition  \n\n-replace tokens in SQL queries\n\nmore details [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Compiling,-replacing-tokens-in-connection-definition) and  [here](https://github.com/ObjectivityLtd/DBTestCompare/wiki/Replacing-tokens-in-SQL-queries)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fdbtestcompare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Fdbtestcompare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fdbtestcompare/lists"}