Using a Branch Versioning Editing Load Test with Apache JMeter (Advanced)

12-23-2023 01:03 AM
Esri Contributor
2 0 928

Branch Versioning

Branch versioning is a type of versioning for an enterprise geodatabase that aligns with the ArcGIS Enterprise Web GIS model. It uses a service-oriented design to support multiuser editing workflows and long transaction scenarios through web feature layers. 

When datasets are registered as branch versioned in the geodatabase, there is an option to enable the Version Management cap
ability as the resource is being shared/published. This creates a version management endpoint that can perform the creation of new named versions as well as the administration of existing ones. Web users can query and edit data of their own named version through the web feature layer or reconcile and post the changes into the default parent version for other members to utilize.

In short, branch versioning is built for the modern web and uses a simplified data model that is optimized for today's clients like ArcGIS Pro.

For more information see: 

Why Test Branch Versioning?

Since branch versioning is the data model for multi-user editing over the web with ArcGIS Enterprise and is a major components for frameworks such as utility network and parcel fabric, the understanding of its performance profile can greatly benefit GIS administrators.

Branch Versioning Editing Testing Challenges

While the exercising of branch versioning queries from JMeter is not too difficult, things become more complex when editing is involved: For example:

  • When a new named version is created, it needs be referenced in the test by the associated GUID in some places and by the name in others
  • Any time a "write" operation like takes place against the data like creating a new named version, applying edits, reconciling or posting, a new historicalMoment is generated
    • Any web feature layer queries that take place after a write operation will want to use the updated historicalMoment to retrieve the most up-to-date information from the version management system
  • Prior to adding new data, the test needs to ask the system to reserve objectIDs and use the returned numeric value as the starting point
  • In addition to objectIDs, items being inserted or updated also have globalIDs to keep track of
  • To properly perform write operations, an editing lock needs to be acquired that utilizes a unique sessionID

With editing through a load test, it is easy to see the additional moving parts that the Test Plan needs to keep track of. Of course, when this happens in ArcGIS Pro, this complexity is handled automatically for the user.

Note: The historic moment is one of the strengths of branch versioning as it allows a user a mechanism for viewing data for a particular date and time. Lock acquisition is another key feature of branch versioning which allows the system to have multiple readers for each named version or just one exclusive editor.

How to Test Branch Versioning Editing?

The branch versioning editing workflow was conducted in ArcGIS Pro 3.2 Final (and ArcGIS Enterprise 11.2). While the operations were executed in ArcGIS Pro, the HTTP traffic (between ArcGIS Pro and ArcGIS Enterprise) was captured and later converted from a HAR file to a JMX file (JMeter Test Plan).

At a high level, the workflow operations in this Article contained the following steps which represent a user's (branch versioning) editing session in ArcGIS Pro:

  • Portal Member Authentication
  • Open the Project
  • Create a new named version
    • Switch to the named version
  • Zoom in to an area of interest
  • Insert a new point
    • Update attributes of the new point
  • Insert a new polygon
    • Update attributes of the new point
  • Save Edits
  • Reconcile with Default
    • Post the changes back to Default
  • Zoom out (back to the initial map scale)

The general steps in this Article should work with any service data that is registered as branch versioned. Though the test workflow makes specific use of a point layer and a polygon layer that existed in the utilized dataset. The dataset tested was the free and publicly available Natural Earth.

  • View of the Natural Earth service from ArcGIS Pro:
    • Southern California, USA


The Natural Earth Dataset

The Natural Earth datasets provides some decent map detail (at smaller scales) covering the whole world.


The ArcGIS Pro Feature Cache

ArcGIS Pro uses a feature cache to improve the display performance when navigating to areas of interest that have already been visited on the map. If any editing takes place this cache is refreshed.

Feature caching is an all-around good performance strategy. However, when capturing the HTTP traffic for this workflow, the feature cache was turned off.


