How to write a test case for Talend?

I developed a job at Talend. The job retrieves the data from the database and converts it to json, and it uploads that json to the server. I want to write a test case for my work, since we write unit test in java projects. I searched a lot how to write a test example for working with talent, but I did not find anything. If someone knows how to test the work of talent, please suggest.

+6
source share
3 answers

You can simply create a task that calls your task (either tRunJob or tSoap if your task is open to soap):

  • Initiate your database
  • challenge your work
  • check the result on the server (or ridicule the server call by overriding the context settings)
  • use tAssert to check.
  • use tAssertCatcher-> tLogRow to print the test result

I made a CI (internal project) for our project with a basic Java application that is a telnet wrapper around the Talend command line API (listJob, runJob ...) and then generates a Junit XML result file. Everything is called Jenkins. It seems that nothing really exists to perfectly test the operation of Talend: - (

Good luck.

+3
source

In talend 6.0.1, I found a tab called "Test Cases", it seems new to me. At https://help.talend.com/display/TalendRealtimeBigDataPlatformStudioUserGuide60EN/6.10+Testing+Jobs+using+test+cases you can find an explanation when writing such abstracts. I'm not sure if this is what you wanted, but I will look at it.

+2
source

For final testing, we run two versions of the task, asking the user which version he needs to compare with which version and dynamically create the table on the fly, and compare the result from db. This is just an attempt.

Yes, no Junit OOB (out of the box.)

0
source

Source: https://habr.com/ru/post/981652/


All Articles