Page MenuHomePhabricator

Add a test script to wmfdata
Open, MediumPublic

Description

We should write a script that uses wmfdata as an analyst would (for example, writing data to MariaDB and Hive and querying it back) and checks that the results were correct and no errors were raised. Once checked into the repo, it can be used by developers as a smoke test before pushing changes.

Event Timeline

SNowick_WMF moved this task from Triage to Backlog on the Product-Analytics board.Mar 10 2020, 5:31 PM
kzimmerman triaged this task as Medium priority.Mar 10 2020, 5:31 PM
mpopov added a subscriber: mpopov.Mar 10 2020, 5:32 PM

I don't know that we can have automated testing for anything that requires querying a database.

I don't know that we can have automated testing for anything that requires querying a database.

Well, we can write a script that uses wmfdata as an analyst would (for example, writing data to MariaDB and Hive and querying it back) and checks that the results were correct and no errors were raised. If we check that into the repo, we can use it an easy-to-run, comprehensive (albeit manual) smoke test before we push changes.

We couldn't do it server-side, because as you say it would require database access. I was thinking about client-side automation using a Git pre-commit hook, but that's probably too heavyweight and in any case a quick read of the docs suggests it might not work the way I thought.

So, I guess I'm talking about making a test suite we can run manually rather than automated testing!

nshahquinn-wmf renamed this task from Add automated tests to wmfdata to Add a test script to wmfdata.Apr 19 2020, 5:08 PM
nshahquinn-wmf updated the task description. (Show Details)