-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autogen per-test docs for discoverability #240
Comments
So there have been attempts by me in the past to group together sytests into coherent sections which are useful to end users: this is what are we synapse yet? is, which assigns each test a 3 letter code which determines the grouping, resulting in an output like:
The intention of this grouping was to let end users who may want to run Dendrite roughly know which features were implemented and which were not automatically. There's other ways you can group tests though which are useful to different audiences:
It's unclear to me how the tests should be grouped in order for it to be most useful to the target audience: test writers. |
(Keep in mind that this is a different issue than #241, which is more about file layout, this is more about creating a "lookup/search directory") I think that providing corresponding behaviour and variant information to tests could already help test writers, but your comment on the three different categories of categorisation gives me an idea to include that additional information (endpoints, spec area, features) alongside this listing of tests, so that it could possibly be displayed in a likewise website such AWSY, only somewhat more akin to like the clippy lint directory In short; I think for test writers it could be good enough to provide a central reference list of tests and some corresponding documentation, but that for homeserver developers, some more metadata and information about what exactly is tested would be helpful for them. I don't think that such a list should be hierarchical, but more about tagging areas of interest which a particular test touches. |
I think the solution here then is to just autogen a directory listing of tests from (package, testname), and we can automatically pull out the top test comment as well. It'll make it slightly easier to CTRL+F. We already do stuff like this for https://github.com/matrix-org/complement/blob/main/ENVIRONMENT.md Renaming issue. |
While working on importing sytests, i found myself
ctrl-shift-f
-ing on keywords to see what tests already existed to see if a sytest would fit that file, however, I think that this displays some poor test discoverability.However, when i was documenting some sytests (and their behaviour), i came upon something like the following format;
I think it would be useful to programmatically document (and maybe link) these tests, so that a quick glance can see which ones exist, what it does, what variants of behaviour it's also testing, and also in which "areas" of testing matrix it exists.
For a final variant of above schema, i think adding a
path
(something liketests/csapi/rooms_state_test.go:TestRoomCreationReportsEventsToMyself
) would help auto-identify the corresponding function.The text was updated successfully, but these errors were encountered: