Do you know Tricentis Tosca.... can create load scripts?

Blog!

Otman Zemouri is an experienced Technical Test (Lead) Consultant and Agile Test Specialist. Furthermore he is an expert in the field of QA development, Quality Engineering and Test Automation. He has broad knowledge of various, tools and techniques with a sweet spot for Tricentis Tooling. Otman shares his experience related to automation with Tricentis tooling. This blog is about 'How to use Tosca for Performance Testing'.

The world around us is constantly changing, and so are cities and agglomerations. A revolutionary transformation occurred in Rotterdam’s urban landscape and infrastructure in the last 50 years. Until 1996, the Willems Bridge over the river Maas was decisive for the skyline of the Dutch town Rotterdam, after which the baton was taken over by another technical masterpiece, the Erasmus Bridge, downstream. The idea of “the Swan” was born because of the increasing pressure on the center of Rotterdam. Due to a strong increase in traffic, an extra bridge over the river Maas was necessary. Now you're probably thinking, what does this have to do with Tosca?

Rotterdam’s transformation can be compared to the continuous developments and innovations (taking place) in the technical field. The technology behind Tosca should adapt/innovate as well, but only if its software landscape doesn’t drastically change. A decisive factor for the software landscape is its corresponding infrastructure. If the infrastructure doesn’t “perform” properly, then it will have a negative impact on the environment, which can result in, for example, a slow website or application. I don't have to tell the “die hard” performance tester that measuring “performance” is an important part of the software development process. There are plenty of performance test tools, of which NeoLoad certainly forms a nice “combi” with Tosca. This article is the second in the series of “Do you know that Tosca...”

Do you know that with Tosca, you can generate loadtest scripts? But what are loadtest scripts? To answer that question, we first need to understand what load testing is all about. According to the ISTQB definition, load testing is “...a type of performance testing conducted to evaluate the behavior of a component or system with increasing load, e.g., numbers of parallel users and/or numbers of transactions, to determine what load can be handled by the component or system.” This therefore concerns a specific form of performance testing, just as stress testing is also a form of performance testing. In performance testing, we generally perform a “health check” on the infrastructure. In load testing, an application, system or network is subjected to an increasing load in a specific time frame against the limits of the performance requirements of that same application, system or network.

How do I implement load test scripts in Tosca? The first thing you need to do is to download and install NeoLoad software. For testing purposes we use the “trial” version, since NeoLoad is not open source software. I have added the link at the bottom of this article. Furthermore, it is important to mention that when registering for a “trial” version only work-related emails are accepted. After installing NeoLoad, a second important step is to download and install the Tosca NeoLoad plugin from GitHub (see figure 1).

Figure 1. Tosca NeoLoad plugin from GitHub
Figure 1.

I also placed the link of the GitHub repo at the bottom of this article. The Tosca NeoLoad plugin can be installed via a batch file, so you don't have to worry about complicated configurations. An important note here is that you have to close Tosca Commander when you start the installation of the plugin. There is also a way to install the plugin / add-on via Powershell (.ps1 script), but we will choose the simple way. In addition, you should take into account the fact that you download the correct version of the plugin. For example, for Tosca version 15.0 you must use NeoLoad version 6.6 to 8.1 in combination with Tosca NeoLoad plugin version 2.6.0.1. This is explained further on GitHub. For now, only a Windows variant of the plugin exists, as long as Tosca is “Windows” based. If you downloaded the plugin from GitHub, the contents of the zip file will look like this (see figure 2).

contents of the zip file
Figure 2.

In folder “TBox” and “ToscaCommander” are .dll files that will eventually be installed locally on your PC (%TRICENTIS_HOME% folder). All you need to do now is double click on the “Install-NeoLoadToscaAddon.bat” file. This will automatically install the Tosca NeoLoad plugin in Tosca Commander. The next step is to set the correct configuration within Tosca Commander. Once you have launched Tosca Commander, go to the “Options” menu (see figure 3). If all goes well, option “NeoLoad Add-on” has been added.

NeoLoad Add-on
Figure 3.

Your last configuration step is to add the “NeoLoadApiKey” value, which can be found in the “Preferences” TAB of your NeoLoad load testing tool. This will complete the configuration of Tosca in combination with NeoLoad. Let’s start load testing! But how do you do that?

For this we can use existing Tosca TestCases, which we have to drag to the ExecutionList. To keep things simple, I'll leave out the section regarding the (performance) Requirements. I will not go into detail about the part of NeoLoad, the tool that you can also use without Tosca. If you have started NeoLoad and have created a new (empty) NeoLoad project, you can simply generate a load test script in Tosca Commander via a “right click” action on an ExecutionEntry (see figure 4).

ExecutionEntry
Figure 4.

Your first NeoLoad test is a fact! Pretty simple right? Of course, with a so-called “performance test project” you have to take into account the performance test requirements that apply within the organization or project. For more information about NeoLoad (standalone) or Tosca in combination with NeoLoad:

Neoload-trial

NeoLoad-plugin for Tosca

Published: 3 May 2022
Author: Otman Zemouri

These blogs appeared in the series
"Do you know Tricentis Tosca..."

  1. ...can run Selenium scripts?
  2. ...can create Load scripts?
  3. ...can work with CI pipelines? (part 1)
  4. ...can work with CI pipelines? (part 2)
  5. ...has made CI/CD integration even easier? (part 1)
  6. ...has made CI/CD integration even easier? (part 2)