Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Best practices for Testing #6

@trustmaster

Description

@trustmaster

I would like to open a discussion on recommended approaches to testing Golang projects at HelloFresh, split into sections below.

Testing framework

I've noticed the following testing combinations in some of the existing Go projects at HelloFresh:

  1. No tests

:trollface:

  1. testing + testify

Some classic tests with assertion.

  1. GoDog + plain testing + testify

I suppose this was supposed to be somewhat BDD, with some traditional unit tests and testify for assertions. But I haven't understood how the responsibilities between godog-generated tests and other test files are separated in that project.

Could someone shed more light on the subject and also why you prefer Godog over Ginkgo and GoConvey?

Mocks

Do you prefer mocking external services at interface level or via HTTP mocks? What do you use for that?

HTTP requests

Do you use any specific approach to tests HTTP route handlers?


If you have more feedback to share, go ahead. I'll combine it into a wiki page later on.

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