The Editing Workflow via ArcGIS Pro

This section lists the editing workflow steps from an ArcGIS Pro visualization point of view.

  • Open the Project
    • The resources of the project are based on the web feature layers from the published service
  • Create a new, public named version and switch to it
    • When manually conducting the editing workflow, the value of "edits_20231211_2" was used but within the JMeter test, this value will be dynamic generated and unique to better allow for more automated execution

After opening the project, ArcGIS Pro will issue multiple queries to the various layers listed in the table. When a new version is created and ArcGIS Pro switches to it, similar looking layers queries will be sent again but these are actually for the new version.


Note: Although the editing workflow starts with "Portal Member Authentication", the logic for this operation was manually adjusted in the Test Plan to remove some additional requests and reduce complexity

  • Zoom in to an area of interest (where the inserts will take place)
    • In this example, the area of interest is Southwest of Palm Springs, California, USA


  • Insert a new point
    • From ArcGIS Pro, select the Edit tab from the top menu; click on Create (under the Features section); then from the list of Create Features Templates select "ne_10m_populated_places"


  • Then, click on an area in the map to insert the point


Note: After clicking in the map, the point was actually inserted into the geodatabase. However, since the Save operation has not been executed, the "Branch Moment" for the named version has not yet been updated. Once save has taken place, the edits become "official".

The next step involved changing attributes of the newly inserted point as it was an opportunity to later show a feature update within the JMeter Test Plan. Alternatively, you could have just used the Feature Template to pre-populate the attribute fields and then perform the insert.

  • Update attributes of the new point
    • With the newly added point still selected, click Attributes (under Selection), then populate several of the fields.


  • Attributes to update
    • SCALERANK, NATSCALE and LABELRANK rank was given arbitrary numeric values
    • The NAME field was specifically set to "Otisburg"


  • To commit the changes, click Apply


  • Insert a new polygon
    • From ArcGIS Pro, select the Edit tab from the top menu; click on Create (under the Features section); then from the list of Create Features Templates select "ne_10m_urban_areas"
    • Then click on an area of the map and draw a polygon around the "Otisburg point"


  • Update attributes of the new polygon
    • With the newly added polygon still selected, click Attributes (under Selection), then populate several of the fields.
      • scalerank was given an arbitrary numeric value
      • The featurecla field was specifically set to "It's a little bitty place"


Note: When adding the point and polygon, several feature queries were being issued as the cursor moved around the map. These queries are the result of the Snapping engine. With snapping enabled (the default option) the additional requests are expected behavior. The captured workflow used in this Article left this option enabled.

The functionality can be turned off from the Snapping management if the additional requests are not desired in the captured traffic.


  • Save Edits
    • With the branch versioning edits complete, the changes were internally finalized by the system once Save was clicked


  • Reconcile with Default
    • Reconciling with default is the process of resolving conflicts that result from merging parent version data (e.g., from default) into the edit session 
      • The captured workflow used the Reconcile defaults (as captured by ArcGIS Pro):

        • Detect conflicts by attribute (instead of object)

        • Abort if conflicts were detected was false

        • Issue a Post (after the reconcile) automatically was false

        • Run the job asynchronously was false

    • Since this editing workflow is relatively simple, there should be no existing attributes that conflict the edits that were performed


  • Post the changes back to Default
    • Post is the process of merging the edit session data into the default version
    • The inserts will now become part of default and any new named versions that are created after
    • The captured workflow used the Post defaults (as captured by ArcGIS Pro):

      • Run the job asynchronously was false

Note: If the captured traffic is executed in the Test Plan multiple times (e.g., a load test), the "same" items will appear multiple times in default (as expected). From a visual perspective, it might be difficult to "see" these new objects spatially in the default version as they would all be using the same geometry. However, the labeling of the point and polygon layers might give hints that multiple occurrences exist for items using the same geometry.


