consistent naming for tests

Johan Vos johan.vos at gluonhq.com
Tue Jul 9 09:33:10 UTC 2024


Hi,

An interesting question from John Hendrikx (
https://github.com/openjdk/jfx/pull/1283/#discussion_r1637684395) probably
needs some general discussion on this list.
Afaik, we don't have guidelines for how to name tests (in
https://github.com/openjdk/jfx/blob/master/CONTRIBUTING.md#coding-style-and-testing-guidelines
)

In the different test files we have, I see different patterns:
* in some cases, tests are always prefixed with `test` (e.g. `testFoo()`)
* in some cases, tests have a concise but somehow meaningful name (e.g.
`testScrollBarStaysVisible`)
* in some cases, tests refer to JBS issues (e.g. testJDK8309935)
* in some cases, the test is explained in comments.

I think it would be good to have some consistency going forward. (I'm not
advocating we need to rename existing tests!)
I don't have a strong preference myself, but I think the link to the JBS
issue that triggered the creation of a specific test is always good to
have. I am also very ok with comments, but I learned not everyone likes
that.

Thoughts?

- Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240709/9b8cbfb5/attachment-0001.htm>


More information about the openjfx-dev mailing list