QUICK START GUIDE Cloud based Web Load, Stress and Functional Testing
Performance testing for the Web is vital for ensuring commercial success. JAR:Load is a Web Load Testing Solution delivered from the Cloud for organisations across the globe. This revolutionary, ultra fast, highly scalable solution is accessible anywhere, anytime, and from any device, allowing tests to be created and implemented in minutes with no download. JAR:Load allows you to build, execute, and analyze performance tests on its powerful, intuitive platform. Use the Cloud functionality to scale your tests to any load testing requirement, across any geographical location. Process Driven Testing JAR:Load s process driven user interface offers users a step-by-step guide on how to plan, create and execute load tests instantly. Suitable for both novice and experienced performance engineers, users can create simple tests without code, or use intuitive LUA scripting to build highly customised, data-driven tests with ease. Design This section allows you to design and create scripts, load profiles, datasets, etc. Deploy Add in your cloud or behind the firewall servers to spread the load (not configurable in the trial). Schedule You can schedule any test (or launch now) from this section. Run This section provides reporting and analysis of your live or previously executed tests.
QUICK START GUIDE Dashboard Figure 1: Dashboard Panel The Dashboard area is the starting point for your load generation, it gives an overview of what is happening within JAR:Load. It is split up into widgets which are outlined in the next page. www.jartechnologies.com
Quick links jump right in In this widget you can quickly jump to specific parts of the application, each link is outlined below: Create a script This link will take you to the Scripts sub panel under Design. You will be able to access knowledge base articles on all areas of the sub panel as well as tutorials on how to create a script. Recording Wizard This link will take you directly to the recording wizard. If you are not familiar with LUA scripting the wizard will take you through step by step to create and record a script. Create a data-set This link will take you to the datasets area, here you can upload CSV files containing information that the virtual users can use during the load tests. Figure 2: Quick Links Widget Create a load profile If you have already created a script you can use this link to take you straight through to creating a load profile which describes when to create virtual users and how many virtual users to create. Configure load generators This link will take you the Deploy section where you can use either static (behind the firewall) servers or cloud servers to create the load on. View test summary This link will take you through to the Scheduling area where you can view your currently executing tests or your pending tests. Launch a test now This link will take you through to the Launch now sub panel of the calendar where you can launch a test right away. View the results This link will take you through to the Run area where you can view results from the currently executing test plan or view results from previously executed test plans.
QUICK START GUIDE JAR:Load service status This widget displays the current status of JAR:Load. Service Status Displays information regarding the servers and virtual machines within the JAR:Load environment. Pending Events News such as upcoming releases, pending maintenance or updates regarding downtime will be displayed in this section. Figure 3: JAR:Load Service Status Widget Project Resources Summary This widget displays the following: Resources currently in use Shows the amount of virtual users in use by currently executing tests. Resources currently not in use Shows the amount of virtual users not in use, if you have any executing test plans this will be the number of virtual on your account minus the virtual users in use. Load Profile Summary This area shows you how man Load Profiles you have currently scheduled or executing. Figure 4: Project Resources Summary Widget User Summary This widget displays information for the user such as: The last time a user logged in The duration of the session before it will time out, expire and ask the user to log in The number of projects that a user is linked to. Figure 5: User Summary Widget
Getting started with JAR:Load This widget will allow you to follow Learn more links for information on the following topics: Load This will open an article explaining how to get started with generating load and stress on your application. Functional This will open an article allowing you to understand how JAR:Load gives you functional testing for free! AJAX without any work! This will open an article on how our real browsers mean no more AJAX scripting Recording This will open an article explaining our recording mechanism as well as taking you to a dedicated tutorial. Figure 6: Getting started with JAR:Load
QUICK START GUIDE Find out more This widget will display the latest information from various sources from the JAR:Load support section and the JAR:Load Website. Figure 7: Find out more
Training Videos This widget will contain links to videos that will explain the different areas of JAR:Load. We have the following videos on the dashboard: Figure 8: Training Videos Getting Started A tour around the application that will show you how to create a script, create a load profile and execute the test. An in-depth look at real browser testing This video will explain why JAR:Load uses real browsers and the benefits it can bring to giving a true representation of how your website/web Application acts. Load and functional testing with one script This video will explain how you can functionally test your site along with load testing it at the same time. Recording a website This video will explain step-by-step guide on how to use the recording feature in JAR:Load to help create your script. Understanding load profiles This video will explain how load profiles will work and show an example on how to create one. This is only a small section of our videos, a full range of videos can be found within our Knowledge Base.
QUICK START GUIDE How do I? This widget will contain links to articles that will explain the following: Getting stated with JAR:Load in 5 minutes A Guide that will take you through the process on creating a script, creating a load profile, launching a test to viewing the results. Record a VU script This will open an article explaining our recording mechanism as well as taking you to a dedicated tutorial. Pricing An article explaining ways you can find out about our pricing guide for JAR:Load. Figure 9: How do I
Getting Support This widget will contain links to knowledge base articles that will explain the following: How do I access JAR:Load live support? This article will provide information on how to enable the live support tab on various panels. Can I speak with a support engineer? This article will provide information on how to get in contact with our support engineers. How do I create a support ticket? This article will provide information on how to create a support ticket on our dedicated ticket system (http://tickets.jarload.com) if you have an issue or spot a bug. Figure 10: Getting Support
QUICK START GUIDE Building a Simple VU Script A Virtual User (VU) Script is where you can create highly customisable scenarios to test how your target system will function under different conditions. Navigate to the Design > Scripts tab and follow the instructions below: Above the Scripts sub panel you will see the New Script button (Figure 11), clicking this will create a new script for you to customise. Figure 11: Create a new script Under Design > Scripts > Properties enter in the following details as show in Figure 12. Figure 12: Properties Panel Once you have entered in the properties of the script, you can now move onto the LUA Script tab. You should see the tab open along the Sub Menu. If the tab is not open, click on the add tab button, select Script Editor and click Add Tab. Figure 13: Add a new tab...
The scripting language used in JAR:Load is LUA, it is a lightweight scripting language useful for providing users an easy way to program the behaviour of virtual users. The advantages to using this type of scripting are: It is easy to use Flexible Comprehensive Example BBC Example Script (Correct as off July 2015) This script goes to BBC, searches for the top headline on the BBC News page, extracts the text from the link, prints the text and lastly clicks the top headline. Below is a breakdown of the code: 1. First we must create a New Browser, by default it will load Chrome 24.0 however in this tutorial we have added the User Agent String for Firefox 29.0. -- create a web page WebPage = HTTP:NewBrowser( Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0 ); 2. We then call LoadWebPage and enter in www.bbc.co.uk/news. -- load the page WebPage:LoadWebPage( http://www.bbc.co.uk/news/ ); 3. Next we call WaitForPageLoad so the Virtual User knows not to do anything until the page loads. This API call waits until all the network requests are completed. WebPage:WaitForPageLoad(); Figure 14 shows how your script should currently look: Figure 14: Current Script
QUICK START GUIDE 4. Once the Page Loads we must search for the Top Story on the Page. To do this we must find the ID of the element on the page, using either Chrome s Development tools or Firebug load up the BBC webpage in a New Tab. Find the top story TopstoryElement = WebPage:GetElementById( comp-pattern-library ); 5. We have found the top story, we must find the headline from the topstory. Find the headline HeadlineElement = TopstoryElement:FindFirstElement( h3 ); 6. Now that we have found the headline we must get the contents of this element in XML form so we can print it to the logs area. --Get the text from the title HeadlineValue = HeadlineElement:ToInnerXml(); 7. We Print the Headline using the API call Log:Print. --Print the top headline Log:Print( HeadlineValue ); 8. We now click the Headline as it is a link. --Click the TopHeadline Mouse:LeftClick(HeadlineElement); 9. A click has been made so we call WaitForPageLoad so the Virtual User knows not to do anything until the page loads. WebPage:WaitForPageLoad(); 10. A sleep call to tell the virtual user to wait for 5 seconds --sleep for the length of time since the last action Utility:Sleep(5);
Figure 14: Finished Script Once you have done this click on the Save Changes button to save the script. Before you move away from the Scripts panel you may want to test your script to make sure there are no errors. You can do this by using the toolbar shown in Figure 15. Figure 15: Script Toolbar You can: 1. Play and test the script 2. Settings to test the script once through (Single shot) or for a time between 5 minutes and 4 hours. 3. Save the script. 4. Revert any chances since the last save. 5. Undo the previous action. 6. Redo the previous action. 7. Go to a specific line 8. Re-indent the script. 9. Search the script for a specific string. 10. Search and replace one instance of a specific string. 11. Search and replace all instances of a string.
QUICK START GUIDE Data Sets A Dataset is a collection of data used by the virtual users. Usually datasets contain input data for the target service. Instead of all virtual users having the same input data statically written in the script, virtual users can request input data from the dataset. For example you may require a Virtual User to have a username and password to access a website or you may require them to do individual search. Each dataset is created in a CSV file and then uploaded to JAR:Load. You can set a default access on each data set, there are 3 different modes these are: Linear This access method means the virtual user will go through the dataset row by row. Unique This access mode will guarantees that each request to the dataset will return an unique row, if all rows have been used it will start from the beginning. Random This access mode will return a random row from the dataset. If you go to the Design > Data sets > Values tab you will see a default csv already uploaded to JAR:Load, Figure 16 shows the default values you will use for the YouTube Figure 16: Example of Data Set Values
Building a Load Profile After creating a VU Script you can now build up your load profile by specifying the amount of users you want and how you want the load applied by using the time line facility. To start building your Load Profile, navigate to Design > Load Profiles. Click on the New Load Profile button. This will create a load profile for you to customise, on the properties sub tab type in the name of the plan, give it a description, select 10 minutes for the duration, enter 10 for the maximum number of virtual users you want to use and then switch to Design > Load profiles > Load profiles. Figure 17 shows you what you are presented with: Figure 17: A Load Pattern graph The next step is to assign the Virtual User Script that you generated on the VU Scripts tab to this load profile, to do this under the heading VU selection on the left hand side of the tab click the button. Select the script that you have created and click Add script. Figure 18: Add VU Script to a test plan.
QUICK START GUIDE You will see a blank graph, this is where we will supply the load pattern by adding in how many virtual users we are going to use. If you move your mouse over the graph you will see that it shows you the time and the percentage of VU s at that point. You can add points to the graph by double clicking the left button on your mouse. The graph works using drag and drop or you can right click on a point and go to settings. Figure 19 shows a point s settings and figure 20 shows an example load pattern graph. Figure 19: Example of a Load Pattern Graph Figure 20: Example of a Load Pattern Graph
Launch a Load Profile Now that you have your Load Profile created you are able to run the load generation immediately or schedule it for a future time and date. In this guide we will be launching the test immediately. To start navigate to Schedule you are presented with a summary tab. On this tab you can view any running tests or view information on upcoming scheduled tests. Next navigate to the Schedule > Calendar > Launch Now subtab. On this tab you can select the load profile you want to launch as well as selecting the duration of the test. If you are a trial user the test can only run up to 10 minutes. Figure 20: Example of a Load Pattern Graph As you can see the information for the selected load profile is taken from what you set in the Design > Load Profile > Properties panel. Once you have confirmed the details click Launch now!
QUICK START GUIDE Run Monitoring and Results This is the area where you will get the most out of your load generation, from viewing graphs and reports to exporting data for your own use. To view your current or previous results from your test plans click on the Run Monitoring and Results tab. Figure 21 shows the test plan log's area, here you are able to view the current load profile and when it was started, how long it has ran for, the percentage of the test that is completed and you can choose to abort the test. As well as this you are able to select the drop down box and choose from the previous test that have been executed. Figure 21: Test Plan Logs Figure 22 shows the total metrics, this area is shown when a test is running, you are able to see how many virtual users are running, the total throughput that the virtual users are generating, the amount of requests the system is handling a second, the average response time of the requests, the total requests and if any of the requests failed. Figure 22: Total Metrics Regardless of whether a test has been completed or is still running you are able to view the results on the graphs such as the one below (Figure 23), in the example below we have three metrics displayed on the graph, you can have up to a maximum of 5 metrics on one graph. The metrics that are available are shown on the table in Figure 24.
Figure 23: Results Graph Metric Received bytes per second Transmitted bytes per second Requests per second Average response time (ms) Active virtual users Total requests Total bytes received Total bytes transmitted Transmitted transactions Received transactions Successful transactions Failed requests Script lines executed Explanation Shows the amount of bytes that have been received per second Shows the amount of bytes that have been transmitted per second Shows the amount of requests made per second Shows the average reponse time from the website Shows the amount of virtual users that are active Shows the total requests Shows the total amount of bytes received Shows the total amount of bytes transmitted Shows the amount of transactions transmitted. A transaction is a function where you would group a piece of code in Figure 4. An example would be grouping the login code together. Shows the amount of transactions received Shows the amount of the requests that were successful Shows the amount of the requests that failed Shows the amount of lines of script that were executed Figure 24: Metrics Available
QUICK START GUIDE JAR:Load stores the results for all tests executed so you are able to compare results on one or more graphs. Figure 25 shows the script that was created above ran 2 separate times, one in the afternoon and the other test ran in the morning. As well as comparing test on separate graphs, you are able to compare them on the one graph by clicking on the Executed Test Plan drop down box. Figure 25: Comparing 2 test plans Lastly we look at the Logs output, here you are able to view the log messages from your script. You are able to view logs per virtual user by selecting the virtual user from the drop down box as shown in Figure 26: Figure 26: Example of the Log output
JAR Technologies, BT3 Business Centre, 10 Dargan Crescent, Duncrue Road, Belfast, Co Antrim, BT3 9JP T: +44 (0)28 9023 3322 W: www.jartechnologies.com E: info@jartechnologies.com