-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Application to compare results of two SQL queries
It reads tests definitions in XML format form specified directory and than runs them (as TestNG test).
If two SQL returns different results -> test fails.
Comparing databases:
With test data delivered by file:
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 e.g.
"C:\Program Files\Java\jdk1.8.0_92\bin\java" -jar DBTestCompare-1.0-SNAPSHOT-jar-with-dependencies.jar
Program searches for tests 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 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
Provided features are listed in README file.
- See Getting started.
- Home
- Getting started
- Command line parameters
- Deploying licensed jdbc drivers
- Comparators
- Fetch
- KEY
- Minus
- NMB_OF_RESULTS
- FILE
- OLAP
- Building multilevel tests structure
- TeamCity support
- Test definitions
- Filtering tests for execution
- Test report
- Compiling, replacing tokens in connection definition
- Replacing tokens in SQL queries
- Execute Stored Procedure before test