Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QlikView: Advanced Data Visualization

You're reading from   QlikView: Advanced Data Visualization Discover deeper insights with Qlikview by building your own rich analytical applications from scratch

Arrow left icon
Product type Course
Published in Dec 2018
Publisher Packt
ISBN-13 9781789955996
Length 786 pages
Edition 1st Edition
Arrow right icon
Authors (4):
Arrow left icon
Barry Harmsen Barry Harmsen
Author Profile Icon Barry Harmsen
Barry Harmsen
Miguel  Angel Garcia Miguel Angel Garcia
Author Profile Icon Miguel Angel Garcia
Miguel Angel Garcia
Stephen Redmond Stephen Redmond
Author Profile Icon Stephen Redmond
Stephen Redmond
Karl Pover Karl Pover
Author Profile Icon Karl Pover
Karl Pover
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

QlikView: Advanced Data Visualization
Contributors
Preface
1. Performance Tuning and Scalability FREE CHAPTER 2. QlikView Data Modeling 3. Best Practices for Loading Data 4. Advanced Expressions 5. Advanced Scripting 6. What's New in QlikView 12? 7. Styling Up 8. Building Dashboards 9. Advanced Data Transformation 10. Security 11. Data Visualization Strategy 12. Sales Perspective 13. Financial Perspective 14. Marketing Perspective 15. Working Capital Perspective 16. Operations Perspective 17. Human Resources 18. Fact Sheets 19. Balanced Scorecard 20. Troubleshooting Analysis 21. Mastering Qlik Sense Data Visualization Index

Running an example execution


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:

  1. We need to open the target application in QlikView desktop and extract the layout information:

    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.

  2. Copy the 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:

  3. Clear the existing log files from the QVS. These files will be in the ProgramData\QlikTech\QlikViewServer 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:

    Note

    Note that you should be careful not to delete the PGO files in the same folders—these are copies of the server's license information files.

  4. Start the Performance Monitor using the template that you configured earlier. Double-check that it starts to create content in the folder (for example, C:\PerfLogs\Admin\New Data Collector Set\QlikView Performance Monitor).

Once those steps have been completed, we can go ahead and create a script:

  1. Execute the script generator by running QlikViewTestScriptGeneratorGui.exe from the ScriptGenerator folder.

  2. There are some properties that we need to set on this page:

    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.

    Note

    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.

  3. Save the document in the ScriptGenerator\SourceXMLs 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.

  4. Click the Scenario tab. Click the Browse button and navigate to the folder where you save the document layout information earlier. Save the template (it's always a good idea to save continually as you go along). Change the Timer Delay Min to 30 and the Max to 120:

    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.

  5. By default, there are three default actions—open AccessPoint, open the document, and then a timer delay. Click on the green + button on the left-hand side of the bottom timer delay action to add a new action below it. Two new actions will be added—an unspecified Choose Action one and a timer delay containing the settings that we specified above. The Auto add timers checkbox means that a timer delay will be automatically added every time we add a new action.

  6. Build up a scenario by adding appropriate actions:

    Remember to keep saving as you go along.

  7. Click on the Execution tab. Click on Yes in answer to the Add to execution prompt. Expand the Settings option and click on Browse to select the JMeter path:

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:

  1. Right-click on the script name and select Open in JMeter:

  2. Click on OK on OutputPopupForm. When JMeter opens, note the entries that have been created in the test plan by the script generator.

  3. Close JMeter. Back in the script generator, right-click on the script again and select Run from the menu. The Summary tab appears, indicating that the script is executing:

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:

  1. In the QVScriptGenTool_0_7 64Bit\Analyzer 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

    EventLogs

    These are the QVS event logs—Events_servername_*.log

    JMeterLogs

    These are the JMeter execution logs that should be in QVScriptGenTool_0_7 64Bit\Analyzer\JMeterExecutions

    ServerLogs

    These are the CSV files created—SERVERNAME_Processes*.csv

    SessionLogs

    These are the QVS session logs—Sessions_servername_*.log

  2. Open the QVD Generator.qvw file using QlikView Desktop. Set the correct name for the subfolder that you have just created:

  3. Reload the document.

  4. Once the document has reloaded, manually edit the name of the server using the input fields in each row of the table:

  5. Once you have entered the data, click on the Create Meta-CSV button. You can then close the QVD Generator.

  6. Open the 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.

Note

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.

You have been reading a chapter from
QlikView: Advanced Data Visualization
Published in: Dec 2018
Publisher: Packt
ISBN-13: 9781789955996
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime