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

Notification

Icon
Error

RequiresCapability doesn't follow class hierarchy
MatthewSteeples
#1 Posted : Friday, February 13, 2015 8:56:23 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 132
Location: United Kingdom

Thanks: 7 times
Was thanked: 18 time(s) in 16 post(s)
Small bug we've come across when writing our tests, please see https://gist.github.com/...es/d47f2ea58f63cdab1e24 for repro code.

Basically we have some "base" test classes which define data contexts and have certain requirements. We don't then want to have to re-define these requirements on the classes that derive from these classes.

Eg in the example above, I would expect TestDerivedClass require both ATS and SQL as a capability
Remco
#2 Posted : Friday, February 13, 2015 9:19:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,000

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi, thanks for sharing this. It looks like the RequiresCapability feature is working correctly in this situation. After testing the code sample you've provided, I can see both capabilities being applied to the test inside the Processing Queue.

However, there is another issue here that is creating some problems and is likely the cause of what you've encountered.

It seems that the engine isn't correctly updating the capability requirements of tests that are already in the processing queue. This means that if you adjust the capabilities for a test that has already been executed, you may need to change its name (and back again) or reset the engine before the execution task is correctly updated with the new capability.

I'll see that this gets fixed. Thanks again.
1 user thanked Remco for this useful post.
MatthewSteeples on 2/13/2015(UTC)
MatthewSteeples
#3 Posted : Friday, February 13, 2015 11:17:19 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 132
Location: United Kingdom

Thanks: 7 times
Was thanked: 18 time(s) in 16 post(s)
Hi Remco,

Thanks for that. I think that must have been the behaviour we were seeing.
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.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download