-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing console output when use SetUp method #991
Comments
@RedHeadIvan In order to determine if this is an adapter issue or something else, please provide a workable repro for the case. It should compile and run "as is". |
I've run the repro, and I do understand you're missing something there. Could you please elaborate - that is explicitly say what output was expected and is not present? |
Using define "DoubleStage" you can run test different ways.
etc That's output I wanted. But if you define "DoubleStage" test will run using OneTimeSetUp and console output will be noticeable reduced:
As you can see, only Test marked method thread console output remained |
@RedHeadIvan Hi! I had a new look at this (sorry for the delay though) , and the difference between the two ways of running is that with DoubleStage enabled then the preprocessor.Init() is called in the OneTimeSetup method, without it is connected to the Test itself. The OneTimeSetup happens before any tests are run, and we don't actually capture the output from that part. If you enable the Dump feature you can actually see where the output goesfrom NUnit, so NUnit captures this. The problem is with the Test Explorer. The reason for this is that we don't have any suitable place to go - in the Test Explorer - with this output. We can send the output to the Test Explorer - which is responsible for displaying this - for each test case, but there is no sink for something like OneTimeSetup. We do have some other issues related to the same, so this is a duplicate of those. (E.g. #266, #503 and nunit/nunit#4314). Thank you for reporting. |
Setup:
Wrote single test for module that runs with multiple threads and writes logs by NLog. Runed this test, all necessary logs are present in test journal. Then I splited it to OneTimeSetUp and Test to write another test with similar logic. After that test journal contains only logs writed by Test method thread. Missing output from HostRepresentative_CorrectionReady and other threads that triggers by ValueChanged method.
The text was updated successfully, but these errors were encountered: