Select to view content in your preferred language

How can I perform Unit Tests for Pro based SOEs?

498
1
Jump to solution
11-06-2019 05:16 AM
RalfSchmidt
Occasional Contributor

Unit tests for ArcMap based SOEs can be done by initializing the Unit Test Framework with AOInitialize(). How can I perform Unit Tests for Pro based SOEs?

0 Kudos
1 Solution

Accepted Solutions
AmyNiessen
Esri Regular Contributor

For functions that are internal to the SOE and not exposed as operations, you would write a new operation in your SOE REST API called "test". This test operation would go through and test all the internal functions that you want to ensure are working and then return a JSON object that indicates whether the implementation tests passed or not. If there are configurable parameters (database or file server names for instance), you would pass those as inputs into the test operation. If you have a server that stores test results, you could directly write to that as well from within the SOE. If you have an enormous number of functions, then you might create an operation for each test suite.

View solution in original post

0 Kudos
1 Reply
AmyNiessen
Esri Regular Contributor

For functions that are internal to the SOE and not exposed as operations, you would write a new operation in your SOE REST API called "test". This test operation would go through and test all the internal functions that you want to ensure are working and then return a JSON object that indicates whether the implementation tests passed or not. If there are configurable parameters (database or file server names for instance), you would pass those as inputs into the test operation. If you have a server that stores test results, you could directly write to that as well from within the SOE. If you have an enormous number of functions, then you might create an operation for each test suite.

0 Kudos