Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2020.1

...

Creating a Web Application Functional Test

In this load testing tutorial we are going to use a Parasoft-owned site named "Parabank," which is a mock banking web applicationthe ParaBank demo web application. Refer to Setting Up ParaBank for instructions on how to deploy a local instance of ParaBank

Before you begin this lesson, we recommend that you follow the "Web Functional Testing" section  section in the SOAtest tutorial to learn how to record browser test suites for use in Load Test.

...

  1. In SOAtest, choose File> New> Test (.tst) file.
  2. Enter ParaBank as in the File name , then click field and click Next.
  3. Select Web> Choose Web > Record web scenario, then  and click Next.Select
  4. Choose Record new web scenario, then  and click Next.
  5. Complete the Record from a starting location wizard page as follows and click Finish:
    1. Enter ParaBank Functional Test  in the Test Suite Name field.
    2. Enter http://parabank1localhost.parasoft.com/ in the Start Recording From field.
      Image RemovedImage Added
      Click the Finish button.
  6. The test will begin , and a browser window will open. Within the browser window that opens, perform Perform the following actions in the ParaBank application:
    1. Type john for Log into ParaBank with john as the username , type and demo for the password, then click
      Image AddedLog In.
      Image Removed
       
    2. Click  the the link for the first account link you see in the accounts listlisted.
      Image Removed
      Click the Sign Off link on the upper right side of the page.
      Image Removed
      Image Added

    3. Log out of the application and close the browser to Close the browser. This will conclude the recording session
      Image Added

Validating the Scenario for Load Testing

...

  1. Switch SOAtest to the Load Test perspective by choosing Window> Open Perspective> Other> Parasoft Load Test. This will open a Load Test Explorer on the left. This is similar to the Test Case Explorer, but double clicking on each browser test case will open a special editor designed for preparing the test case step for load testing. This editor displays the various request URLs that are made by the browser to load that Web page, and any parameterized values used in these requests.
  2. Select the root ParaBank Test Suite node and click the Validate for Load Testing button in the tool bar. For this example, the tests should succeed, indicating that the functional web scenario is ready for load testing.
    Image Modified

You can now configure and perform the load test as described in Creating and Performing a Load Test (for Web and/or Service Functional Tests).

...

  1. In SOAtest, choose  File> New> Other, select Project from Existing SOAtest or WebKing Test Suites, then click Next.

    Image Modified

  2. Enter Examples in the Project Name field.
  3. Under Directory, specify the location of the project’s test suites by clicking Browse then navigating to [SOAtest/Load_Test_installation_directory]/examples/tests.
  4. Click Finish. The Examples project will be added to the Test Case Explorer. It will contain multiple test (.tst files).

...

  1. Open Parasoft Load Test:
    • Windows: Choose Start> Programs> Parasoft> SOAtest> Load Test.
    • Linux/Mac: Change directories to the loadtest directory, then enter the following command at the prompt:
      ./loadtest 
  2. In the The Welcome Wizard , select launches. Choose New Project, then  and click Next.
  3. Select Choose SOAtest, then  and click Next.
  4. Do one of the following:
    • Services: Browse to the ParaBank Functional Test.tst file in your SOAtest workspace and click Next.
    • If you are using the SOAtestTutorial.tst file to complete this tutorial, browse to to SOAtestTutorial.tst and SOAtestTutorial.tst, then click Next. If you created this from "scratch", it will be in your workspace. Otherwise, open the sample file at  [Parasoft SOAtest/Load Test Install Dir]/examples/tests/SOAtestTutorial.tst.
    • Web:  Browse to ParaBank Functional Test.tst  (in your SOAtest workspace), then click Next.
    • If Load Test detected an existing configuration, choose New Configuration.
      Image Added
  5. Choose the test scenario in the tree and Select the following in the tree, then click Next:
    • Services: "Scenario: Scenario Test – Search, Place OrderAdd to Cart, and remove OrderRemove from Cart", "Test Suite: Plain XML Services".
      Image RemovedImage Added
      Web: Scenario: ParaBank Functional Test.
      Image RemovedImage Added
  6. Specify the following configuration In the Schedule & Distribution  panel, enter 2 Minutes for the Duration, select Linear Increase for the Distribution, and click Next  until you reach the Other Options  panel.
    Image Removed
    screen and click Next until you reach the Other Options screen:
    1. Specify 2 minutes in the Duration field
    2. Enable the Linear Increase option in the Distribution section. In
    In
    1. order to select the Linear Increase
     option
    1. option, you must have the appropriate Load Testing license. If you do not have Virtual Users enabled on your license, you will only be able to generate the Steady Load scenario.
      Image Added

  7. In the Other Options  panelscreen, enable Start Load Test immediately and Record individual hits, then  options and click Finish.
    Image Removed
    Image Added

 Load Test will begin the specified load test. A new Load Tests tab displays in the left GUI panel and the Graph  tab displays in the Load Test progress panel.
 Image Added
