Example of Test case based on a Job - Cloud - 7.3

Talend Software Development Life Cycle Best Practices Guide

Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend JobServer
Talend Management Console
Talend Remote Engine
Talend Studio
Administration and Monitoring
Design and Development
Last publication date
A Job called job_feature400 is created in a project called CI. The Job aims at reading a .csv file containing a list of clients living in California, matching these clients with those coming from the Orange county of Los Angeles using a tMap component, before uploading the result into a MySQL database.

The processing part (tMap) is used to create a Test case called test_feature400 and will allow developers to test, filter, and map any types of input and output files.

Note that the generated skeleton depends on the component(s) selected in the Job to create the Test.

Here, the Test case aims at:
  • reading input data files (tFileInputDelimited components).

  • transforming data with an immutable set of components (INPUT and OUTPUT items) based on the initial Job.

  • writing the output data (to a tFileOutputDelimited component).

  • comparing the temporary output file (tCreateTemporaryFile component) to a reference file you need to define, using a tFileCompare component.

  • generating the Test execution status (OK if it succeeds, Fail if it fails) using a tAssert component.

Note that you can add as many instances of tests as you need, which means you can run the same test with different input and reference files.

The Test Case is ready to be executed once the dataset has been defined in the Test Case view, and a specific context group (called Test) has been defined in the Context view. The dataset consists of data files that you define as input and reference files to test your data.

The Test Case was successfully executed on the Test Instance and the input and reference files are identical.

Once developers have designed the integration tests locally in the Studio, these tests need to be automated with continuous integration tools such as build systems. For more information, see Building and Deploying.