Question

Mobile performance test_Pega 7.2.2 version

We are trying to simulate the Hybrid Mobile app performance test as per below article.

https://community.pega.com/knowledgebase/articles/pega-mobile/load-testing-offline-enabled-mobile-apps

Steps followed from our side:

1. We are using Hp load runner to generate the scripts.

2. Calling the REST service

https://<HOSTNAME>/prweb/PRRestService/offlinehttp/DataSync/pzSynchronizationService

3. We have used fiddler to capture the pay load traffic and sending the payload package as part of request body.

Error we are getting: Authorization error

Attached the document for OfflineHttp service package configuration.

Question: We have captured payload package in Stage environment and tried to use that in different environment- (Training).

1. So would that cause authorization issue?

2. is there any way that we can generate the authorization in script and use that in payload package request header?

3. is this authorization code expires after certain period of time?

Example authorization.

Authorization: Basic U1NNT1NUQUdFOjQxZTM1OWY1LTc0N2ItNDRlZS1iMjBiLWRiYjZhNjBlMmI3Zg==

Note: Pega version is 7.2.2 and HC client version is 7.41.3.1

Correct Answer
October 25, 2019 - 2:17am

When you decode the above base64 encoded Authorization header value you'll find <operator>:<password> inside. If the same pair of credentials work on both Training and Staging you should be able to get a response from offlinehttp service package. 

Yes you can generate credentials in your script. Just them with colon, encode, prefix with 'Basic ' and set as Authorization header value in your request. 

Comments

Keep up to date on this post and subscribe to comments

October 25, 2019 - 2:17am

When you decode the above base64 encoded Authorization header value you'll find <operator>:<password> inside. If the same pair of credentials work on both Training and Staging you should be able to get a response from offlinehttp service package. 

Yes you can generate credentials in your script. Just them with colon, encode, prefix with 'Basic ' and set as Authorization header value in your request. 

October 28, 2019 - 9:16pm
Response to Mateusz Pedzierski

Thank you Mateusz. Now we are able to get the successful response. 

Quick questions:

1. As per article, we are planning on generating different installation ID for each payload with /pzSynchronization request. But we don't see any work ID's (py ID's or LEAN enrollment confirmation numbers) are coming to our Database. Is that expected?

2. Do we need to generate the separate pyEvent ID or pyID for each request?

Please suggest.

October 29, 2019 - 8:28am
Response to SrikanthD8066

The "actions" section of your payload defines the actions that would be performed on the server as the result of the request. I can see you included "createNewWork" action in your payload, so new work should be created for each request. Please try to make the requests unique to the extent that your case creation logic expects it, and new work should be actually created in the database.

November 5, 2019 - 2:41pm
Response to RadoslawNowak

Thank you, I can see new work objects in database when we simulate the payload. But we encountering below issue with this simulation. Could you please help us how can we resolve this issue?

This particular data page was designed when we build the Mobile offline application with Pega Mobile product team. Appreciate your help in advance!

*Code-Pega-List*D_FetchWorkData*UHG-MedRet-Enroll-FS-Work-EMSEnrollment*NA*Page-Copy;RULE-OBJ-ACTIVITY CODE-PEGA-LIST LOADWORKDATA #20191016T093535.202 GMT Step: 5 Circum: 0;doActivity Rule-Obj-Activity:LoadWorkData;java;RULE-OBJ-ACTIVITY @BASECLASS PZDATASYNCGETWORKLIST #20160726T083745.131 GMT Step: 3 Circum: 0;20 additional frames in stack;*OperatorId=A2196960;pyRuleSet=UHGMedRetEnFS;pyClassName=UHG-MedRet-Enroll-FS-Work;pyDefinitionKey=RULE-DECLARE-PAGES D_FETCHWORKDATA #20190707T065045.508 GMT;pyPageStructure=list;pyPageName=D_FetchWorkData;pyForEachCount=1;*Light weight list  has been copied in rule 'CODE-PEGA-LIST LOADWORKDATA #20191016T093535.202 GMT Step: 5 Circum: 0' 341 times. Property Reference : WorkList.pxResults(1)<CR> Stack Trace: java.lang.Exception<CR> at com.pega.pegarules.data.internal.clipboard.VirtualClipboardPageImpl.considerVLCopyAlert(VirtualClipboardPageImpl.java:2174)<CR> at com.pega.pegarules.data.internal.clipboard.VirtualClipboardPageImpl.considerVLCopyAlert(VirtualClipboardPageImpl.java:2081)<CR> at com.pega.pegarules.data.internal.clipboard.VirtualClipboardPageImplWrapper.considerVLCopyAlert(VirtualClipboardPageImplWrapper.java:317)<CR> at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.putAll(ClipboardPageImpl.java:3296)<CR> at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.putAll(ClipboardPageImpl.java:2944)<CR> at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.putAllAndReconcileRefProps(ClipboardPageImpl.java:2912)<CR> at com.pega.pegarules.data.internal.clipboard.ClipboardPageBase.putAll(ClipboardPageBase.java:1193)<CR> at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.putAll(ClipboardPageImpl.java:484)<CR> at com.pegarules.generated.activity.ra_action_loadworkdata_6683e22776f0e1a12e601f63448100c3.step5_circum0(ra_action_loadworkdata_6683e22776f0e1a12e601f63448100c3.java:738)<CR> at com.pegarules.generated.activity.ra_action_loadworkdata_6683e22776f0e1a12e601f63448100c3.perform(ra_action_loadworkdata_6683e22776f0e1a12e601f63448100c3.java:153)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDirectoryImpl.runRule(DeclarativePageDirectoryImpl.java:1053)<CR> at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDirectoryImpl.runLoadActivity(DeclarativePageDirectoryImpl.java:446)<CR> at com.pega.pegarules.session.internal.mgmt.base.handler.ReadOnlyDataPageHandler.loadDataPage(ReadOnlyDataPageHandler.java:241)<CR> at com.pega.pegarules.session.internal.mgmt.base.handler.ReadOnlyDataPageHandler.findDataPage(ReadOnlyDataPageHandler.java:405)<CR> at com.pega.pegarules.session.internal.mgmt.base.AbstractPageDirectory.findDataPageInCurrentDir(AbstractPageDirectory.java:939)<CR> at com.pega.pegarules.session.internal.mgmt.base.AbstractPageDirectory.getDirectPage(AbstractPageDirectory.java:723)<CR> at com.pega.pegarules.session.internal.mgmt.base.ThreadPageDir.getDirectPage(ThreadPageDir.java:471)<CR> at com.pega.pegarules.session.internal.mgmt.base.ThreadPageDir.getPage(ThreadPageDir.java:429)<CR> at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.getPage(PRThreadImpl.java:543)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.findPage(Executable.java:2124)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.findPage(Executable.java:2077)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.findPage(Executable.java:2059)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncgetworklist_5ed99ef003634e230d4def17b1f4845e.step3_circum0(ra_action_pzdatasyncgetworklist_5ed99ef003634e230d4def17b1f4845e.java:405)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncgetworklist_5ed99ef003634e230d4def17b1f4845e.perform(ra_action_pzdatasyncgetworklist_5ed99ef003634e230d4def17b1f4845e.java:90)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10711)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncpackager_d303beb5b47f69e222a7d98a79a28bb1.step20_circum0(ra_action_pzdatasyncpackager_d303beb5b47f69e222a7d98a79a28bb1.java:1978)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncpackager_d303beb5b47f69e222a7d98a79a28bb1.perform(ra_action_pzdatasyncpackager_d303beb5b47f69e222a7d98a79a28bb1.java:446)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10711)<CR> at com.pegarules.generated.activity.ra_action_pzrequestsynchronization_26c3fad5ce02b70355976d466df05c25.step4_circum0(ra_action_pzrequestsynchronization_26c3fad5ce02b70355976d466df05c25.java:314)<CR> at com.pegarules.generated.activity.ra_action_pzrequestsynchronization_26c3fad5ce02b70355976d466df05c25.perform(ra_action_pzrequestsynchronization_26c3fad5ce02b70355976d466df05c25.java:110)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10711)<CR> at com.pegarules.generated.activity.ra_action_pzstartsynchronization_e7f50ab567d3e43a65896bf9c9e9a74f.step7_circum0(ra_action_pzstartsynchronization_e7f50ab567d3e43a65896bf9c9e9a74f.java:542)<CR> at com.pegarules.generated.activity.ra_action_pzstartsynchronization_e7f50ab567d3e43a65896bf9c9e9a74f.perform(ra_action_pzstartsynchronization_e7f50ab567d3e43a65896bf9c9e9a74f.java:191)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pegarules.generated.activity.ra_action_pzpackagingexceptioncatcher_99126f674af035c1d9054ee7f27c89f8.step1_circum0(ra_action_pzpackagingexceptioncatcher_99126f674af035c1d9054ee7f27c89f8.java:254)<CR> at com.pegarules.generated.activity.ra_action_pzpackagingexceptioncatcher_99126f674af035c1d9054ee7f27c89f8.perform(ra_action_pzpackagingexceptioncatcher_99126f674af035c1d9054ee7f27c89f8.java:71)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10711)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncinitializer_95650b8a063c0a798d3be6d52ae4806f.step6_circum0(ra_action_pzdatasyncinitializer_95650b8a063c0a798d3be6d52ae4806f.java:579)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncinitializer_95650b8a063c0a798d3be6d52ae4806f.perform(ra_action_pzdatasyncinitializer_95650b8a063c0a798d3be6d52ae4806f.java:163)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncrequestparser_8985b5887a8f38f7469802b42be8cfae.step8_circum0(ra_action_pzdatasyncrequestparser_8985b5887a8f38f7469802b42be8cfae.java:713)<CR> at com.pegarules.generated.activity.ra_action_pzdatasyncrequestparser_8985b5887a8f38f7469802b42be8cfae.perform(ra_action_pzdatasyncrequestparser_8985b5887a8f38f7469802b42be8cfae.java:193)<CR> at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)<CR> at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)<CR> at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:465)<CR> at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.runActivities(ServiceAPI.java:1919)<CR> at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:391)<CR> at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)<CR> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)<CR> at java.lang.reflect.Method.invoke(Method.java:620)<CR> at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1302)<CR> at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1039)<CR> at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:894)<CR> at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAP

November 6, 2019 - 3:55am
Response to SrikanthD8066

The stack trace is truncated and as such does not tell much. Could you try to attach the complete one? As well as attach the payload you send to the server. Thanks.

November 6, 2019 - 2:45pm
Response to RadoslawNowak

Hi,

As requested full stack trace has been attached and payload request attached in previous document(Json request). Please let me know if any additional information is required.

Thank you in advance!

November 7, 2019 - 6:19am
Response to SrikanthD8066

And is the same working properly when you use the application manually? (not using the simulation) Aren't you getting the worklist-related exceptions then?

November 7, 2019 - 8:26am
Response to RadoslawNowak

Yes, this data page is working fine when the application using manually in devices. SR-D59155 has been raised for the same.

November 7, 2019 - 9:42am
Response to SrikanthD8066

Thanks. I think that is the only way we can further assist you.

November 6, 2019 - 4:58pm

Attached the payload package document once again here!