Open ligurio opened 1 year ago
--verbose
performs exactly this.
(The help message says 'to log', but actually the output goes to the terminal.)
When something fails we should show the test output automatically (even without --verbose
), but there is a buffering problems here, see #119 and #383.
Sure, I know about --verbose
. It is not actually what I mean.
Imagine you run tests on CI, one of the luatest testcase is failed under test-run. You need carefully look at the log to understand what testcase has failed. It takes additional time.
Attached file (OcWgbW.txt) contains a real log of running a suite with luatest's tests under test-run.py. Test etcd-client/etcd_client_tls_integration_test.lua
has failed. What testcase has failed there?
What testcase has failed there?
[001] not ok 2 integration.tls.test_basic_no_tls_client
The --verbose
option shows the output from luatest -c
.
AFAIU, it would be convenient for you to get less output as luatest
does without -c
.
However,
luatest -c
output is needed from CI.There is another option and I guess it is what you proposed initially. Add a summary about test cases if one is failed (we anyway parse it from all the output). I like this idea.
There is another option and I guess it is what you proposed initially. Add a summary about test cases if one is failed (we anyway parse it from all the output). I like this idea.
This issue is about printing testcases of TAP and luatest's tests. Not about summary or anything else. Feel free to submit another issues with your ideas.
Currently, test-run is a just a frontend above real tests, and it should not hide useful information from tests that it runs.
I asked Sergey to clarify the issue and now there is the 'by examples' section that makes it more clear. It is actually not about failed tests, but rather about all tests that produce TAP13 output (some unit, some app and all luatest tests).
Sergey also added more context about his user scenario. The problem is about waiting for information from a long running test, when it is run alone. There is no way to understand what is going on until the test passed or until a timeout is reached.
He also tells about his idea to show verbose information about failed test case, not about all test cases in given test.
(Please, correct me if I wrench some of your ideas. I re-read our chat log five times before sending this clarification and I hope I made it as accurate as possible.)
My opinion is under the line.
The discussion is about a proper balance between verbosity and conciseness.
Testing frameworks usually target large test suites and give minimalistic information about running tests while everything is going OK.
Examples of defaults:
test-run primarily aims tarantool's test suite, which has ~1200 test runs (each is usually a fraction of a second), and it prints a test per line while everything is OK. It looks reasonable.
This default shouldn't be changed in my opinion.
However, aside of the primary goal of a testing framework, there are a couple of secondary goals:
That's why fancy failure reports exist, why output verbosity options like luatest -v
, pytest -v
, ctest -V
, ./test-run.py --verbose
exist and why output capturing options like luatest -c
, pytest -s
exist.
There are areas for improvements for test-run in these regards.
However, as far as I understood, a discussion is not welcomed here. So, I'm done.
imagine we have a test with TAP13 output:
test-run reports only a single test status, even we have a number testcases in a test:
It would be convenient to report all testcases in test-run output. Especially it would be useful when all TAP13 testcases are passed and some are not, a detailed report will give an overview of the status of testing.
By examples
How output looks now when test is passed
``` $ ./test/test-run.py box-tap/feedback_daemon.test.luaHow output looks now when test is failed
``` Started ./test/test-run.py box-tap/feedback_daemon.test.luaHow, I suppose, output should look like
```