Contributions
Re: JDBC Response date format assertion diffs that dont include ".0" at the end of the string
Hey Everybody I am using Oracle RDBMS I incorporated a workaround for the issue using a regular expressions in the assertion where the expected date result was being checked i.e. 2008-09-12 12:00:00* The assertion was specifically hardcoding the .0 at the end of the string: 2008-09-12 12:00:00.0 Which IS NOT smart in my opinion anyway--- For my purposes this is ok The real issue with this was that Ready API JDBC response was including the ".0" at the end of the string when running on Machine X and when getting the same JDBC response on Machine Y the ".0" WAS NOT showing up The wildcard for the .0 takes care of that issue for my circumstances But I never really got a great answer as to WHY this would happen6 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes1CommentJDBC Response date format assertion diffs that dont include ".0" at the end of the string
Im perplexed by an issue with regards to JDBC Test Step responses It is specific to the Response XML on date columns: The JDBC response XML: <Results> <ResultSet fetchSize="10"> <Row rowNumber="1"> <E_REVISION_DATE>2015-02-27 00:00:00.0</E_REVISION_DATE> For as long as I can remember Ive had assertions to check that the date column above is correct Now the XPath Match assertion is diffing with: [XPath Match] The XPathContains assertion failed for the following path: [//Results[1]]. Class name: Exception; Error Message: org.custommonkey.xmlunit.Diff [different] Expected text value '2015-02-27 00:00:00.0' but was '2015-02-27 00:00:00' Odviously the diff is the ".0" at the end Why all of a sudden are ALL of my dates diffing on this type of assertion failure? Is there a ReadyAPI [property/or setting that is determining the date format that is output from the JDBC Response? Any and all recommendations are appreciated Using ReadyAPI 1.9.07 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes6Comments