Skip to content

Improve backend test names to be more readable #72

@Velocities

Description

@Velocities

Many of our current existing tests for the Laravel API Controllers are poorly named, like testShowGroceryItem or testShowGroceryItemUnauthorized; to make debugging failed tests easier, backend tests should follow this naming convention: methodUnderTest_ScenarioName_ExpectedOutcome.

For example, the following test would be a good name for an alternative to testShowGroceryItemUnauthorized: show_unauthorizedUser_returns403Error.

By adopting this naming convention, we can ensure our test suite is easier to understand and maintain.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions