<style>
.red {
color:#c7254e
}
.light-red {
color: #FF7F7F;
}
.i {
font-style: italic;
}
</style>
# Zombienet-sdk (v2)
## e2e testing
---
## Agenda:
- How to config a <span class=red>network definition</span>
- How to spawn the network with _multiple_ <span class="red i">providers</span>
- New <span class="red i">Docker</span> provider
- Network interaction options
- Integration tests
- Test runner?, Crates?
- Q&A
---
### Create a new config through the `skd`
- Configuration can be created by a fluent api backed by several _builders_ ([config docs](https://paritytech.github.io/zombienet-sdk/zombienet_configuration/index.html)).
- Built with an state pattern that _guide_ you
- Validate config at <span class="light-red">build</span>
- Error reporting show the complete set of errors
- <span class="light-red i">open questions</span>:
- _Groups_ and _toml / json_ config loader
---
### Same config multiple providers
Spawn the same network configuration in one of the available provider requires no changes.*
- You can build the provider or just use one of the Ext from <span class="red i">NetworkConfigExt</span>
- <span class="light-red i">open questions</span>:
- _providers helpers_: infra helpers for providers (e.g prometheus is in progress). Support a generic helpers (just spawn a process/container/pod)?
---
### Docker/Podman support
- We introduce support for docker/podman
- Auto-detect one or the other (default is `docker`)
- <span class="light-red i">open questions</span>:
- _Export as compose_: Allow to export for reuse later directly through docker.
---
### Network Interactions
- Network interaction options:
- [subxt client](https://github.com/paritytech/subxt)
- [pjs](https://github.com/pepoviola/pjs-rs/)
- prometheus (node/global)
- run script (shell) in node
- Get node's logs
- Add / remove nodes (both in relay and parachain)
- Add paras
----
#### Open questions
- Helpers (wait_* methods)
- JS helpers, move the ones are built in v1 to use with pjs wrapper
---
### Integration testing
The <span class="red i">sdk</span> make no assuptions (at the moment) on how you wan to use to build integration tests, some of the paths we are exploring are:
- Using <span class="red i">nextest</span> and build the test for reuse in CI
- Create a <span class="red i">binary per test</span> and just rely in the exit code
- Build a an <span class="red i">integration machinery</span> to run with cargo test
----
<span class="light-red i">open questions</span>:
- Build a test-runner?
---
General questions:
- Helpers:
- <span class="red i">DSL</span> (is still needed)
- Features:
- Attach to running network
- Load network configuration and run snippets
- Groups (maybe just a macro for creating nodes)
---
Q&A
{"title":"Zombienet-sdk (v2)","description":"Zombienet-sdk (v2) e2e testing","contributors":"[{\"id\":\"29b42f54-f390-45bd-95bf-cb6443d11eb6\",\"add\":4222,\"del\":1299}]"}