-
Notifications
You must be signed in to change notification settings - Fork 4
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
NUnit3 result format output as nunit2 reports test dll as ignored if one or more child tests marked as ignored #9
Comments
Picking this up after a long absence and examining the output I see that the problem reflects, at least in part, the way the NUnit 3 framework records this situation. Any ignored test is given the We discussed, quite a long time ago, using the For the same reason (i.e. compatibility) I think we have to keep the same values here as in V2 itself. We should show the missing elements, just as V2 does, but we should also show the same result as V2 even if it isn't logical to consider the assembly as not run. |
🎉 This issue has been resolved in version 3.7.0 🎉 The release is available on: |
Hi @CharliePoole , I am also facing similar issue. v3.7.0 still doesn't resolve the issue. |
@JanibashaShaikTR It's not clear what your "similar issue" is. Please explain it. A new issue would probably be better, but to save time you should re-read my comment of December 25, 2020, explaining why the extension works as it does. |
Thanks @CharliePoole , I read it through. I am running tests using nunit console runner with nunit3. I am getting results as I am expecting, the asserts and test execution as PASS at the assembly level as well, same as original issue. |
"For the same reason (i.e. compatibility) I think we have to keep the same values here as in V2 itself. We should show the missing elements, just as V2 does, but we should also show the same result as V2 even if it isn't logical to consider the assembly as not run." The extension is designed to give (as close as possible) the same results as was given by the V2 Console Runner. In the earlier discussion, the issue was resolved by
Can you explain further why that resolution doesn't work for you? |
Hi @CharliePoole , If you can see the attachment, the time and assert count is not showing up at assembly level. Please do needful, what I could be missing or let me know if you need any specific of my implementation info. |
Hi @rprouse , could you please tell, where you able to resolve the issue that you actually reported? |
@CharliePoole commented on Fri Sep 02 2016
@harrisonmeister commented on Fri Sep 02 2016
Hi,
I'm not sure if this is by design or an issue, so please feel free to close if by design.
I am running a test project using the NUNit3 console.exe, and I receive the following output:
This marks the library test result as Ignored and not executed, even though one of the tests has run.
Specifically I have code which merged test result summaries (based on the nunit2 format). As NUnit2 (2.6.4) always added "time" and "asserts" as attributes, I'm just trying to work out if the result I am seeing in NUnit 3 is expected or not.
Above is the sample code, and here is the associated console I am running
D:\packages\NUnit.ConsoleRunner\tools\nunit3-console.exe "--noheader" "--where=!(cat == 'Integration' || cat == 'IntegrationTest' || cat == 'IntegrationsTest' || cat == 'IntegrationTests' || cat == 'IntegrationsTests' || cat == 'Integration Test' || cat == 'Integration Tests' || cat == 'Integrations Tests' || cat == 'Approval Tests' || cat == 'AcceptanceTest' || cat == 'PerformanceTest')" "--labels=Off" "--timeout=900000" "--stoponerror" "--result=D:\TestResult-unit-64-0.xml;format=nunit2" "D:\PATH_TO_LIBRARY\Some.Library.dll"
My main issue is that
<test-suite type="Assembly" name="D:\PATH_TO_LIBRARY\Some.Library.dll" executed="False" result="Ignored">
doesnt contain the time or asserts attributes any more. Running against 2.6.4 console runner, it does.@CharliePoole commented on Fri Sep 02 2016
It does seem like a bug to me. I'm moving it to the nunit-console project because it's the NUnit Engine, not the Framework, that translates nunit3 output to nunit2 format.
The XML produced by this translation is not going to be identical. We ensure that the format is correct, so that existing programs that process nunit2 XML files will be able to run. The semantics can obviously vary since NUnit 3 works differently from NUnit 2.
In this case, the biggest problem I see is that your assembly is shown as not having been executed. I suspect that's why there is no time and no assertion count - those attributes don't make sense if the assembly was never executed! But of course it was executed. :-)
@harrisonmeister commented on Fri Sep 02 2016
Hi @CharliePoole, thanks - yes that makes sense. I took a quick look at the NUnit2 writer and it looked like it omitted the attributes if the Test result was Skipped.
I'm in the process of upgrading a very large (1000+ projects) from Nunit 2.6.4 to 3.4.1 so the legacy format is very useful in leaving the test reporting side alone whilst I do the main upgrade (we had lots of uses of ExpectedException!)
I have also written a workaround that I will test on Monday to our test output which should also allow me to continue the upgrade
On a slight side note, we also use your nunit-summary executable. Do you have any guidance on how to "upgrade" to something more up-to-date when I take the plunge to remove the legacy v2 format from the result spec option on the command line?
Thanks, Mark
@CharliePoole commented on Sat Sep 03 2016
@harrisonmeister Another think I just learned about our V2 output is that it uses the V2 names for properties if you ran V2 tests under V3. If you run V3 tests but ask for V2 output, you get the V3 property names. Again, the format complies with your request but the content may differ.
This primarily affects properties Description (V2 _DESCRIPTION) and Categories (V2 _CATEGORIES). I don't think it's an error per se but it is a limitation. We could, of course build in more knowledge of the names of well-known properties.
Regarding nunit-summary... I haven't looked at it in ages. I'll take a look and see how much work an update would take. Are you interested in working on it or just using it. :-)
@harrisonmeister commented on Sun Sep 04 2016
@CharliePoole - I think for my scenario different property names is ok, since I am merging the test result xml files into a single file.
Re: nunit-summary, I'd be more than happy to work on it :-)
@CharliePoole commented on Sun Sep 04 2016
I did some updates to nunit-summary, changing the license, restructuring directories and updating it to use VS2015. I'll write an issue on that repo mentioning you and we can figure out how to proceed.
@theBFG commented on Thu Aug 24 2017
Hey, are there any updates or progress on this bug?
@ChrisMaddock commented on Thu Aug 24 2017
@theBFG This is acknowlegded as a bug and on our backlog, just needs someone to pick it up an put in a fix. A pull request would be welcome, if you're willing! 😄
@CharliePoole - this probably belongs in the nunit2-result-writer repo now, right? I'd guess it was moved here before we split the extensions out.
@rprouse commented on Sat Sep 16 2017
Agreed that this is probably a result writer issue. I am going to move it.
The text was updated successfully, but these errors were encountered: