8.测试(Testing)

Sway aims to provide facilities for both unit testing and integration testing.

Sway 为单元测试和集成测试提供便利。

Unit testing refers to "in-language" testing which can be triggered via the forc test command. Sway unit testing is currently a high-priority work-in-progress, you can follow along at this issue.

单元测试 指的是可以通过 forc test 命令触发的“语言内”测试。 Sway 单元测试目前是一项高优先级的工作,您可以在这里 上关注。

Integration testing refers to the testing of your Sway project's integration within some wider application. You can add integration testing to your Sway+Rust projects today using the cargo generate template and Rust SDK.

集成测试 是指在更广泛的应用程序中测试 Sway 项目的集成。您现在可以使用 cargo generate 模板和 Rust SDK 将集成测试添加到您的 Sway+Rust 项目中。

Last updated