Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

madsem's avatar

When testing, and your app requires third-party API data, how/what to test first?

When testing, and your app requires third-party API data, how/what to test first?

So I'm finally starting to write tests :) First project where I decide to do this, will get all of it's data (except local users) from third-party apis.

How would you start testing, what tests to write first? Actually having the tests connect via API, get results and then do something with it? Fake all of the data, and once at that point, only test if a connection is successful i.e returns something? What if certain data cannot be faked?

Maybe you guys can give me some good pointers here, I would certainly appreciate any :)

0 likes
1 reply

Please or to participate in this conversation.