Jenkins Jobs Test

A job is a collection of steps that you can use to build your source code, test your code, run a shell script, or to run an Ansible role in a remote host. There are multiple job types available to support your workflow for continuous integration & continuous delivery. Jenkins supports different types of build jobs. Some of them are :

Freestyle software project - Freestyle build jobs are general-purpose build jobs that provide maximum of flexibility and can be used for any type of project. This is the central feature of Jenkins. Jenkins will build your project, combining any SCM with any build system, and this can be even used for something other than software build.

Pipeline - This job runs the entire software development workflow as code. Instead of creating several jobs for each stage of software development, you can now run the entire workflow as one code.

Maven project - Build a maven project. Jenkins takes advantage of your POM files and drastically reduces the configuration.

Multiconfiguration job (also referred to as a “matrix project”) - This job allows you to run the same build job on different environments. It is used for testing an application in different environments, with different databases, or even on different build machines.

External Job - This type of job allows you to record the execution of a process run outside Jenkins, even on a remote machine. This is designed so that you can use Jenkins as a dashboard of your existing automation system.

If the Jenkins server is unable to process these jobs quickly or the jobs fail/are aborted frequently, it would result in an overload condition characterized by long-winding job queues and a slowdown. In the event of such abnormalities, administrators will have to instantly figure out which type of jobs are contributing to the overload and why – is it because jobs of this type are failing frequently? Or is it because the jobs are taking more time for execution? The Jenkins Jobs test helps administrators answer these questions!

This test auto-discovers different types of jobs that are currently running on the target Jenkins server, and for each job type, reports the count of jobs executed, the execution time of jobs, the count of job failures and abortions, and the percentage of job health. This way, the test sheds light on job types that fail/ are aborted often, those that are taking too long to execute, and the probable reasons for the same.

Target of the test : A Jenkins server

Agent deploying the test : An internal agent

Outputs of the test : One set of results for each job type running on the target Jenkins server.

Configurable parameters for the test
Parameter Description

Test period

How often should the test be executed

Host

The host for which the test is to be configured.

Port

The port at which the specified host listens. By default, this is set to 8080.

Username and Password

Specify the valid credentials of a user who has Read-only access to the Jenkins REST API to gather performance metrics from the target Jenkins server against the Username and Password parameters.

Confirm Password

Confirm the Password by retyping it here.

Excluded Jobs

Specify the comma-separated list of jobs that you want the eG agent to exclude from monitoring against this parameter. By default, this is set to none indicating that this test will monitor all the jobs running on the target J.

SSL

By default, the SSL flag is set to No, indicating that the target Jenkins server is not SSL-enabled by default. To enable the test to connect to an SSL-enabled Jenkins server, set the SSL flag to Yes.

DD Frequency

Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD frequency.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability.
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Job status

Indicates the current status of this job.

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Disabled 0
Not built 1
Enabled 2

Note:

By default, this measure reports the current status of each job. The graph of this measure however, is represented using the numeric equivalents only.

Total executions

Indicates the number of times that this job is executed on the target Jenkins server.

Number

Compare the value of this measure across jobs to know which job is executed for the maximum number of times.

Successful executions

Indicates the number of times that this job is executed successfully.

Number

 

Failed executions

Indicates the number of times that this job failed during execution.

Number

Compare the value of this measure across jobs to know which job is failing frequently.

Aborted executions

Indicates the number of times that execution of this job is aborted.

Number

 

Jobs health

Indicates the health of this job in percentage.

Percent

Ideally, the value of this measure should be high. Compare the value of this measure across jobs to know which job is in unhealthy state.

Last execution status

Indicates the status of this job during the last measurement period.

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value Numeric Value
Failure 0
Success 1

Note:

By default, this measure reports the status of each job during the last measurement period. The graph of this measure however, is represented using the numeric equivalents only.

The detailed diagnosis of this measure reveals the type and status of each job, time taken by each job, estimated duration for job execution and the time at which the job execution was started.

Last job duration

Indicates the time taken by this job during the last measurement period.

Seconds

 

Average job execution time

Indicates the average time taken for executing this job.

Seconds

The value of this measure will vary based on the type and size of the job that is being executed.

Ideally, the value of this measure should be low. A consistent increase in the value of this measure for any job type could indicate a bottleneck when processing jobs of this type. Administrators may then want to investigate further to figure out where the bottleneck lies.