Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated Loadtest Users docs with findings

...

A mobile worker's "loadtest factor" is found under the "Action" tab of the "Edit Mobile Worker" page, as shown below.

When that user the mobile worker syncs, each case in the payload will have that many copies of it made and sent down to the phone. Copies should preserve parent/child relationships. . So if the loadtest factor is set to 20, and there are 5 cases to be synced, then a total of 100 cases will be sent to the mobile worker's device.

Cases to be synced

When a mobile worker syncs their device, not all their cases are in the payload sent to the device: HQ only sends the cases that are not already on the device, or that need to be updated.

So to send loadtest cases to the device, they need to be added on HQ. This can be done using App Preview or Web Apps, or by importing cases from Excel. (Similarly, to sync loadtest cases in App Preview or Web Apps, they need to be added on a mobile device or imported.)

  1. Register new cases as the mobile worker using App Preview or Web Apps, or import cases from Excel with the mobile worker set as the owner.
  2. Set the mobile worker's loadtest factor.
  3. Sync the mobile worker's device

WARNING: If the loadtest cases include case updates, syncing will fail with an error: "Server provided improperly formatted data, please try again or contact your supervisor" (Mobile) or "Could not sync user data. Please report an issue if this persists." (App Preview). This is because loadtest cases need to be new cases, not case updates. To resolve the error, set "loadtest factor" to 1 and sync the case updates.

About loadtest cases

Copies will be named with a number after the case name indicating what copy it is. However, copies are not actually For example, if the original case is named "My Case", then the first copy will be named "My Case (1)", the second copy "My Case (2)", etc.

Loadtest cases should preserve parent/child relationships. So if "Child Case" is the child case of "Parent Case", then "Child Case (1)" will be the child case of "Parent Case (1)", etc.

Copies are not created on CommCare HQ, so you they will not see them appear in reports or in exports.

Caveats about this feature

...

  • Form submissions against copies will not properly handle case processing. It is recommended you only test form submissions against the original cases and not the copies.
  • Copies are only sent down on initial sync. It is not recommended that you use the sync functionality while load testing, just use the app and submit data.
  • This This feature does not allow you to test sync performance at scale - ; it is just only for load testing the mobile application onlyapp.
  • Once the sync payload is generated, the user's loadtest factor is reset. This is a safeguard against performance issues.
  • The maximum total number of cases that will be synced is 50,000 (unless the user has more than 50,000 real cases). Beyond 50,000 cases, app load will be less important than other aspects of user experience. This is also a safeguard against performance issues.

...