As a libp2p maintainer, I want the ability to define test suites that combine many implementations, many muxers, many transports, etc. Defining and running these test suites should be simple, and the outcome should be clear. It should be easy to trigger these test suites before a release. It should be easy to display these results in a readable form on a website.
eta: 2022Q4
Tasks
Follow-up tasks
Description
A high-level approach:
- first, we use versions resources file to generate "complex" test matrixes,
- then we use another resource (data or code) to produce the expected RTT matrix,
- then we generate the relevant composition file (as shown below), with the expected RTT as a parameter,
- then we iterate through these test cases and call
testground run.
Configurations
Ideally, the libp2p team provides a resource file that contains the versions and their features:
[[groups]]
# go v0.42
GoVersion = '1.18'
Modfile = "go.v0.22.mod"
Selector = 'v0.42'
Implementation = 'go'
SupportedTransports = ["tcp", "quic", "webrtc"]
Muxer = ["yamux"]
[[groups]]
# go v0.22
GoVersion = '1.18'
Modfile = "go.v0.22.mod"
Selector = 'v0.22'
Implementation = 'go'
SupportedTransports = ["tcp", "quic"]
Muxer = ["mplex"]
[[groups]]
# rust v0.51
Libp2pVersion = 'v0.51.0'
Implementation = 'rust'
SupportedTransports = ["tcp", "webrtc"]
[[groups]]
# rust v0.47.0
Libp2pVersion = 'v0.47.0'
Implementation = 'rust'
SupportedTransports = ["tcp"]
Muxer = ["yamux", "mplex"]
And we'll create some way to have "meta-compositions" that can describe multiple tests and run many pairs together,
something like
(pseucode)
{ for every group }
{ if !group.SupportedTransports contains ENV.TESTED_TRANSPORT }
{ continue }
{ end }
{ if !group.SupportedTransports contains ENV.TESTED_MUXER }
{ continue }
{ end }
[testground_instance]
{}
{ endfor }
Called with
ENV.TESTED_TRANSPORT = "tcp"
ENV.TESTED_MUXER = "yamux"
testground run composition file
Related discussions and issues
eta: 2022Q4
Tasks
Follow-up tasks
Description
A high-level approach:
testground run.Configurations
Ideally, the libp2p team provides a resource file that contains the versions and their features:
And we'll create some way to have "meta-compositions" that can describe multiple tests and run many pairs together,
something like
(pseucode)
Called with
Related discussions and issues