Load Testing using Netling
Tags: testing, webperf, tutorial, performance
Published: 2020-09-02 15:04:32

<!-- wp:paragraph -->
<p>As a performance test engineer, I always look for trends, new tools or solutions in the performance market. Couple months ago I stumbled upon a lightweight load testing tool called Netling. I wanted to write about very next day, but due to project work and <a href="https://qainsights.com/how-i-successfully-cleared-certified-kubernetes-application-developer-ckad-exam-in-5-weeks/" target="_blank" rel="noreferrer noopener">Kubernetes</a> certification, I was postponing this article. Today I got the time to research and test Netling and share my thoughts in a form of blog article Load Testing using Netling. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>What is Netling?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Netling is a simple, lightweight load testing tool which is written in C#. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It is fast, free, and will be able to inject more load from your local machine.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>How to install Netling?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Netling is free to download and you can customize the code based on your needs. <a href="https://github.com/hallatore/Netling/releases" target="_blank" rel="noreferrer noopener">Download Netling from GitHub</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There are two flavors of Netling is available. If you are a GUI person, you can download the Netling client. If you are terminal (CLI) person, you can leverage the Netling Console.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The only prerequisite is to have .NET 5 framework in your system. <a href="https://dotnet.microsoft.com/download/dotnet/5.0" target="_blank" rel="noreferrer noopener">Download .NET 5 here</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Download the Netling zip files from GitHub, extract the contents to launch either the client or console.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>How to launch Netling Client?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Launch the Netling client from <code>C:\..\Netling.Client.net471\Netling.Client.exe</code> by double-clicking on it. On successful launch, you will get the below GUI.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":7570,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-14.png" alt="Load Testing using Netling" class="wp-image-7570"/><figcaption>Load Testing using Netling</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:heading -->
<h2>How to load test the URL in Netling Client?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Load testing in Netling client is very simple. You have to configure the following:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Threads<ul><li>You can configure up to 80 (20 per core)</li></ul></li><li>Duration<ul><li>You can configure based on your needs</li></ul></li></ul>
<!-- /wp:list -->

<!-- wp:image {"align":"center","id":7572,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-15.png" alt="Duration" class="wp-image-7572"/><figcaption>Duration</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:list -->
<ul><li>URL<ul><li>Valid URL under test e.g. <code>https://example.com</code></li></ul></li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>To start the load testing, click on <code>Run</code> button as shown below.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":7573,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-16.png" alt="Run" class="wp-image-7573"/><figcaption>Run</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>A progress bar will get displayed once the test is started.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":7574,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-17.png" alt="Run in progress" class="wp-image-7574"/><figcaption>Run in progress</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>After the test is completed, you will get the performance statistics in a separate window as shown below. You can baseline the run by clicking on <code>USE AS BASELINE</code> button.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":7575,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-18.png" alt="Test Result" class="wp-image-7575"/><figcaption>Test Result</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>By default, Latency Histogram will get displayed. You can navigate to <code>Request Throughput</code> and <code>Status Code &amp; Exceptions</code> by clicking on the respective tabs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Below is the another run which violated the baseline.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":7576,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-19.png" alt="Baseline" class="wp-image-7576"/><figcaption>Baseline</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:heading -->
<h2>How to launch Netling Console?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you are a CLI person, then you will love Netling Console. Launch terminal and navigate to <code>C:\..\Netling.ConsoleClient.netcore2.1.Win10-x64</code> as shown below and type <code>.\Netling.exe -h</code> to view the usage.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7577,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-20.png" alt="Netling Console" class="wp-image-7577"/><figcaption>Netling Console</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>To launch a load test, you need to pass only the three parameters: threads, duration, and the number of requests as shown below. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>After the successful execution, you will get the graphical representation and the performance statistics.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7578,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://qainsights.com/wp-content/uploads/2020/08/image-21-1024x532.png" alt="Netling Console Output" class="wp-image-7578"/><figcaption>Netling Console Output</figcaption></figure>
<!-- /wp:image -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Quick Tip: You can add the Netling.exe path to the <code>Environment Variable</code> for quicker access.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:heading -->
<h2>Points to note</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You can also use Netling.core into your custom solutions. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>By default, you can run up to 1000 connection. You can configure the number at <code>Netling.ConsoleClient.dll.config</code> file.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Netling had a feature called <code>Pipelining</code> but it was removed due to error prone. <strong>Pipelining </strong>enables multiple requests to go through in a single socket without waiting for a response.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>By default, Netling uses <code>SocketWorker</code> which is very fast. But you can also use <code>HTTPClientWorker</code> which is easier to tweak.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Pros</h2>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><li>Easy to get started and learn</li><li>Simple setup</li><li>Lightweight</li><li>Free and customizable</li><li>Baseline setup</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2>Cons</h2>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><li>No results' exporter</li><li>Can't view the request/response logs</li><li>Distributed load testing is not possible</li><li>Cannot design business transactions</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2>Conclusion</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you would like to test just the URL, there are a lot of options available. Netling is simple, free, and easy to set up and learn. Fire up the test and view the results. If your expectation is not too much, Netling is worth to check it out. </p>
<!-- /wp:paragraph -->