Writing tests is an important part in server-side Swift development. A server-side test is different from that of a client side test because server-side code involves a lot of querying different APIs by clients, or writing calls to other backend cloud services or microservices. You need to write tests that intercept calls dynamically. To do that, you instantiate and run a server instance, then you simulate the runtime environment using known data and match the output with the expected result.
If the data required for a test is not available, you can make up something using fake data or simulated data. A test is passed only if the results are validated and matched with your expectation. You don't just test if a feature works correctly when presented with valid data. You should also check if a feature fails gracefully and consistently...