druid/quidem-it
Zoltan Haindrich 6c02cbdf4d fixes 2024-06-25 06:38:13 +00:00
..
src Revert "Revert "Revert "add kttm tx""" 2024-06-20 17:45:08 +00:00
README.md update readme 2024-06-20 17:45:01 +00:00
pom.xml fixes 2024-06-25 06:38:13 +00:00

README.md

Quidem IT

Enables to write sql level tests easily. Can be used to write tests against existing test backends (ComponentSupplier) - by doing so the testcases can be moved closer to the excercised codes.

Usage

Install java&maven (if needed)

If you don't have java&maven - one way to set that up is by using sdkman like this:

# install sdkman
curl -s "https://get.sdkman.io" | bash
# at the end of installation either open a new terminal; or follow the instructions at the end

# install java&maven
sdk install java 11.0.23-zulu
sdk install maven

# run mvn to see if it works
mvn --version

# download druid sourcces (FIXME: change this to the main repo/branch before merging)
git clone --branch quidem-record https://github.com/kgyrtkirk/druid

Running these tests

  • CI execution happens by a standard JUnit test QTest in this module
  • the dev/quidem script can be used to run these tests (after the project is built)

Launching a test generating broker

  • make sure to build the project first; one way to do that is:
    mvn install -pl quidem-it/ -am -DskipTests -Pskip-static-checks
    
  • launch the broker instance with:
    mvn exec:exec -pl quidem-it -Dquidem.record.autostart=true
    
    • the broker will be running at http://localhost:12345
    • the used test configuration backend can configured by supplying quidem.uri
      mvn exec:exec -pl quidem-it -Dquidem.uri=druidtest:///?componentSupplier=ThetaSketchComponentSupplier
      
    • new record files can be started by calling http://localhost:12345/quidem/start
      • if quidem.record.autostart is omitted recording will not start
  • after finished with the usage of the broker ; a new record-123.iq file will be in the project's worktree - it will contain all the executed statements
    • running dev/quidem -Dquidem.overwrite updates the resultsets of all iq files around there
    • rename the testfile to have a more descriptive name