Skip to content

[Problem] We haven't been doing testing properly #91

@Gnuxie

Description

@Gnuxie

Unit

We don't write many unit tests simply because we haven't figured out a good pattern for writing them. The problem is that unit tests are always second class to the rest of the program. To start with, they exist in separate files. The biggest issue is that they become a place to write glue code without documenting properly why and what is being tested. Unit testing frameworks encourage this to a large extent.

We are going to explore fixing this by declaring behaviour against interfaces in such a way that this becomes part of the program and not some second class glue slop that no one cares about.

Unit testing frameworks also naturally incentivise you to write unit tests against concrete instances rather than interfaces too which is also just an unspeakable anti pattern

Integration

We have the same problem for integration tests but it's even worse. Integration tests should always be about testing the of code that exists in concrete parts of the code base. Not even the composition glue code because surely that can be tested too? who knows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions