How to Fix a Slow Page Load in Jenkins


Experiencing slow page loads is a typical issue that most users witness every day. And surely, slow loading pages and sites are disappointing to users. They are not only responsible for lagging issues, but even reducing performance and wasting time. But the good news is that you can fix this difficulty if you follow the correct procedures. So, if you are still puzzled and not sure what to do, then sit tight because this article aims to provide authentic ways to increase your page’s loading speed by testing the performance of your pages by automating your performance tests through Jenkins.  Plus, there are bonus tips to help you increase your page’s efficiency.

What is Jenkins?

Before beginning, let’s understand what Jenkins is.  In simple words, Jenkins is one of the best open-source servers, which is programmed using Java scripting. It allows you to perform several actions to accomplish an ongoing integration process in an automated environment.

So, it’s not mistaken to claim that Jenkins is best known for non-stop integration and deliverance in numerous software-related projects by carefully building, testing, and deploying applications through automation. And as a result, it helps developers to identify errors in the initial development phase, so that they can solve the issues as soon as possible. There are many things you can do using Jenkins, including:

  • Software build through build systems like Maven, Gradle, and many more
  • Automation testing through test frameworks
  • Test scripts execution
  • Continuous Integration (CI) for automatically creating and testing artifacts

So no wonder why Jenkins is preferred by most developers, as it has simplified things more than ever.

Preparing for Test

To fix your slow page speed, you are required to run several tests to know the issues. This can only be possible if you run a performance or stress test on your website or a particular webpage. Using CI/CD systems is the best way to plan the process of creating, testing, and finally delivering any software or web application. Now if you want to check the performance using Jenkins, then first, you have to install the Jenkins Performance Plugin. It will give you access to run tests with the help of prominent load testing tools to receive reports and graphical analysis to fix the problem.  Therefore, to begin the performance test, you have to follow some important pre-conditions:

  • Installing Jenkins on your system
  • Installing the Jenkins Performance Plugin on the similar device/system where you have installed Jenkins
  • Having access to LoadView with an activated Dotcom-Monitor account

Testing Page/Application’s Performance with LoadView Plugin using Jenkins

Assuming that you have already configured the Test Scenario in LoadView, follow these steps to start performance testing:

Step 1: Integrating LoadView with Jenkins

First of all, you are required to connect the LoadView plugin with Jenkins. For that, you will have to mention the Unique Identifier by logging into your LoadView account. Once you are signed in, you need to make your integration UID and copy the code to use in Jenkins.

Account > Integrations > Add Integration > Load Testing Web API

Step 2: Identifying the LoadView Test Scenario ID

To test a Jenkins build by linking LoadView with Jenkins, you need to add a LoadView Test Scenario ID. You can find the scenario ID either by searching the test history page or by visiting the scenario setup page.

We recommend finding the ID by clicking on the Test Manager tab, selecting the test’s Action Menu, and finally clicking on the History option.

Test Manager > Test’s Action Menu > History

As soon as you will see the Test History page, you can find a unique numerical code under the Scenario ID column. 

Step 3: Setting Up LoadView Plugin in Jenkins

Considering you have already registered on Jenkins, sign in to your Jenkins account, and then go to Credentials. Now click on, Add Credentials, and then on the LoadView Security Token (UID) option, set up and verify the credentials, as seen below: 

As you can see, five fields require information to process further. So, in the KIND option select Security Token (UID). In the next field, Scope, choose Global from the dropdown menu while leaving the ID field blank. 

For the Description, you have to write an exclusive statement or anything that helps differentiate the credentials. In the last option, UID, you have to paste the UID code that you copied in step one. After ensuring that each field is correctly filled, click the Validate ID button to allow Jenkins to integrate with the LoadView API.

Step 4: Running the LoadView Test and Finding Results in Jenkins

This is a very important step, as it helps identify the problems in your page speed by testing builds.

So after completing step three, choose the job (project/application) that needs to be checked, and click on the Configure option. Make a few changes in the settings for the current build by hovering on the Build option, then Post-Build Actions, and followed by the Add Post-Build Action. And lastly, selecting the LoadView – Run Load Test Scenario.

