aspose file tools*
The moose likes Testing and the fly likes Intermittent test case failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Intermittent test case failure" Watch "Intermittent test case failure" New topic
Author

Intermittent test case failure

Anuragk kushwaha
Ranch Hand

Joined: Aug 02, 2006
Posts: 51
Dear Forum members,

I am facing some issues while building the code because of one test failure. This is happening intermittently, occurs once when I build the code approx 20 times. The error I am getting at console is:


[color=green]

-------------------------------------------------------------------------------------------------------------------------------

When i looked into surefire report, i got the following info there-




I tried to get any solution on Google and dig a lot but no success. Please put some light on the issues, I'll really great full for your help.

Regards,
Anurag


E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
What are you asserting at BusinessServiceTest.testValidUpdateRequestForlNameSaveOrUpdate(BusinessServiceTest.java:3278) and how are you running the tests?
Anuragk kushwaha
Ranch Hand

Joined: Aug 02, 2006
Posts: 51
Hi Armitage,

Thanks for your quick response.

Asertion-



Errors comming when i am building my project using-
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Try to find out more information about the failure using ex.printStacktrace() at that line.
Anuragk kushwaha
Ranch Hand

Joined: Aug 02, 2006
Posts: 51
Hi Armitage,

Tried to run multiple time but didn't got any failure again. Allready applied your suggestion and will post once i'll see any problems.

Regards,
Anurag
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
If the try block for that catch is not too long (or has a low computational complexity) then you could try to deduce the reason why the test fails by identifying all lines that could throw the AccountManagerException in that try block. Then it's a matter of figuring out which of those lines could be dependent on some resource that could change between different invocations of the test case.
 
Don't get me started about those stupid light bulbs.
 
subject: Intermittent test case failure