Skip to content

Testing with Cairo-test

Cairo-test is the included testing framework from Cairo, and can be run with scarb test (or scarb cairo-test). You need to add it as a dev dependency with the following line in your Scarb.toml:

[dev-dependencies]
cairo_test = "2.10.1" // Version should be same as your Starknet/Scarb version

Testing is done similarly as shown in the Testing with Snforge section, but all the snforge specific features are not available.

You can learn more about using Cairo-test in the Cairo Book - Testing Cairo Programs.

Powered By Nethermind