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

Notification

Icon
Error

Unpredictable tests when parsing dates
SteveCrouch
#1 Posted : Monday, January 21, 2013 4:52:56 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/21/2013(UTC)
Posts: 1
Location: United Kingdom

Hi,

This is my first support post, I've looked for answers to this but cannot find anything so please forgive me if this has been asked before.....

When running NCrunch over my solution I am getting unpredictable results with tests that cover code doing DateTime parsing. If the Run All Tests option is clicked then loads of tests fail but clicking the Run Selected Tests runs all the tests successfully.

As I write this I have noticed that clicking Run Selected Tests a second time returns 4 errors and clicking Run All Tests again returns different results than before!

I genuinely cannot work out what is happening but it's date parsing that fails every time.

We are just in the process of buying 15 licences and this a potential stopper as it's basically useless as it is. We used the trial version of NCrunch last year on a project and it was faultless so these problems have come as a real shock. I'm sure you'll require more info so please let me know what additional information I can send.

Regards
Steve
Remco
#2 Posted : Monday, January 21, 2013 7:56:32 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Steve,

Thanks for posting! It's great to hear your team is getting on board with NCrunch, and I'm sure we can solve this issue quickly.

I strongly suspect that this issue is being caused by state/sequence dependent behaviour between the tests being executed. Most test runners will execute tests in order of A-Z, although NCrunch will execute tests in order of their priority. If you haven't already, make sure you have a read of the test atomicity considerations in the documentation. The troubleshooting test issues page may also contain a few useful tips.

Because DateTime parsing is culture-specific, I wonder if perhaps you may have a test somewhere in the codebase that changes the current culture on the testing thread. Note that changing the culture in a test WILL cause the culture to be changed for subsequently executed tests unless the previous culture is properly restored. It may be worth searching through your codebase for anything that changes the current culture.

Are you able to share any more details about the error you're seeing from your code?


Cheers,

Remco
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.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download