Michael-F-Bryan / rust-ffi-guide

A guide for doing FFI using Rust
https://michael-f-bryan.github.io/rust-ffi-guide/
Creative Commons Zero v1.0 Universal
282 stars 18 forks source link

Testing Chapter #44

Open Michael-F-Bryan opened 6 years ago

Michael-F-Bryan commented 6 years ago

I've started off a chapter on testing the application, both by integrating Rust unit tests into cmake as well as writing end-to-end integration tests that use the C++ wrappers.

So far the general idea is:

As well as the usual unit tests which you will be accustomed to writing in your Rust code, we want to be able to test the entire backend from end-to-end. This would require using the C++ wrappers to send off requests under various conditions and making sure we get the expected behaviour.

We will cover:

  • Integrating cargo test into cmake's built-in testing facilities
  • Creating C++ integration tests to exercise the entire backend under various conditions, including