Sign In Register

How can we help you today?

Start a new topic

Possible to build an external test harness?


I would like to create some C# unit tests which would run my set of test scripts and then validate on expectations.

Basically, I would like to build my own automated test harness for cloud code methods.

Is there a recommended way of doing this? Surely big production games must be having automated unit tests for their cloud code to validate behaviors and run regression tests before pushing to live environments.

I suppose I could use the Unity SDK inside of a C# unit test project outside of my Unity game. But is there a better or more recommended way? Maybe there's a C# API you guys expose somewhere? Or maybe there's a 'test harness mode' for the  SDK that I don't know about?

Thank you so much!


 Hey Drew,

The test-harness just emulates what the client SDK would be able to do in a live environment. So even the test-harness requires a websocket connection to start sending and receiving requests.

If you want to full integration tests i'd recommend using our C# SDK or building some test scenes in Unity.

For unit-tests this would work too, but it you want something more flexible you would also use our REST api so create automated test with C# (python is also great for this). You can see some docs for our REST api here.

Let us know if thats what you were looking for.

Just to clarify my question a little more: Is there a way to programmatically call a given cloud method with ONLY a JSON payload and getting back a JSON response? (basically, mimicking the test harness?) If not, what's the recommended way to write automated test suites against cloud code? Is it to use the SDK, and if so, which SDK would I use for C# unit tests?

Thanks (sorry - I couldn't edit my original question)

Login to post a comment