代码之家  ›  专栏  ›  技术社区  ›  Bishal Thingom

如何以编程方式运行Loadrunner场景?

  •  1
  • Bishal Thingom  · 技术社区  · 8 年前

    当前运行我使用的场景的方法是通过ALM UI。

    有没有办法通过编程实现这一点?这就是能够登录到一个项目并在给定路径的情况下运行场景。

    我找到了一些关于使用命令行参数的资源,但我不确定它们是否相关。场景的控制器位于远程系统上。

    我希望能够登录到项目并运行场景(控制器在场景中预先分配)。

    编辑: http://www.consulting-bolte.de/index.php/hp-alm-rest-api/114-connect-to-hp-alm-via-browser-using-rest-api 在这里找到了一个开始的好地方。

    编辑2:未能在Loadrunner REST API文档中找到有关运行场景的信息。

    1 回复  |  直到 8 年前
        1
  •  2
  •   Bishal Thingom    8 年前

    在此处找到答案: http://admhelp.microfocus.com/alm/en/12.50/api_refs/Performance_Center_REST_API/Performance_Center_REST_API.htm#authenticate.htm%3FTocPath%3DResources%7C_____1

    http://<PcServer>/LoadTest/rest/domains/alex-qc/projects/PCdemo/Runs
    Content-Type: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};
    
    <Run xmlns="http://www.hp.com/PC/REST/API">
     <PostRunAction>Collate And Analyze</PostRunAction>
     <TestID>5</TestID>
     <TestInstanceID>4</TestInstanceID>
     <TimeslotDuration>
     <Hours>1</Hours>
     <Minutes>30</Minutes>
     </TimeslotDuration>
     <VudsMode>false</VudsMode>
    </Run>