UFT Developer: Shift-left performance testing with LoadRunner Developer

Micro Focus Expert
Micro Focus Expert
1 0 737

The first mention of shift-left testing was around 2001 by Larry Smithand. Now, in 2020 , shift-left testing has become a reality. Nearly every customer I speak with either has been through the process of shift-left testing or soon will be. But is it worth the time and effort to exchange well-known processes for shift-left testing? The answer is yes, and the value of shift-left testing has a lot to do with the recent market-demand of rapid release cycles. The need for updating a product on a monthly or even weekly basis, literally dictates a “test-early and often” approach. 

The most common reaction, when it comes to testing early, is to think of unit tests that are performed by developers. Which is certainly true, but to ensure the full quality of a product, you need to also add service-based, UI-based, and even performance-based tests to the mix. UFT Developer, the testing solution that has been specifically created to support the shift-left testing journey with service and UI tests, is now taking shift-left testing to the next level.

LoadRunner Developer and UFT Developer better together

LoadRunner Developer is the latest cutting-edge tool from Micro Focus for web protocol performance and load testing, and can now be easily integrated with UFT Developer, providing an incomparable experience for developers who value a holistic testing approach. Easily put the application under stress and record this impact on the UI, all within UFT Developer. Test how the application will respond and determine if the user could face a delay. Most importantly, see how performance progresses over time and with each code change.

Based on a study conducted for Micro Focus by The Harris Poll, “defects (regardless of type) incur a greater cost the closer they are found to production and the activities involved in a defect’s lifecycle become more costly as the defect moves from detection, through fixing, and out into production.” This makes the combination of UI and performance testing an essential part of a cost-effective and successful software project.

Now let’s see how easy it is in UFT Developer to combine existing functional tests with performance tests and gauge the impact on the application.

 

Prerequisites – Steps to reproduce

  1. Install UFT Developer into Eclipse.
  2. Download and install LoadRunner Developer (tutorial: https://youtu.be/IzxyTZlu0T0).
  3. Integrate LoadRunner Developer with UFT Developer (via the “External Tool Configuration”).
    1. Capture har-file.
      LRd_CaptureHAR.png

      Arguments to copy (can be changed according to your needs):
      ${project_loc}\LRDev\aos.har

    2. Create DevWeb-script.
      LRd_GenerateScript.png

      Arguments to copy (can be changed according to your needs):
      -mode=har -level=pages ${selected_resource_loc} ${project_loc}\LRDev\aos

    3. Run DevWeb-script.
       

      LRd_RunScript.pngArguments to copy (can be changed according to your needs):
      -mode=load ${workspace_loc:/AOS/LRDev/aos}

  1. Create a UFT Developer project
  2. Add test-scripts:
    1. SingleUITest.java
    2. LongRunningUITest.java

Optional configure InfluxDB and Grafana

  1. Download and install InfluxDB.
  2. Download and install Grafana.
  3. Create a local.config.yml file in the DevWeb installation-folder:
     

    LRd_InfluxDBConfig.png

  4. Download and install the LoadRunner Developer Grafana Dashboard.
  5. Start and run our influxDB.
  6. Configure the InfluxDB in Grafana.
    1. Click Add data source in the Grafana homescreen.
    2. Select influxDB.
    3. Specify the URL (http://localhost:8086) and the Database (devWebDB).
    4. Hit Save & Test and you are good to go.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.