[][src]Crate test_bin

A module for getting the crate binary in an integration test.

If you are writing a command-line interface app then it is useful to write an integration test that uses the binary. You most likely want to launch the binary and inspect the output. This module lets you get the binary so it can be tested.


basic usage:

let output = test_bin::get_test_bin("my_cli_app")
    .expect("Failed to start my_binary");
    "Output from my CLI app!\n"

Refer to the std::process::Command documentation for how to pass arguments, check exit status and more.



Returns the crate's binary as a Command that can be used for integration tests.