Actual Value vs Expected Value – Fails with Correct Value UFT API.
Question ID: 107646
6
0

I have an API test result that the actual and expected values are same, but still test run fails.

I am using Excel as a data source and do not see an issue with the data.

Marked as spam
Posted by (Questions: 22, Answers: 6)
Asked on May 4, 2017 9:36 pm
64 views
Answers (1)
7
Private answer

In the past using UFT GUI and Microsoft Excel I have found that extra data (including formula) can be put into Excel that might affect the test run. To ensure the extra formatting is not used I had recommend exporting sheet to CSV file then closing Excel and re opening the CSV file with Excel. This would clean out most of the isssues. However I have recently found an issue that did not catch the issue. Customer had put non breaking spaces in text instead of spaces. Non-breaking space will display like a space in NotePad, Excel, and NotePad PlusPlus (with show all hidden selected). When looking at the file with hexadecimal tool the value of non-breaking space is 160(hex) and a space is 20(hex). [More information about non-breaking spaces can be found here](https://en.wikipedia.org/wiki/Non-breaking_space)

Looking at the procedure to export to CSV and import back does not clear the issue with non-breaking space. I have found a tool that will clean out the spaces at called [CleanXLsx](https://github.com/TomMargrave/CleanXLSX) which is a VBScript that will remove the non-breaking spaces and other issues.

If you use this tool please like this post and the [CleanXLsx](https://github.com/TomMargrave/CleanXLSX) project.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on May 4, 2017 9:37 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top