https://bugs.documentfoundation.org/show_bug.cgi?id=168520

            Bug ID: 168520
           Summary: Give automated tests human-readable names
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: difficultyBeginner, easyHack, topicQA
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]
            Blocks: 143781

> There are only two hard things in Computer Science:
> cache invalidation and naming things.
> - Phil Karlton

https://www.karlton.org/2017/12/naming-things-hard/

Due to the mentioned hard problem, our code base has lots of automated tests
named like `tdf123456`, where tdf refers to this bug tracker and the number to
the ID of a report. It would be nice to change this for the better, so readers
of the code could get an idea of what a test is about at a glance.

Doing a search like this reveals multiple things:

git grep -Ei 'tdf[0-9]+' '*qa*.cxx' '*uitest*.py'

Some of the names do include text hinting about the topic.

Some of the test documents need to be renamed as well.

Many Python UI test files are named like `tdf123456` and need to be renamed as
well.

To find only the lonesome cryptic names we may use this search:

git grep -Ei 'tdf[0-9]+[\(\)"]' '*qa*.cxx' '*uitest*.py'

The suggestion is to rename tests and files in the style of
`tdf123456_hint_on_what_the_test_is_about`

The task can be a nice opportunity for new developers to get familiar with
automated testing. While thinking about a better name, read and understand the
test code and the bug report and run the single test as explained in the wiki
articles:

https://wiki.documentfoundation.org/Development/Cpp_Unit_Tests

https://wiki.documentfoundation.org/Development/UITests


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=143781
[Bug 143781] [META] Development- and code-related bug reports and tasks
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to