-
Notifications
You must be signed in to change notification settings - Fork 331
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
Confusing log message when all tests are filtered out #1643
Comments
@genlu Is below message looks good? PS C:\Users\samadala\src\vstest> .\artifacts\Debug\net451\win7-x64\vstest.console.exe .\test\TestAssets\SimpleTestProject\bin\Debug\net451\SimpleTestProject.dll /testcasefilter:"Name=abc"
Microsoft (R) Test Execution Command Line Tool Version 15.8.0-dev
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
No test available for testcase filter `Name=abc` in C:\Users\samadala\src\vstest\.\test\TestAssets\SimpleTestProject\bin\Debug\net451\SimpleTestProject.dll |
What is the timeline your looking for this issue to get fixed? |
The message above is fine. But for LUT, the filter can be very long (e.g. all tests in project). So can we not include the filter string itself in the message? In terms of timeline, 15.8 preview 4 would be great. @ManishJayaswal |
"No test matches the given testcase filter" may be better. For LUT, in most cases, this would not be an error condition. It would just point to the fact that no tests are covering the line which was edited. Is there any way we can make this message "informational" so that it only shows up with verbose logging? Else this will keep showing as error when technically there is no error- the program is working as expected. If it only shows up in verbose logging then appending the filter text to the message may help with diagnostics so it may be ok. For timeline - preview 4 of 15.8 is fine. |
@ManishJayaswal We didn't get chance fix this for 15.8 preview 4. We will try to get this for preview 5. |
@smadala - we still have a week to fix this in preview 4. |
@ManishJayaswal Good to know, I thought 19th June was last check in for M2 approval(Looks like schedule is changed). @cltshivash @pvlakshm for triage this. |
@ManishJayaswal I'm working on this. @genlu We will show first 60 characters of testcase filter. Is that sounds good? @ManishJayaswal We can't make this to info level. Because
Can we do something on LUT side for not to show obvious warning? |
@smadala - we should show this error if no tests are found in the assembly. However if tests are found in the assembly but everything is getting filtered out then this should probably be an info, right? |
I agree with you. Because
I don't know since when the tests has not been running from test-assembly
However we may not afford to do this as this change breaks lot of build pipelines once they update the VS/vstest.console.exe.
|
How much work would it be for TP to know if no tests were found in assembly or tests were found but all got filtered away. I suspect that initially all tests are getting discovered and then passed through the filter? |
Did you think about this? |
I have provided enough info why the message level should be warning. Why do you want it to be info other than harmless and meaningful warning message on LUT restart. Why the LUT sending run request if it expects no tests to run always? |
The only things we can do on LUT side is to check every error and block this one which does not seem right. LUT needs to send the request because there may be new tests. Gen can confirm that. Gen is there anything LUT can do to not send requests in such cases? |
I have completed the PR to address the message text as suggested by @ManishJayaswal with log level warning. If required I will create another PR to address log level once we discuss on it. |
Description
I noticed a confusing warning in the LUT log after restart LUT (see below). Essentially, after filtering out tests, none left to execute, which is expected because there's no code change since LUT was stopped. But this message makes it sounds like an error. @satya Madala Could you guys change this message at least for filter scenario (if there’s tests discovered but all filtered out).
Steps to reproduce
With latest dogfood build:
Open a test project -> Start LUT -> Stop LUT -> Start LUT again
The text was updated successfully, but these errors were encountered: