Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Serial execution and timing execution of multiple scenarios in loadrunner

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Method 1:

Since scripts are executed serially, it is necessary to use multiple scripts in the scene design. Note that Schedule by in Scenario Schedule needs to be set to Group mode. Then according to the actual need to set the Schedule of each script in turn. To calculate the entire execution time of each script in advance, it is convenient to define the start time of subsequent scripts (set Start Group).

Method 2:

Use timed tasks to perform:

First create and set up the test scenarios to run, then create a batch program to call these scenarios in sequence for testing, and finally set the execution time of batch processing through Windows timed tasks.

Write a batch file

An example batch process is as follows:

cls

SET M_ROOT="D:\Program Files\MI\Mercury LoadRunner\bin\"

%M_ROOT%\wlrun.exe -TestPath "D:\Program Files\MI\Mercury LoadRunner\scenario\Test\TestScen_1.lrs" -Run

%M_ROOT%\wlrun.exe -TestPath "D:\Program Files\MI\Mercury LoadRunner\scenario\Test\TestScen_2.lrs" -Run

%M_ROOT%\wlrun.exe -TestPath "D:\Program Files\MI\Mercury LoadRunner\scenario\Test\TestScen_3.lrs" -Run

This method is flexible, but you need to pay attention to setting "Automatically create a results directory for each scenario execution" in Result Settings, so as not to overwrite the previous test results.

Additional:

If you want to do timed execution of scripts, you can actually do it in multiple scenarios.

1. Add Scenario A to test

2. Add a scenario B unrelated to the test. In this scenario, set your own thinking time. Try to design it to last until you want to run the script.

3. Set script serial execution, execute B first, how long after execution (this time long is defined by yourself, basically after the end of this time is to execute the scene A that you want to execute)

4. Of course, the most direct way is to use timed tasks to execute their own scenarios, so that there is no need to use multiple scenarios.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report