DEV Community

loading...

Discussion on: On average, how many assertions/tests per endpoint do you have in your app?

Collapse
zakwillis profile image
zakwillis

Hi there. Virtually none. I see benefit far better in integration testing and data testing frameworks.
If my startup or product becomes a success, I will probably hire somebody asking them to write appropriate unit tests as part of knowledge transfer.
We would work out what types of code needs unit tests vs integration tests. Probably extension methods, logic, helpers for unit tests.
Am writing in c#. I use fakeiteasy, ninject, nunit, xunit,nbuilder, faker.
Another trick I do is to serialise data as json rather than hand coding stubs.

Collapse
graciano profile image
graciano codes Author

In integration tests, serialized data is better than stubs, I agree. Thanks for your response :)