Provide nocapture option as an argument to cargo test, as follows.
nocapture
cargo test
cargo test -- --nocapture