Question

4
Replies
66
Views
Close popover
Adithya Kurmachalam (AdithyaK9774)
Morgan Stanley

Morgan Stanley
IN
AdithyaK9774 Member since 2020 3 posts
Morgan Stanley
Posted: 4 weeks ago
Last activity: 2 days 19 hours ago

Scenario test REST service not working in STANDALONE mode

Usecase:

Execute a scenario test suite using OOTB REST service(/api/v1/testautomation/scenario and /api/v1/scenariotests/execute) and consume the response. We want to use it in test automation scripts.

 

Issue:

Tried running the above mentioned rest service(POST method by giving all the necessary parameters) rule by giving the scenario test suite pxInsName and expecting a response with pass fail information. But, Response body is empty and response code is http 200. Sample request below.

request data

 

Analysis:

REST service is calling actvity pzExecuteScenarioTests which takes the above parameters and tries to get a ScenarioTestRunner and runs it. This code is neither giving exception nor executing the tests.

fetchedRunner is coming as false and 

  ((com.pega.pegarules.priv.testautomation.IScenarioTestRunner)runner).runAll(); is not getting executed.

tried removing the if(fetechedRunner==true) check as well, still did not work.

 

Code snippet:

runner = ((PegaAPI)tools).getScenarioTestRunner(); fetchedRunner = ((com.pega.pegarules.priv.testautomation.IScenarioTestRunner)runner).init(Provider, JobID, ProviderURL, ProviderAuthName, ProviderAuthKey, Browser, BrowserVersion, Platform, PlatformVersion, ScreenResolution, TestSuiteID, SUTURL, SUTUserID, SUTPassword);

if(fetchedRunner == true) {   ((com.pega.pegarules.priv.testautomation.IScenarioTestRunner)runner).runAll(); }

 

Please help in resolving the issue.

***Edited by Moderator: Pooja Gadige to change content format from Discussion to Question***
Pega Platform 8.5.1 DevOps Testing Applications