Partnered Account for Testing Purposes

So let’s say I want to test the Pub/Sub API that requires a websocket connection and you to subscribe to specific topics.

Should the user be required to create a mock Pub/Sub API locally?

In your example, how would I have been able to figure out that I was not subscribed to a topic if I only copied the mock data?

So the burden of developing something for API testing should be pushed onto the API consumers, where the total combined time of maintain a mock API and time wasted from lack of proper testing would likely exponentially exceed the time Twitch would need to create a mock API?

Things like GET or POST endpoints don’t need it, Drops probably don’t need it, etc. So the only thing that really needs it is PubSub and the EventSub I guess. Is it that difficult to create a dashboard that taps into whatever services manage the Pub/Sub websocket connection to send events?

Also, the idea of writing code directly in your application just to test is silly. If the point is testing the Pub/Sub aspect of the API through a websocket connection, how would copying data directly into a variable solve that problem?

I guess if the consumer made their own websocket Pub/Sub server to mock the Twitch API, they could just swap out the twitch links for their local links in something like a dotenv file, but then what if you just wrote the wrong URL into the dotenv file or in your application’s config?

I get what you’re trying to say, but there really is just no excuse. Many other services that use Pub/Sub have testing on their end. I doubt that the cost to create maintain a testing environment, at least for their Pub/Sub where it is needed and has no other method to test than literally buying subs or bits is that significant.