Skip to content

Testing

lordmilko edited this page Aug 19, 2019 · 1 revision

Contents

Visual Studio

If you wish to run any unit tests, ensure Test -> Test Settings -> Keep Test Execution Engine Running is unticked to prevent the PowerShell tests from locking the assemblies (preventing recompilation or moving the files somewhere else). It is advised to group the tests in Test Explorer by Project to separate unit tests from integration tests.

If you wish to run integration tests, it is recommended to create a separate server for integration testing. When integration tests are run, PrtgAPI will create a backup of your PRTG configuration, run its tests, and then revert the server to its original settings. If integration tests do not run to their completion, PrtgAPI will automatically restore the previous config upon next executing integration tests.

To configure PrtgAPI for integration testing, please specify values for all fields listed in PrtgAPI.Tests.IntegrationTests\Settings.Local.cs with values specific to your server. The system running integration tests must be able to connect directly to the server over the network. When specifying the credentials to connect to your server, you must specify a local user on the server; domain users are not currently supported.

Clone this wiki locally