Note: A few words about an asynchronous reconcile or post; with ArcGIS Pro 3.2, the default execution from the ribbon menu is to utilize synchronous execution. If asynchronous for an operation is used instead, it follows a different HTTP request pattern (since it become a submitted job whose status must be periodically polled). Additionally, the action utilizes a separate ArcGIS Server service (e.g., the System GP services like: SyncTools, UtilityNetworkTools, or VersionManagementTools) to carry out the appropriate asynchronous task.

  • Zoom out (back to the initial map scale)
    • Finally, the session ends by navigating back to the original map scale of 1:1,000,000 to help provide a visual point of reference of the edits that were performed


The Branch Versioning Editing JMeter Test Plan

  • To download the Apache JMeter Test Plan used in this Article see: 
  • Opening the Test Plan in Apache JMeter should look similar to the following:


The tests steps closely follow the workflow performed in ArcGIS Pro:

  • Portal Member Authentication
  • Open the Project
  • Create a new named version
    • Switch to the named version
  • Zoom in to an area of interest
  • Insert a new point
    • Update attributes of the new point
  • Insert a new polygon
    • Update attributes of the new point
  • Save Edits
  • Reconcile with Default
    • Post the changes back to Default
  • Zoom out (back to the initial map scale)

Components of the Test Plan

In order to help keep this branching versioning editing Test Plan as simple as possible, only a few options exist under User Defined Variables that need to be configured. A single HTTP Header Manager element is utilized and just one Response Assertion exists to throw messages if the word "error" occurs in any response.

CSV Data Set Config

The test does make use of a CSV Data Set Config elements in JMeter to order to authenticated and utilize a different Portal member when executed under load. This item is location inside the Thread Group.

Note: As administrators, testers and analysists, the JMeter Test Plan could be as complex as needed to fit your needs. It is not uncommon to having an editing test have the actual changes (e.g., geometries inserts or attributes updates) use a CSV file to make the effort more dynamic and realistic. However, one of the goals of this Article is help show how the editing can be done by keeping the complexity of the test down to a minimum.

(User Test Thread) Initialization Transaction

Once the user or more accurately, the test thread, starts but before authentication takes place, we want JMeter to generate values for a few items and assign them to variables:

  • sessionID
    • Used for acquiring locks and for write operations
    • Unique for each user's ArcGIS Pro session
  • gdbVersion
    • geodatabase Version name identifier
      • Used to help create the named version's "official name"
        • Once created, ArcGIS Enterprise will also generate a GUID associated to the new named version
    • A unique name for each named version
  • A GUID for our point to be added
    • Unique for every added point
    • Unique for each users ArcGIS Pro session
  • A GUID for our polygon to be added
    • Unique for every added polygon 
    • Unique for each users ArcGIS Pro session

These are defined through a User Parameters element.


Open ArcGIS Pro Project Transaction

When expanded, the Open ArcGIS Pro Project transaction will list the requests issued when the aprx file was launched. There are typically many requests for such an operation as ArcGIS Pro gathers meta-data on the service and layers.

In the middle of this operation are a few requests calling a special GUID resource. These are calls to the default version in the geodatabase. Typically, "BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1" is the GUID associated with Default. There is also startReading request to obtain a read lock that utilizes the sessionID generated earlier in the test.


Create Version and Switch Version Transaction

The Create Version operation does a lot of important work in the Test Plan. It ensures that the edits will have a place to go (the named version) until they are intentionally merged with Default. Upon creating the new version, the versionGUID, versionName and branch versioning moment are returned which need to be captured and stored into additional test variables since they will all be used in subsequent requests.

The versionName is the official vanity designation of the named version. While the test generated a value for "gdbVersion", the system adds some addition information to its final form.

For example:

  • gdbVersion value (generated by JMeter): version_O5AHEMD89CYTH7GW
  • versionName value (returned by ArcGIS Enterprise): USER007.version_O5AHEMD89CYTH7GW