Choose the relevant API key from the description for Credentials. Copy the Scenario ID from LoadView and paste it in the Scenario ID option. You will also see the Error Threshold option where you are required to mention the expected or bearable error limit during the testing process. Also, you have to determine the standard response time limit during the test-run. Then click on the Save button.

Note: Keep in mind, that if the percentage of error will exceed the determined value, or the average response time will reach its limit, Jenkins will mark the build as a failure.

Step 5: Observing the Test Results in Jenkins

During the test-run, you can see the status in real-time using the Jenkins Console Output. 

And as soon as the test is completed, you can find the summarized outcomes by clicking the LoadView Results option from the Jenkins menu. Moreover, by clicking the More Details button, you can also see a comprehensive test report. 

These test results will help you identify the issues with your page performance so that you can fix them immediately.

Bonus Tips

The above steps are excellent to see a huge difference in the page load. For instance, if the page takes a minute, you can expect the same work to be done within a few seconds. But that’s not just the end. There are some other important considerations, which demand your attention.  So, assume the following tips as a bonus to assure fast page loads:

Tip 1: Install the Latest Jenkins If You Haven’t Already

Many times a developer goes through slow page performance due to an older Jenkins release. It is suggested to use the most-recent Long-Term Support (LTS) version and completely bypass any updates during the installation.

And if the manufacturers haven’t launched anything new, don’t just wait. Try your best to find the new updates for the plugins you have been using. But keep in mind, if the plugins are working fine, don’t even bother to update them. New updates can destabilize the features.

Tip 2: Avoid Bloating Jenkins

A bloated Jenkins could be one of the reasons for slow page load. So, here’s what you need to do:

  • If you are into multiple projects, then try creating separate Jenkins masters for each one. For instance, create one for your Android projects, and another for PHP. Using this division method will protect all your projects from being affected by any changes you have made recently. Also, you can easily identify plugins, which are needed for a specific project.
  • It annoys to see a long build being failed right when it is about to become successful. Therefore, it is wise to categorize your big project into several smaller jobs. In that way, you can determine what part of your project has been failed to process further rather than verifying the entire build.

Tip 3: Generate Jobs Automatically

One of the many advantages of Jenkins is that it includes an integrated scripting console. That allows you to run commands directly on the server.

You can also use different plugins to save your scripts to be used for other projects. Moreover, you can look for a script catalog online that comes with prefixed scripts, and you can use them for several reasons, such as clearing the unnecessary data files.

To generate builds automatically, you can create your build steps using the Groovy language. And if you are dealing with multiple projects, work smartly and generate all the jobs automatically through various REST API tools, like JMeter and REST Assured.

Tip 4: Choose Plugins Wisely

Jenkins offers a huge plugins collection. But this is where you have to think twice before installing any plugins. Don’t feel the need to have to acquire all of them, as they can potentially damage the operations, and you might see a slow performance.

So, only pick the plugin that you need the most, and uninstall your plugins if there aren’t required any longer.

Tip 5: Integrate Jenkins with Other Tools for Optimum Results

Yes, you can do that! The best example is of REST API tools integration. Nevertheless, you can use numerous other tools to assure smooth fixes. For instance, you can find some best website performance tools on Dotcom-Tools. They offer a free website speed test tool, as well as a scripting tool called the EveryStep Web Recorder for testing web application user scenarios.

Additionally, you can also continually monitor the performance of your websites and applications in production with the Dotcom-Monitor solutions to ensure availability and uptime.

Conclusion: How to Fix a Slow Page Load in JenkinsFixing a slow page load using Jenkins becomes simple if you combine it with different performance tools, like LoadView and JMeter. However, LoadView appears to be easy and quick as compared to JMeter. Also, its results are more genuine and reliable. Plus, you can integrate Jenkins to identify the major causes of inefficient page performance and get an in-depth analysis to fix the problem without wasting your resources. For more information, please visit the Dotcom-Monitor Knowledge Base.


Leave a Reply