Bug with tAssert in 6.4.0 Studio

Six Stars

Bug with tAssert in 6.4.0 Studio



I used Talend to "Create Test Case" from a DI job and wanted to amend the tAsserts to check number of lines from a component rather than using the default behaviour of file comparisons.


I do this my changing the tAssert expression to 







I get a compilation error 


 "operator ! undefined for the argument types integer"


looking at the code I can see that Talend has rewritten this to 


if (!((Integer) globalMap.get("tRowGenerator_1_NB_LINE")) > 100) {

with the "!" in the wrong place.


When I try creating a tAssert in a normal non TestCase job, it all works fine and I can see the code is written as


if (((Integer) globalMap.get("tRowGenerator_1_NB_LINE")) > 100) {


which work as it doesn't have a "!" in the wrong place?


This seems to be a bug? 


I did fix by changing my expression to include outer brackets


(  ((Integer)globalMap.get("tMysqlOutput_1_NB_LINE_INSERTED"))>100  )

but the help at https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/bGMEXg5CMwvdt8hxpsFzbw doesn't say to do this and I spent a good few hours on this.









Re: Bug with tAssert in 6.4.0 Studio


Thanks for posting your issue here.

Have you tried to use V 7.0.1 to see if this kind of compilation error still repro?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.


Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.