简体   繁体   English

货物测试未显示任何 output 且未显示所有测试

[英]Cargo test not displaying any output and not showing all tests

Running cargo test does not show all 4 of the tests, and it doesn't show any output of any of the tests I run.运行cargo test并没有显示所有 4 个测试,也没有显示我运行的任何测试的任何 output。 I have 4 tests:我有 4 个测试:

test common::tests::test_workingdays 
test documents::tests::create_docs 
test emailer::tests::test_attachments 
test emailer::tests::test_format_attachments 
$ cargo test
   Compiling te-pm-analytics v0.1.0 (/home/charlie/thoughtexpress/rust/te-pm-analytics)
    Finished test [unoptimized + debuginfo] target(s) in 2.44s
     Running target/debug/deps/main-253a09bf91ed177c

running 4 tests
test common::tests::test_workingdays ... ok
test emailer::tests::test_attachments ... FAILED
error: test failed, to rerun pass '--bin main'

It only runs two of them and does not even give me information on what has failed.它只运行其中两个,甚至没有给我关于失败的信息。

So the reason that this is happening, is that of the 4 tests I have所以发生这种情况的原因是我有 4 个测试

test common::tests::test_workingdays 
test documents::tests::create_docs 
test emailer::tests::test_attachments 
test emailer::tests::test_format_attachments 

both test_attachments and test_format_attachments were failing, however test_format_attachments had a std::process::exit(1) condition inside the function it was testing, and therefore it killed the process before the tests were able to return. test_attachmentstest_format_attachments都失败了,但是test_format_attachments在它正在测试的 function 中有一个std::process::exit(1)条件,因此它在测试能够返回之前终止了该进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有哪些方法可以运行 Rust cargo test 并让测试运行器将任何日志 output 显示到控制台 stdout 或 stderr? - What are ways to run Rust cargo test and have the test runner display any log output to the console stdout or stderr? 是否可以只运行带有货物测试的单元测试? - Is it possible to run only unit tests with cargo test? 如何获得所有货物测试的清单? - How to get a list of all cargo tests? 通过使用功能标记进行“货运测试”来运行其他测试 - Run additional tests by using a feature flag to “cargo test” “没有执行测试”我根本无法在NetBeans中运行任何PHP测试 - “No tests executed” I cannot run any PHP test in NetBeans at all 摩卡不显示所有测试 - Mocha Not Showing All Tests 货物测试不能在集成测试中引用目标箱内的任何公共内容。 单元测试也找不到测试用例 - Cargo test cannot reference anything public inside the targeting crate in integration test. Unit tests also cannot find test cases 失败的测试在 testng 输出中显示为通过 - Failed tests are showing as pass in testng output 在其他任何测试之前运行的Symfony测试? - Symfony test that runs before any other tests? 测试Spring Boot中所有测试的配置文件? - Test profile for all tests in Spring Boot?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM