Test my custom component

Six Stars

Test my custom component

Hello,

 

I want to developed a component with your new kit: https://talend.github.io/component-runtime/main/1.0.1/index.html. Now I want to test the component. First it is very bad that I have to close Talend studio when I want to deploy my component over maven. Second I want to write a Junit Test, in your documentation you write: "The Job.component() method is provided by Talend Component Kit" but where??? In which package you deploy that method? My dependencies are: component-api, component-runtime-junit. 

 

And can you please commit a complete example of a custom component on github?


Accepted Solutions
Employee

Re: Test my custom component

Hi Benjamin,

 

The Job class is in package org.talend.sdk.component.runtime.manager.chain. It is part of component-runtime-manager which is a transitive dependency of component-runtime-junit so you should be already set up to use it.

 

We will be working on providing ready to use examples in the coming weeks to complete the documentation already available online.

 

Side note: to start testing components more unitarily you don't need the Job API until you mix multiple components in the same "job". Until you hit that need, you can directly use the SimpleComponentRule. If you use the starter application to create your initial component(s) skeleton(s), then you can select in the facet box (first step) the facet "Testing" to have some skeleton of that pattern.

Romain
Talend Component Kit Documentation: https://talend.github.io/component-runtime/

All Replies
Employee

Re: Test my custom component

Hi Benjamin,

 

The Job class is in package org.talend.sdk.component.runtime.manager.chain. It is part of component-runtime-manager which is a transitive dependency of component-runtime-junit so you should be already set up to use it.

 

We will be working on providing ready to use examples in the coming weeks to complete the documentation already available online.

 

Side note: to start testing components more unitarily you don't need the Job API until you mix multiple components in the same "job". Until you hit that need, you can directly use the SimpleComponentRule. If you use the starter application to create your initial component(s) skeleton(s), then you can select in the facet box (first step) the facet "Testing" to have some skeleton of that pattern.

Romain
Talend Component Kit Documentation: https://talend.github.io/component-runtime/
Six Stars

Re: Test my custom component

Hey rmannibucau,

Are there any news regarding a ready to use example or a comprehensive guide on how to build a custom component with the new component kit?
I found this https://help.talend.com/reader/C0dGRfXr_xwP1vm8wG62BA/SGxjYVOKBZwp~ENBEWS50g on your site. However it does not work for me, since the component will not show up in my studio.
Employee

Re: Test my custom component

Hello @Gunneone,

 

We are currently in the process of enhancing the docs available on https://talend.github.io/component-runtime/main/1.0.4/index.html.

You can start from there or directly have a look at the following articles:

https://talend.github.io/component-runtime/main/1.0.4/methodology-creating-components.html.

- https://talend.github.io/component-runtime/main/1.0.4/studio.html

 

Let us know if there are some information you would like us to add and we'll work on it asap.

 

Florent