Running a session is actually quite straightforward, and a lot easier than having to craft the script by hand.
There are a couple of steps that we need to do before we can generate a test script:
This exports all of the information about the document, including all of the objects, into XML files that can be imported into the script generator. This is how the script generator finds out about sheets and objects that it can use.
AjaxZfc
URL for the application. We need to give this information to the script builder so that it knows how to connect to the application:ProgramDataQlikTechQlikViewServer
folder. Stop the QlikView Server Service and then archive or delete the Performance*.log
, Audit*.log
, Events*.log
, and Sessions*.log
files. When you restart the service, new ones will start to be created:C:PerfLogsAdminNew Data Collector SetQlikView Performance Monitor
).Once those steps have been completed, we can go ahead and create a script:
QlikViewTestScriptGeneratorGui.exe
from the ScriptGenerator
folder.Property | Value |
---|---|
QlikView version | 11. |
Document URL | Paste the URL that you recorded earlier. |
Security settings | Choose the right authentication mechanism for your QlikView server (more details discussed later). |
Concurrent users | How many users you want to run concurrently. |
Iterations per user | How many times each user will run through the scenario. If you set this to Infinite, you need to specify a Duration below. |
Ramp up | What time should there be before all users are logged in. 1 means that all users start together. |
Duration | How long the test should be run for. If you set this to Infinite then you must set a number of Iterations per user above it. |
If you use NTLM, then you cannot use more than one concurrent user. This is because the NTLM option will execute under the profile of the user running the application and each concurrent user will therefore attempt to log in with the same credentials. QVS does not allow this so each concurrent user will actually end up killing each other's sessions.
If you want to simulate more than one user, then you can turn on Header authentication in the QVWS configuration and make use of the userpw.txt
file to add a list of users. The QVS will need to be in DMS mode to support this. Also bear in mind that you will need to have an appropriate number of licenses available to support the number of users that you want to test with.
ScriptGeneratorSourceXMLs
folder. Note that you should not use spaces or non-alphanumeric characters in the XML filename. It is a good idea to make the filename descriptive as you might use it again and again.This setting specifies the range of delay between different actions. We should always allow an appropriate minimum to make sure that the application can update correctly after an action. The random variation between the minimum and maximum settings gives a simulation of user thinking time.
Remember to keep saving as you go along.
When you click on OK, you will be prompted on whether to save this setting permanently or not. You can click on OK in response to this message:
Once you have executed a test, you will want to analyze the results. The scalability tools come with a couple of QVW files to help you out here. There are a couple of steps that you need to go through to gather all the files together first:
QVScriptGenTool_0_7 64BitAnalyzer
folder, there is a ZIP file called FolderTemplate.zip
. Extract the FolderTemplate
folder out of the ZIP file and rename it to match the name of your analysis task—for example, SalesAnalysis
. Within this folder, there are four subfolders that you need to populate with data:Subfolder | Data source |
---|---|
| These are the QVS event logs— |
| These are the JMeter execution logs that should be in |
| These are the CSV files created— |
| These are the QVS session logs— |
QVD Generator.qvw
file using QlikView Desktop. Set the correct name for the subfolder that you have just created:SC_Results – DemoTest.qvw
file and save it as a new file with an appropriate name—for example, SC_Results – SalesAnalysis.qvw
. Change the Folder Name variable as before and reload.Now you can start to analyze your server's performance during the tests:
Because you can run multiple iterations of the test, with different parameters, you can use the tool to run comparisons to see changes. These can also be scheduled from the command line to run on a regular basis.
One thing that these JMeter scripts can be used for is a process called "warming the cache". If you have a very large QlikView document, it can take a long time to load into memory and create the user cache. For the first users to connect to the document in the morning, they may have a very poor experience while waiting for the document to open—they may even time out. Subsequent users will get the benefit of these user actions. However, if you have a scheduled task to execute a JMeter task, you can take the pain away from those first users because the cache will already be established for them when they get to work.