Notes drawn from practice and experience...

Prefer Data Driven Tests

Tests should be defined by data, not logic. Structure test cases around inputs, system state, and expected outcomes using data files (ex: JSON, YAML, XML) so the test code itself stays fixed and simple and new tests can be added by simply adding new data entries.

A test runner loads a JSON or YAML file listing request payloads, initial state conditions, and expected results, then loops over each entry with one implementation of the test logic to validate behavior across scenarios.