This tutorial will take the deployed Sales Demo application as an example to walk through the test script recording and parameterizing/correlating.
You can follow Quick Start > Guide 1 to deploy the Sales Demo application.
Note that you must use the actual IP address (instead of "localhost") for the Web API URL. (Reason is in the section called “Recording scripts automatically (using Recorder)” and the section called “Recording scripts manually (using Fiddler + JMeter)”, you will use the JMeter proxy server or Fiddler (or any other web debugging proxy tool) both of which will bypass "localhost".)
The main dynamic values in the recorded script for installable cloud apps are “sessionid” and “transactionid”. Both values are dynamic and can only stay valid for a short time, therefore, it is necessary to capture them and save them into variables in the script.
Specially, about “sessionid”: Because all the requests and responses between the client application and PowerServer are tracked by “sessionid”, “sessionid” is encrypted in every request/response for security reasons in the production environment, which makes it difficult to correlate the value in the script. To work around the problem, the PowerServer Web APIs has two modes:
-
“0”- normal mode
-
“1”- test mode
Under the test mode, the “sessionid” included in the requests and responses is in plain text. The security is compromised but it shall be sufficient for the test environment.
Step 1: Open the file AppConfig | applications.json in the ServerAPIs project of the PowerServer solution.
Step 2: Change the “RunMode” attribute value from “0” to “1”.
Step 3: Run PowerServer Web APIs.
Step 4: Run the installable cloud app.
With the “RunMode” set to 1 (test mode), the app will prompt the following warning, and all window titles in the installable cloud app will show “Test Mode”.
Keep PowerServer Web APIs running, and close the installable cloud app after you verify that the installable cloud app runs successfully; and then proceed to the next step to record the test scripts.
Note
You must run PowerServer Web APIs before you start JMeter recorder (HTTP(S) Test Script Recorder) or Fiddler (or any other Web debugging proxy tool). Otherwise, the PowerServer Web APIs will fail to start.
Reason is JMeter recorder and Fiddler (as well as any other Web debugging proxy tool) work by adding itself as a proxy instead of using your current proxy settings; therefore if the PowerServer Web APIs connects with the NuGet site and Appeon site through a proxy server, it may fail to start.