Question
Morgan Stanley
IN
Last activity: 31 Jan 2021 23:35 EST
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.
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:
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.
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.