Note: Create (version) is available through the service's VersionManagementServer capability.


Remember, when creating the new named version, ArcGIS Pro was instructed to switch to it. Immediately following create, there were requests issued against the new version using its GUID and well as several queries. These queries had specific key/value parameters that depended on the new branch versioning moment and name of the new version that was returned (from the response of create).


Add Point Spatially Transaction

Like the create operation, Add Point Spatially contains several critical pieces. This particular action is the first to "start" the edit session for the long transaction by sending a startEditing request which acquires a write lock against the named version.

Since an insert is taking place, an objectID for the point is also required. The reserveObjectIDs call asks the system to return an objectID starting point for that particular layer. The test requested 100 IDs and the system responded with a firstObjectID to start with (which is captured to a JMeter variable) followed by an another number. The second number is the continuous, reserved range of IDs (the firstObjectID is the first item in this range).

Note: While the GlobalID GUIDs can be generated by the Test Plan, ObjectIDs cannot. ObjectIDs must be allocated by the web feature layer.




Note: A reserveObjectIDs request asking for 100 allocated ObjectIDs does not guarantee that 100 continuously IDs were reserved. The system will respond with the range available from that initial request. Additional reserveObjectIDs calls might be needed to obtain the necessary amount of IDs if the tested workflow is planning to perform multiple inserts that exceed the allocation. For such a situation, the test plan would need to handle the objectID logic itself. ArcGIS Pro does this automatically for the editing user.

With the ObjectID for the point reserved and captured, the insert can now take place. Web feature layer editing (adds, deletes, and updates) happen through the applyEdits function. This request requires the named version name and sessionID as well as the edit payload. This payload lists of the edits to be performed specifying the layer ID, operation (e.g., adds), attributes and geometry. The pointGlobalID (GUID) generated at the start of the test is also used.


The value for the edits key:






As mentioned earlier, if the insert utilized the feature template, the attributes would have actual values for the initial edit instead of "null". 

The point insert operation in this test plan is "simple" in that it uses a fixed geometry of  "x":-12994151.880899999,"y":3983674.1925999969. The test plan could be made to utilize a CSV file with different values to make this part more dynamic.

If the applyEdits is successful, a new edit moment is returned to be used on subsequent feature queries.

Note: The value of the new historicMoment key in the query requests before applyEdits is called is typically different than the value after. The value of the property (e.g., historicMoment) is updated through the Regular Expression Extractor element.


After an edit operation, there are often a few feature queries which use the edit moment, version name and ObjectID that was just inserted. 


Update Point Attributes Transaction

Since the editing session has already been started and the objectID(s) already reserved, the Update Point Attribute does not have as many moving parts as Add Point Spatially. It contains a handful of queries and one applyEdits request (to perform the update). The update performed by the applyEdits is relatively simple as its just changing a few attributes. However, more columns could be changed in addition to the geometry.


The value for the edits key:






Polygon Transactions

The same editing process (e.g., insert followed by an update) is repeated for the polygon layer. While the Add Polygon Spatially contains a new reserveObjectIDs request (since the insert is taking place against a different layer) there is not an additional startEditing request against the named version GUID because the long transaction is still active.


 The value for the edits key: 






The polygon layer update is similar to the point update in that it modifies several column attributes of the data.

Save Edits (to the Named Version) Transaction

At this point in the Test Plan, the edits are done and the long transaction can be completed. This happens by a stopEditing request being issued against the named version. When the commit is successful, the branch moment value is updated and the edits performed will persist in the named version.


Reconcile With Default Transaction

If the changes made against the named version need to be visible in Default, the reconcile operation must  take place first. As mentioned earlier, reconcile helps resolve data conflicts, that might exist between the two versions.

Since a write could be taking place during this process, a startEditing request is issued to the named version GUID resource just prior to the reconcile. 

