How can I create a test harness for my Sway project?

It used to come standard when creating a new project with forc new project_name but now it doesn’t. How can I add tests?

Create a default test harness by running the following command: cargo generate --init fuellabs/sway templates/sway-test-rs --name project_name

2 Likes

For a more detailed walk-through on Rust integration testing, these docs might also be useful. I’ve pinned that link to version 0.32.0 in case these docs get moved in the future.

1 Like

You can read more about testing here
https://fuellabs.github.io/sway/v0.32.1/book/testing/index.html

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.