Image Removed
You can change the number and layout of graphs shown by right-clicking in the Graphs tab, then choosing one of the available layout options.
Image RemovedImage Added
The load test can be stopped at any time, but we will let it run the full 2 minutes while monitoring and manipulating the in-progress details of the test. 

...

After the load test is complete, a Test Information summary is displayed in the Results panel which includes the name of the project, when the load test was started and finished, the scenario you chose, as well as any machines and profiles. Image Removed 

Image Added

 You You can also choose to view different statistical reports of the load test as well. To view detailed statistics of the load test, complete the following:

  1. Select Statistics from the Views menu in the Results panel.
    Image Removed
    Image Added

    When viewing the Statistics report, an Output Types menu is available. The Output Types menu determines what type of output report is displayed. Two types of reports are available from this menu, each of which displays different columns of information. The differences between report types are:
    • Generic Reports: Contains Test Suite name, Test Index, Test Name, Min/Max/Avg Time (ms), Run Count, and Failure Count.
    • Network Client Report: Contains all of the information in Generic Reports plus Min/Max/Avg Ping (ms), Min/Max/Avg Request Size (bytes), Min/Max/Avg Response Size (bytes) Min/Max/Avg Total Size (bytes).
  2. To access details about a specific test failure, double-click the related report row. You can determine whether a given test failed by locating the row that represents that test, then check-ing the number in that row’s Failure Count column.

...

  1. Double-click the Profiles folder in the Load Tests tab and select one of the available test suite nodes. The configuration panel displays on the right.
  2. At the bottom of the panel, change the delay Value to 3 seconds. This may simulate how a user hesitates before making a decision about ordering a book.
  3. Select Linear Increase beneath the Scenarios node. The Linear Increase scenario controls display in the Results panel and the User graph displays the localhost curve.
  4. Drag and drop the endpoint of the localhost curve to the coordinates of 10 users at 2 minutes.
  5. From the Vertical scale drop-down menu, select 20.
  6. Click the More Points button. A point will appear at the center of the localhost line.
  7. Click and drag the new point to the coordinates of 10 users at 1 minute.
    Image RemovedImage Added

  8.  Expand the Linear Increase node and select the QoS node beneath it. Summary and Details tabs display.
  9. Select the Details tab and click the New button .
    The to open the Add Metric wizard displays.
    Image RemovedImage Removed
  10. Select Statistic Metric and click Finish.
    Image Added
  11. In the metric configuration panel that opens, enter Execution Time Requirement in the Name field.
  12. For the Statistic drop-down menus in the right GUI, select Avg. Exe. Time (ms) and the less than symbol (<), and then enter 200 in the text field.
    Image Removed
    This  This will cause the load test result to "fail" if the execution time is measured above 200 milliseconds. For more information on configuring QoS metrics, see Customizing QoS Metrics for Scenarios.
    Image Added
  13. Select the Linear Increase node beneath the Scenarios branch and click the Load Test toolbar button. Load Test will begin the customized load test and the Graph tab displays in the right GUI panel.
  14. Wait (2 minutes) for the load test to complete. While the load test is running, you can view various parameters within the Graph tab by selecting the appropriate checkboxes.

...

  1. Save this load test project by clicking the Save Project toolbar button.
    Image Removed 
     Image Added  
  2. In the dialog box that opens, enter a name for the project in the File name field and click the Save button. Load Test saves the project and adds a .lt extension to the file name.