Better DXR Testing: Difference between revisions

Jump to navigation Jump to search
m
Line 3: Line 3:
== Problems to solve ==
== Problems to solve ==
* It's hard to make a new test. You have to duplicate a lot of boilerplate, change dir names in said boilerplate, and the number of files goes way up.
* It's hard to make a new test. You have to duplicate a lot of boilerplate, change dir names in said boilerplate, and the number of files goes way up.
* Because new test fixtures are hard to make, we just jam everything into json-test, which couples all the tests together. We risk invalidating old tests every time we change something.
* Because new test fixtures are hard to make, we just jam everything into json-test, which couples all the tests together. We risk invalidating old tests every time we change something, and it's hard to keep track of what's significant.
* <strike>We have to write our own lame testrunner: that "global failed" thing in search-test.py that keeps track of whether any tests have failed. And there's a bare except in there. We would rather not maintain any pieces of our own testrunner that we don't have to. We *certainly* don't want to duplicate them. </strike>(Fixed in https://github.com/mozilla/dxr/commit/20fddc60536b0bc10b2cd5daaea3aa0e685cfd1e.)
* <strike>We have to write our own lame testrunner: that "global failed" thing in search-test.py that keeps track of whether any tests have failed. And there's a bare except in there. We would rather not maintain any pieces of our own testrunner that we don't have to. We *certainly* don't want to duplicate them. </strike>(Fixed in https://github.com/mozilla/dxr/commit/20fddc60536b0bc10b2cd5daaea3aa0e685cfd1e.)
* <strike>There's another layer of custom test framework: run-tests.py. Right now, it's a spaghetti of shell scripts and sleeps. Surely at least we can share some common setup and teardown.</strike> (Fixed in https://github.com/mozilla/dxr/commit/20fddc60536b0bc10b2cd5daaea3aa0e685cfd1e.)
* <strike>There's another layer of custom test framework: run-tests.py. Right now, it's a spaghetti of shell scripts and sleeps. Surely at least we can share some common setup and teardown.</strike> (Fixed in https://github.com/mozilla/dxr/commit/20fddc60536b0bc10b2cd5daaea3aa0e685cfd1e.)
Confirmed users
574

edits

Navigation menu