One Star

Designing Unit Tests ETL Job

Hello,

 

I do know what is the purpose of a unit test and I know how to write them, but I have trouble getting my head around the structure of Talend Test Jobs...

 

I need to test a tMap job that take a tMSSQLInput and return a tMSSQLOutput. So far nothing extraordinary.

I created a test case and I'm stuck on how to configure everything.

 

Do I need to mimic the data coming from a database using a tMSSQL I/O, if so do I need to create mock data ? If that's the case it seems painfully long...

I understand that I need to compare it to a reference file, do I have to use a csv file ? Do I have to also create that reference file ?

 

I know that in a unit test I give as input all the cases that my method covers, and checks what it returns, but in a tMap operation spanning across several databases with computation in between... That seems like a super tedious task, which is not the point of a unit test.

 

Anyway, an advice, or insightful words of wisdom are appreciated. Share your knowledge with me and I'll

1 REPLY
Moderator

Re: Designing Unit Tests ETL Job

Hello,

We are supposing that you have read this online document about:TalendHelpCenter: Designing tests.

Are you trying to use the Test Case feature which automatically creates a Test Case with a skeleton in a Test Instance?

Best regards

Sabrina

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