Testground Hacks & Tricks

4 May 2022


Testground is an open source tool developer by Protocol Labs. It’s designed to write large scale test plans for decentralized software.

URL: https://docs.testground.ai/

Run testground on your server

Setup testground on a server, Run the daemon with testground daemon.

On your machine, tunnel the testground port:

ssh MYMACHINE -N -L "8043:localhost:8042"

Then change the testground configuration to talk to your server:

in file: ~/testground/.env.toml

endpoint = "http://localhost:8043"

Now you can talk to your server without wasting time with proxies and stuff.

You can access your dashboard at http://localhost:8043/.

Import testground plans with a name

I use a lot of testground test plans, for example:

Each of these have different use cases, and I ended up with a lot of different plans. Also you need sort of a fixed names for your plan when you run them through a composition (to be explained).

When you import a plan you can give them a name, for example:

testground plan import --from ./ --name libp2p

Now all the plans in this folder can be addressed with the name libp2p. I can run:

testground run single --plan libp2p/ping-interop/go-v0.11 --testcase=ping --builder=doc..

Same for other projects, note the testground prefix in the plan name:

testground run single --plan=testground/example-rust --testcase=tcp-connect --builder=d..

You can use the run single command from anywhere because testground is actually looking for symbolic links in the ~/testground folder hence the naming prefix working.

Laurent Senta

I wrote software for large distributed systems, web applications, and even robots. These days I focus on making developers, creators, and humans more productive through IPDX.co.