Skip to main content



      Home
Home » Newcomers » Newcomers » "assertEquals" failing intermittently("assertEquals" failing/passing intermittently from run to run.)
"assertEquals" failing intermittently [message #1242626] Sun, 09 February 2014 17:32
Eclipse UserFriend
Hi,
I'm not sure if this is a right place to post this I couldn't find a proper forum for this.

I'm running a TestNG test and the same test intermittently failing for the same web page from run to run. There is no fault on the web page and the test is failing randomly with consecutive runs at "assertEquals" method and complains that there is extra space in the string on the page that being tested.

Not sure if this is a bug related to latest release or a known issue.
I've attached the screenshots of failing case where you can see test is failing at line #242 and at next run it fails at line #245 which means it passed at #242.

The test is derived from exporting from Selenium and it is passing in Selenium and failing only when running in Eclipse.
It seems that text is either compared differently or the web page is read differently in Eclipse compared with Selenium.


To summarize, the only functions of the assertEquals that fail are getText() and getAttribute(). But not all those function calls are failing in the project.
Most of them always pass but only few failing inconsistently.


Another strange behavior of getAttribute() is that sometimes the value of an radio button captured incorrectly. The possible values for the radio button is off or on but sometimes captured as "yes" or even a numeric value:

org.junit.ComparisonFailure: expected:<[off]> but was:<[10842]>


Have anyone came across this issue and know the fix for this?
Let me know if addition data would help.



Thanks

[Updated on: Wed, 05 March 2014 14:21] by Moderator

Previous Topic:quick question on workspace :-)
Next Topic:Eclipse Error
Goto Forum:
  


Current Time: Sun Jun 15 21:20:39 EDT 2025

Powered by FUDForum. Page generated in 0.08032 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top