On Wed, Apr 27, 2022 at 9:06 AM Ullrich Hafner <ullrich.haf...@gmail.com> wrote:
>
> This will depend on the type of the plugins. In my analysis plugins my tests 
> start by creating a freestyle job or pipeline. There is no previous setup 
> required. I don't think that this can be speed up with job-dsl or something 
> different.

The point is that creating the project isn't the "interesting" part of
your test. It could be done with white-box JTH/RealJenkinsRule code
rather than black-box ATH/Selenium code and you presumably wouldn't
care, as long as the "interesting" part of your test (verifying that
analysis results are present, clicking into graphs in the UI, etc) was
tested by black-box ATH/Selenium code. And as long the parts that are
"uninteresting" in the context of your analysis plugins are deemed
"interesting" by some other plugin (or core) and tested by black-box
ATH/Selenium logic there, then we can maintain the same level of
coverage across the whole Jenkins project at a macro level.

In this example, we could have a black-box ATH/Selenium test that
creates a Freestyle job in core and a black-box ATH/Selenium test that
creates a Pipeline job in Workflow: Job. Functional testing for
creating those job types would then be covered sufficiently, and in
your analysis plugins you could take the shortcut of using white-box
JTH/RealJenkinsRule logic to create the job efficiently (and
reliably!) before proceeding to the "interesting" part of your test
with black-box ATH/Selenium logic.

The point is that efficiency and reliability can be improved by
removing duplicate effort. Expensive and flaky black-box ATH/Selenium
logic to create a Freestyle job doesn't need to run thousands of
times. It only needs to run a handful of times in key repositories,
and the other repositories can assume that it would work and test on
top of that, a form of proof by induction.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAFwNDjp%2BnU5dpPB3j6cd_q3gz0KSuZ%2B9Md%3DVBX3ypJbq%2B%3D5%3D2g%40mail.gmail.com.

Reply via email to