Hi,

 

I'm looking on a way to have a unit test for my pipeline shared library. 

 

I thought to try the approach of dsl code testing which is using gradle 
build and the Jenkins harness test framework. I managed to setup project 
and write the first unit test for my library, but I faced a problem that 
after executing sh or bat step the library function exit after executing 
step.

 

To reproduce the issue I've just created a sample library which has a foo() 
function that using sh or bat and echo 'first' and 'two' but when you run 
the build it failed because two is not printed into the console long

 

Here is the details for the sample project:

   https://github.com/rajanasrallah/test_pipeline_library

 

To build:

   gradle test

 

 

Kind regards,

Raja Nasrallah

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d4a5b549-0d46-4fa6-86e9-9463c356dde5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to