Skip to content

stacks-node: evaluate prefix usage for test naming #6057

Open
@fdefelici

Description

@fdefelici

Currently no standard naming of test functions exists.

  • Some just start with the test scenario (e.g. "do_check_this_thing")
  • Other start with "test_" suffix (e.g. "test_do_check_this_thing")

The idea is to prefix test based on the type:

  • for unit tests prefix "ut_" (e.g. "ut_do_unittest_things")
  • for integration tests prefix "it_" (e.g. "it_do_intetest_things")

(Or eventually, just use the "test_" prefix for all the test functions)

This, not just for test filtering (because it will be possible using proper cargo test flag), but mainly to simplify function recognition type recognition in the IDE (using the outline for instance) and disambiguate easily from utility functions and test functions.

We could start in stacks-node to roll-out the standard and then spread incrementally in other packages later on

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationRequires new or updates to our documentationtesting

    Type

    No type

    Projects

    Status

    Status: 🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions