Better DXR Testing

From MozillaWiki
Revision as of 18:29, 12 February 2013 by Erikrose (talk | contribs) (Strike out finished stuff. Add a strawman.)
Jump to navigation Jump to search

Here are some thoughts about improving the automated testing story for DXR.

Problems to solve

Things to keep

  • It's easy to run a test case as a regular DXR deployment so you can explore.
  • The top-level `make test` entrypoint is a nice, generic handle for Jenkins, no matter what language(s) or tool(s) the tests end up written with.

Strawman

Have one class that supports running tests against a concrete DXR instance—files and all. That'll be good for complex tests with many files where the FS is the least confusing place to express them. Another class can support simple tests that need a single file or so. (Fortunately, everything ends up as a single file in C anyway.) It'll include a string that gets laid down in a dynamically generated instance and compiled. There'll be a flag or well-marked place to put a breakpoint to leave the instance around in case you want to interact with it manually.