How do I test my Sway contract?

You can test Sway contracts with the Fuels Rust SDK or TypeScript SDK. You can find examples in the official docs below:

https://fuellabs.github.io/fuels-rs/

1 Like

I’ll add that there are plans to support testing contract calls from Sway’s in-language unit testing too:

This is currently WIP, but is one of the Sway tooling team’s top priorities at the moment.

5 Likes