forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Rust integration testing behaviour from
forc test
in anticip…
…ation of unit testing support (FuelLabs#2264) This PR is a WIP that aims to address the first 3 steps in FuelLabs#1833. This is in anticipation of using `forc test` to support unit testing (rather than Rust integration testing) FuelLabs#1832. The `forc test` command remains for now, but outputs a message explaining that the command is now reserved for unit testing and links to the issues above. ## TODO - [x] Create a new `sway-test-rs` repo or similar that can be used as a `cargo generate` template. - [x] Update Rust integration testing docs in the Sway book to describe how to use the `cargo generate` command to easily add Sway integration testing to an existing Rust project. ## Follow-up - Create a `forc-test-rs` crate that re-exports and extends `fuels` with useful `forc` functionality for integration testing (e.g. re-exporting `forc_pkg::build` to ensure sway code is built and available under `out/` at the start of testing).
- Loading branch information
1 parent
71999d3
commit dab1c74
Showing
19 changed files
with
312 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
# Testing | ||
|
||
Testing your Sway contracts can be done with the Rust SDK. | ||
Sway aims to provide facilities for both unit testing and integration testing. | ||
|
||
**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](https://github.com/FuelLabs/sway/issues/1832). | ||
|
||
**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. | ||
|
||
- [Testing with Rust](./testing-with-rust.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.