In NeoLoad there are times where you may need to handle dynamic values. Although this article does not cover the correlation of dynamic values, we will cover how to get those values into a framework for later use. Dynamic variables can be stored within a framework thus saving them for use with other projects or user paths within the same project. It’s a valuable tool for keeping time alleviating the need to recreate the same values repeatedly. Once exported into a framework, those dynamic parameters migrate easily from one project to another.
The first place to note for getting variables into a framework is directly under the Advanced Parameters window within the Variable Extractors tab; once a variable is created, click Move as framework parameter…
Once clicked, a new window opens up to the Search for Dynamic Parameters page asking for a variable name and to either select an existing framework or to create a new one.
To create a new framework, click Next >, bringing you to the Injection settings dialogue. Here we have replacement options including XPath expression. (Generally, these can maintain the parameter values that are auto-selected by the wizard as NeoLoad understands the type of replacements your given correlation will need).
Click Next > and you will get to the Dynamic Parameters. You could skip this step (see “skip this test” or click Finish). For our purposes, we will click Next > which starts the process of scanning the entire user path for all identifiable included framework variables along with the one we’ve just created. This process will search for Dynamic Parameters using framework rules established in NeoLoad. What this means is NeoLoad will check against all other frameworks presently selected (we will cover this later), adding our newly created variable to the framework.
Here we can see that it found the framework parameter we created and it is selected (depicted by a checkbox to its left) so clicking Finish will add the new framework to the preferences of NeoLoad and also correlate the matched data. Thus concluding the first way to export a correlated value into a framework.
Note: You can also search the entire project for dynamic parameters by right-clicking on the root user path node and clicking Search for Dynamic Parameters or selecting the node and clicking a button of the same name presented in your right-hand options.
NeoLoad makes it even easier to build a framework with an automated feature. By selecting the data, you want to correlate and then double-clicking, an Edit Request Parameter window opens:
When choosing the Use an extracted value option and Automatic configuration NeoLoad does all the heavy lifting for you. NeoLoad will automatically find the response that contains the value you are looking for, builds the regular expression that will be needed to search the response and then displays the data that it finds. This means the value was legitimately found and handled within the project and the options to Replace in all requests and Add to framework becomes available. Adding to the framework from here then takes you through the converting Variable Extractor into the framework wizard we covered earlier in this article. This will guide you to complete bringing it into the framework.
We’ve covered how to create/export into frameworks, so how do we bring one into another project or even a newly recorded user path? To add your custom framework (and any others) merely select Edit -> Preferences -> General Settings -> Frameworks section.
Next, use the Import function to select the framework you exported from the other project and can bring it into another. Note that all other frameworks NeoLoad provides are also selected by default. That means when you scan your project, if any other variables from those frameworks match, they will be picked up and correlated based on the new and existing frameworks in NeoLoad. Here we can see ours made it onto the list along with our single sample variable. With this new framework selected, correlation is automatically done when you execute new recordings or update existing ones; no further work necessary.
Putting it All Together
NeoLoad has been developed to include many time saving/productivity increasing features. Having the ability to select multiple previously generated frameworks saves not only time but also saves system space and worker overhead. When considering NeoLoad, keep productivity in mind as this feature (and many others in NeoLoad) saves the company time and staff hours whereas previously this kind of work is required repetitively.
If you have suggestions or would like to participate in this conversation, please let us know within the Neotys Community.