Skip to content

test(dwh-migration): setup test suite to validate DWH migration - #128

Merged
florisvdh merged 3 commits into
dev_nextreleasefrom
test/add-dwh-migration-tests
Jul 15, 2026
Merged

test(dwh-migration): setup test suite to validate DWH migration#128
florisvdh merged 3 commits into
dev_nextreleasefrom
test/add-dwh-migration-tests

Conversation

@droomelotdegendt

Copy link
Copy Markdown
Collaborator

Goal

Add a dedicated test suite designed to verify package behavior during DWH migration.

These tests target a robust static vallidation subset of locked locations (locations that are unlikely to have data changes in the future) with high observation counts to ensure that our core query pipelines (get_locs(), get_xg3(), and get_chem()) maintain the same output over database updates.

NOTE: this subset was created in collaboration with the Databeheer team (who performed the actual database migration).

Key Changes

  • tests/testthat/test-dwh-migration: Introduction of new testing file with tests that evaluate all functions that create database queries.
  • test.run_dwh_migration: New toggle option to ensure the test can be isolated and ignored when unnecessary.
  • README.me: Updated the testing documentation to guide developers on how to run these migration tests.

How to run

By default, these tests are skipped. When verifying the data warehouse migration, run the following:

# 1. Enable migration tests
options(test.run_dwh_migration = TRUE)

# 2. Load the package
devtools::load_all()

# 3. Create testing connection
test_con <- connect_watina()

# 4. Run the suite
devtools::test(filter = "dwh-migration")

@florisvdh florisvdh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work, thank you!! 👌

Comment thread tests/testthat/README.md
Comment thread tests/testthat/README.md Outdated
Comment thread tests/testthat/test-dwh-migration.R Outdated
Comment thread tests/testthat/helper.R
Comment thread tests/testthat/helper.R

@florisvdh florisvdh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Again, the target branch is yours so merging is up to you!

Comment thread tests/testthat/helper.R
Base automatically changed from apply-air-formatter to dev_nextrelease July 15, 2026 08:14
@florisvdh
florisvdh merged commit aba6caf into dev_nextrelease Jul 15, 2026
@florisvdh
florisvdh deleted the test/add-dwh-migration-tests branch July 15, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants