1 Comment

Key to a maintainable and readable test suite is a clear test data strategy that ensure tests are independent of one another as much as possible. Being clear what data can be expected to exist in the system under test: none, essential data like countries, currencies and languages, common test data like a known set of example products, etc. Ensuring tests do not modify any of that base test data. Ensuring closely related sets of tests create and teardown the specific test data they need to use and modify. Ensuring unique identifiers for specific test data items cannot clash with existing data items, and so on. More and more when testing at API level, it is less about the end point being called and more about the payload provided and returned.

Expand full comment