Suite with test Data in excel and bool var

In the test I have boolean variables. I run it from a suite with a testData in Excel. In the excel sheet I have the columns with the contents true or false and the variables are binding correctly. But when running the suite all boolean variables take true.
How do I make boolean variables take the correct value entered in excel and not always true?

I haven’t found any other solution than leaving “false” cells empty. Because apparently, Katalon will interpret any empty cells as false, and any non-empty cells with true.

1 Like

I haven’t found any other solution than leaving “false” cells empty. Because apparently, Katalon will interpret any empty cells as a boolean false, and any non-empty cells with true.

Hello,

was there any update on this matter?

I am also using excel sheet to upload variables and apparently every “false” cell is interpreted as “true” …

I though that unchecking “bind to test case as string” in the Data Files would solve this issue but it does not.

In my opinion, leaving empty cells is not good as I would expect it to be interpret as “null” and not “false”.

hi,

maybe better to use own coded excel keyword to ignore this kind of issue

Still bugged pfff

@gnavarro Bugged about what? Cannot get Excel to be bound? Cannot get “false” values to work? Huh? Will the below be of any value?

in my case is a little different, all variables in excel is identifying as String, should be like Boolean

@gnavarro

In Test Data UI there should be a checkbox " bind to test case as string" which is checked by default to maintain backward compatibility. You can uncheck it, and the value from excel test data will bind to test case without being converted to strinng.

yeah i have done it, but still is converting as string, look my example Data-Driven-Bug.zip (308.8 KB)

@gnavarro

Please change True to TRUE, False to FALSE and try again. I tried and it worked with your project.

i tried, many things different, take a look

I`m testing on Windows 10 and using LibreOffice to edit my excel :confused:

Here’s the Test Suite report on my side using Katalon 7.5.5 on Mac and edited the Excel file with Microsoft Execl, from your Test case it seems like it is binding as expected ?

Here’s the modified project:

Data-Driven-Bug.zip (579.6 KB)

Interesting! i tried open your modified project in Windows and look at this:

javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.0.v20130425-368d603): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; systemId: file:/D:/__MACOSX/Data-Driven-Bug/._Data-Driven-Bug.prj; lineNumber: 1; columnNumber: 1; O conteúdo não é permitido no prólogo.]
	at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:980)
	at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:126)
	at com.kms.katalon.dal.fileservice.EntityService.loadEntityFromFile(EntityService.java:191)
	at com.kms.katalon.dal.fileservice.EntityService.getEntityByPath(EntityService.java:167)
	at com.kms.katalon.dal.fileservice.manager.ProjectFileServiceManager.openProjectWithoutClasspath(ProjectFileServiceManager.java:75)
	at com.kms.katalon.dal.fileservice.dataprovider.ProjectFileServiceDataProvider.openProjectWithoutClasspath(ProjectFileServiceDataProvider.java:24)
	at com.kms.katalon.controller.ProjectController.openProjectForUI(ProjectController.java:84)
	at com.kms.katalon.composer.project.handlers.OpenProjectHandler$1.run(OpenProjectHandler.java:166)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.0.v20130425-368d603): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; systemId: file:/D:/__MACOSX/Data-Driven-Bug/._Data-Driven-Bug.prj; lineNumber: 1; columnNumber: 1; O conteúdo não é permitido no prólogo.
	at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:113)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.convertSAXException(SAXUnmarshaller.java:999)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:903)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:388)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:366)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:323)
	at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:367)
	at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:123)
	... 7 more
Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/__MACOSX/Data-Driven-Bug/._Data-Driven-Bug.prj; lineNumber: 1; columnNumber: 1; O conteúdo não é permitido no prólogo.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:994)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
	at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:221)
	at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:895)
	... 12 more

That’s weird.I am not sure why it is displaying the error. Try delete Lib and folder and open the project again. Also, maybe try to edit the file with Microsoft Excel ?

deleted the folder, still cant open :stuck_out_tongue:

btw i tried create a new file with Microsoft Excel and still got the same problem

@gnavarro

Okay, please provide the latest project. It’s strannge why it’s working for me and not for you.

DataDrivenBug2.zip (184.1 KB)

here is :confused:

@gnavarro

Here’s a GIF of how I made it worked. Notice that my TRUE is centered, while your TRUE (initially) is not. I am not sure why, but I believe it is the reason for the perceived difference.

Look,

I tried differents softwares to edit, this is my results:

I have created a new file with Microsoft Excel Online (Inside OneDrive) --> doesn’t worked
I have created a new file with Google Docs --> Worked
I have created a new file with LibreOffice --> doesn’t worked
I have created a new file with Microsoft Excel (Installed Application) --> Worked

If i edit some file in application of Excel that was created in another software (like LibreOffice or Excel Online) will work, i think the problem is so weird, can do something with this? :frowning:

when i say “doesn’t worked” i want mean the variable keeps showing as String

BTW centered no make difference when edit in other software :frowning: