I have designed a job in Talend. The job is fetching data from database and converting it into json and it uploads that json on server. I want to write test case for my job like we write unit test in java projects. I have searched a lot on how to write test case for talend job but did not find anything. If any one know how to test talend job please suggest.
-
I'm partly working on some CI stuff right now with Talend that will include some automated testing but probably more along the Cucumber/Fitnesse route rather than a JUnit type test. I'll answer this if I come up with anything useful. – ydaetskcoR Jan 31 '15 at 10:35
3 Answers
You can simply create a job which call your job (either tRunJob or tSoap if your job is soap-exposed):
- Init your database
- call your job
- check the result on the server (or mock the server call by overriding context parameters)
- use tAssert to make your check
- use tAssertCatcher->tLogRow to print test result
I made a CI (internal project) for our project with a basic Java application, which is a telnet wrapper around the Talend Command Line API (listJob, runJob...), then generates a Junit XML result file. Everything is called by Jenkins. It seems that nothing really exist to perfectly test Talend jobs :-(
Good luck.

- 262
- 3
- 12
-
-
I have no time for that yet, but I can provide some small extracts which can help you, if you still need it ? – Shimbawa May 05 '15 at 21:20
In talend 6.0.1 i found a tab named "Test Cases", it seems new to me. On https://help.talend.com/display/TalendRealtimeBigDataPlatformStudioUserGuide60EN/6.10+Testing+Jobs+using+test+cases you can find an explanation on writing such tescases. Im not sure if its what you wanted but i will have look on that.

- 266
- 4
- 15
For the end to end testing we are running two versions of the job asking the user which version he needs to compare with which version and dynamically creating the table on the fly and compare the result at the db side. This is just an attempt.
Yeah there is no Junit OOB(out of the box.)

- 557
- 6
- 19