From an HTTP request point of view, reconcile is called against the GUID of the named version (which was created from this iteration of the test). The key/value pair request parameters are fairly straight-forward with the only dynamic pieces being the sessionID (and of course the token).

A stopEditing request is issued (also against the named version GUID) once reconcile has finished.

Once the reconcile has completed successfully, a new branch moment is returned and captured.


Note: This test focuses on "write operations" returning an updated edit moment. While this is true, the edit moment change can also be reflected through the responses from VersionManagementServer/versions/[GUID]  requests.
Many times, this value is identical to the moment returned by the write operation. Sometimes it is different but still very close.

For simplicity, this test plan did not reflect this potentially different moment change with an additional regular expression extractor element (for these VersionManagementServer/versions/[GUID] requests).

Post To Default Transaction

Post is the last step to bring the edits in the named version to the default version.

Like reconcile, the captured editing session used the defaults options. As a result, the key/value pair request parameters are straight-forward with the only dynamic pieces being the sessionID and the token.

There are a few more reading and editing calls than the reconcile operation to the named version and default version, but the operation is also straight-forward.


Managing the Named Versions

Named versions can build up over time, but if the post operation is the last action in the user's edit session, the named version could be deleted.

Note: For simplicity, deleting the named version after the post transaction completed was not added to the test.


Zoom Out (to Scale 1 Million) Transaction

The edit session concludes with a navigation zoom out to the map scale 1:1,000,000. This was done in ArcGIS Pro to make it easier to see the edits with respect to the rest of the data.

The result of this simple operation is a handful of feature layer queries. However, it is important to understand that these queries (based on the values for historicMoment and gdbVersion) are still against the named version and not the default version.


Note: Queries against default would (always) use the gdbVersion value of "sde.DEFAULT". However, since Default has been updated in this test plan as a result of the post operation, new queries would need to utilize an updated historicMoment in order to pull down the latest data.

The most recent value for default's historicMoment can be found in the response of a VersionManagementServer request (e.g., VersionManagementServer/versions/BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1). Such a request exists in the post transaction, but for simplicity, this was not captured with a regular expression.

Final Thoughts 

The Apache JMeter Test Plan in this Article represents a basic programmatic approach for handling some of the key components of a branch versioning editing workflow. While the steps of the workflow were straight-forward, the end result was a Test Plan that still contained contains several moving parts. To help with this, the edits themselves were static and hard-coded into the test. This was done to keep things as simple as possible so the Article could focus on critical points and strategies.  However, there is nothing to stop you from recording and creating more complex edits in a new test or to make the edits of your effort dynamic where the values are derived from a CSV file.

As a tester and GIS analyst, the sky's always the limit when building a JMeter Test Plan to consume or edit data from ArcGIS Enterprise.

Running the Load Test

Note: Please coordinate with your GIS team if your Apache JMeter test will be sending requests to a server that might impact other users. A load test should be scheduled to run during non-peak business hours.

Note: Before running an editing test against an enterprise geodatabase, ensure that proper backups exist, are accessible, and can be utilized, if needed. While named versions can be easily deleted via the version management system, edits and changes posted to default are more difficult to undo. Typically, restoring the data from a backup to get the system to a clean state is often the last step after the edit testing effort has completed anyways.

Historic Moment Testing Details

The branch moment is a critical component of branch versioning as it allows the feature layer queries to pull data from a specific moment in time from the geodatabase.

However, from an HTTP testing perspective, the response from various functions list this value under different string names. Some resources list it under creationdate or modifiedDate, whiles others use editmoment or just moment. As a tester, that is something to look out for when constructing the regular expression to capture the appropriate value. In the case of create (version), creationdate and modifiedDate are returned  though they often contain the same value.

For more information see: Historical moments 




File:c8db9197-fc08-4673-8bd1-6b622c7d4f6e_text.gif, Otisburg -- Superman (1978) 


Apache JMeter released under the Apache License 2.0. Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are trademarks of the Apache Software Foundation.