File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Intermittent test case failure

 
Anuragk kushwaha
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 989
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you asserting at BusinessServiceTest.testValidUpdateRequestForlNameSaveOrUpdate(BusinessServiceTest.java:3278) and how are you running the tests?
 
Anuragk kushwaha
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Armitage,

Thanks for your quick response.

Asertion-



Errors comming when i am building my project using-
 
E Armitage
Rancher
Posts: 989
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to find out more information about the failure using ex.printStacktrace() at that line.
 
Anuragk kushwaha
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 989
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic