Hi!
I am using Filters (General settings) on Test Category Does Not Equal "Integration"
Using MsTest with TestCategory("Integration") attribute on classes but those are still executed since V4.
Thanks
Build/Test Issues
New Ncrunch v4.0 execute tests with category not allowed
Started by Nicolas on 3,035 views
Remco NCrunch Developer
#14064
12 Nov 2019 22:55 UTC
Hi, thanks for posting.
I've just checked this behaviour and it seems to be working correctly on my end.
If you turn on the 'Categories' column in the Tests Window, do the tests involved have the correct category attached to them?
Can you confirm exactly which configuration setting you're using, and how the test method is declared?
I've just checked this behaviour and it seems to be working correctly on my end.
If you turn on the 'Categories' column in the Tests Window, do the tests involved have the correct category attached to them?
Can you confirm exactly which configuration setting you're using, and how the test method is declared?
Ok so in Optimised Mode, the Test categories are empty when i check them with the Categories column.
I reverted to Legacy mode and they are shown again (And skipped).
Here is an example of a test class.
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
[TestCategory("Integration")]
public class IntegrationTests
{
[TestInitialize]
public void Setup()
{
_sujet = new Test123();
}
[TestMethod]
public void Test123()
{
var result = _sujet.GetLatest();
Assert.AreEqual(123, _sujet.Test);
}
}
I reverted to Legacy mode and they are shown again (And skipped).
Here is an example of a test class.
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
[TestCategory("Integration")]
public class IntegrationTests
{
[TestInitialize]
public void Setup()
{
_sujet = new Test123();
}
[TestMethod]
public void Test123()
{
var result = _sujet.GetLatest();
Assert.AreEqual(123, _sujet.Test);
}
}
Remco NCrunch Developer
#14083
14 Nov 2019 22:40 UTC
Thanks for the code sample. I've managed to reproduce this exactly as described. I'll let you know as soon as a fix is available.
Any news on a fix for this ? :(
Remco NCrunch Developer
#14138
26 Nov 2019 22:21 UTC
Could you try the build below and let us know if this solves the issue?
NCrunch_Console_4.2.0.2.msi
NCrunch_Console_4.2.0.2.zip
NCrunch_GridNodeServer_4.2.0.2.msi
NCrunch_GridNodeServer_4.2.0.2.zip
NCrunch_LicenseServer_4.2.0.2.zip
NCrunch_VS2008_4.2.0.2.msi
NCrunch_VS2010_4.2.0.2.msi
NCrunch_VS2010_4.2.0.2.zip
NCrunch_VS2012_4.2.0.2.msi
NCrunch_VS2012_4.2.0.2.zip
NCrunch_VS2013_4.2.0.2.msi
NCrunch_VS2013_4.2.0.2.zip
NCrunch_VS2015_4.2.0.2.msi
NCrunch_VS2015_4.2.0.2.msi.7z
NCrunch_VS2015_4.2.0.2.zip
NCrunch_VS2017_4.2.0.2.msi
NCrunch_VS2017_4.2.0.2.msi.7z
NCrunch_VS2017_4.2.0.2.zip
NCrunch_VS2019_4.2.0.2.msi
NCrunch_VS2019_4.2.0.2.msi.7z
NCrunch_VS2019_4.2.0.2.zip
NCrunch_Console_4.2.0.2.msi
NCrunch_Console_4.2.0.2.zip
NCrunch_GridNodeServer_4.2.0.2.msi
NCrunch_GridNodeServer_4.2.0.2.zip
NCrunch_LicenseServer_4.2.0.2.zip
NCrunch_VS2008_4.2.0.2.msi
NCrunch_VS2010_4.2.0.2.msi
NCrunch_VS2010_4.2.0.2.zip
NCrunch_VS2012_4.2.0.2.msi
NCrunch_VS2012_4.2.0.2.zip
NCrunch_VS2013_4.2.0.2.msi
NCrunch_VS2013_4.2.0.2.zip
NCrunch_VS2015_4.2.0.2.msi
NCrunch_VS2015_4.2.0.2.msi.7z
NCrunch_VS2015_4.2.0.2.zip
NCrunch_VS2017_4.2.0.2.msi
NCrunch_VS2017_4.2.0.2.msi.7z
NCrunch_VS2017_4.2.0.2.zip
NCrunch_VS2019_4.2.0.2.msi
NCrunch_VS2019_4.2.0.2.msi.7z
NCrunch_VS2019_4.2.0.2.zip
Dosen't seems to fix the problem, sadly...
Remco NCrunch Developer
#14149
28 Nov 2019 00:12 UTC
Nicolas wrote:Dosen't seems to fix the problem, sadly...
Could you check whether the categories are now showing in the Tests Window for the tests that are declaring this using the fixture-level attribute? I tried testing this using the code sample you provided, and it seemed to be working on my end. I wonder if there may be a second problem here.
Ummm so sorry, in fact it does work! But i dont see the categories in the tests window.
Thanks a lot
Thanks a lot
Remco NCrunch Developer
#14190
04 Dec 2019 20:06 UTC
Nicolas wrote:Ummm so sorry, in fact it does work! But i dont see the categories in the tests window.
Thanks a lot
Could you be careful to check against the fixture rather than the tests? NCrunch should apply the category at fixture level and it should show as long as you have the 'Categories' column turned on in the Tests Window.
It isn't really possible for the filter to work correctly without the category being detected, so I'm fairly certain it should be there.
Oh well, my bad! i don't know where my head was. Actually i don't see any categories because the tests are not ran. I only see a green check on the class fixture.
Thanks for your quick fixes.
Thanks for your quick fixes.
Post a reply
Log in to reply.