Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Ncrunch v4.0 execute tests with category not allowed
Nicolas
#1 Posted : Tuesday, November 12, 2019 3:15:58 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/5/2017(UTC)
Posts: 10
Location: Canada

Was thanked: 1 time(s) in 1 post(s)
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
Remco
#2 Posted : Tuesday, November 12, 2019 10:55:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
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?
Nicolas
#3 Posted : Thursday, November 14, 2019 9:26:17 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/5/2017(UTC)
Posts: 10
Location: Canada

Was thanked: 1 time(s) in 1 post(s)
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);
}
}
Remco
#4 Posted : Thursday, November 14, 2019 10:40:57 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
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.
Nicolas
#5 Posted : Tuesday, November 26, 2019 3:01:22 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/5/2017(UTC)
Posts: 10
Location: Canada

Was thanked: 1 time(s) in 1 post(s)
Any news on a fix for this ? :(
Remco
#6 Posted : Tuesday, November 26, 2019 10:21:14 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Nicolas
#7 Posted : Wednesday, November 27, 2019 3:11:56 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/5/2017(UTC)
Posts: 10
Location: Canada

Was thanked: 1 time(s) in 1 post(s)
Dosen't seems to fix the problem, sadly...
Remco
#8 Posted : Thursday, November 28, 2019 12:12:23 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Nicolas;14147 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.
Nicolas
#9 Posted : Wednesday, December 4, 2019 7:51:10 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/5/2017(UTC)
Posts: 10
Location: Canada

Was thanked: 1 time(s) in 1 post(s)
Ummm so sorry, in fact it does work! But i dont see the categories in the tests window.
Thanks a lot
Remco
#10 Posted : Wednesday, December 4, 2019 8:06:11 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Nicolas;14189 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.
Nicolas
#11 Posted : Tuesday, December 17, 2019 6:24:11 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/5/2017(UTC)
Posts: 10
Location: Canada

Was thanked: 1 time(s) in 1 post(s)
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.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.069 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download