1. Home
  2. Using Warewolf
  3. Testing your Services

Testing your Services

Warewolf provides a robust framework for fine-grain testing of your resources. To maximize the value of your work and the time taken to change and grow your services, you can add testing to each service, in a simple, fast Test Editor.

Creating and Editing Tests

Tests are created and edited on the resource-specific Test Editor.
To access the Test Editor:

  1. In the Explorer, right-click the resource you want to manage tests for.
  2. In the context menu, select Test Editor and click Create New Test.
  3. An empty list will be returned as the screen below:
    From this window, click on Create a new Test and select nodes to be tested with assert conditions, mock nodes like other services your service might also be making use of eg: database queries, etc.
  4. In the Test Name field on the right enter a Test Name.
  5. Select the account you would like the test to run as:
    1. Windows: The credentials of the person running the test will be used.
    2. User: A specified user account will be used. This is the recommended option.
    3. Public: Runs as an unauthenticated user.
  6. Supply the test Input values. These are the values you would like passed into your service.
  7. Supply the assert Output values. These are the values you are expecting to come out of the service.
  8. Supply the Error state after execution.
    NOTE: If Error is selected, all other Asserts will be ignored.
  9. Click the Run button on the test tile.
  10. If the test has not been saved, it will be automatically saved at this point.
  11. When the test is finished executing:
    a. The test result will be shown on the test tile.b. The debug information for the test run will be shown in the debug Output Window.
  12. Clicking the Main Menu Save button will save all your tests.
  13.  You can duplicate a test by pressing the Duplicate button after the Test Name.Test Duplicate Button - Used in Warewolf
  14. To ignore a test and not have it runnable, select the active check on the test tile.Warewolf test framework valid input
  15. To delete a test, first ignore the test as seen above and then click the delete icon.valid input not checked Warewolf delete
  16. Clicking Run All runs all the tests in Parallel.

Create a test from Debug Output

After you have debugged [F6] your service and you want to quickly make a test covering the outputs your service just produced.

  1. Create a new Test by clicking on the test symbol as illustrated below:

Test 1 * will be created selecting all the nodes the debug [F6] executed:

Executing Tests

You can execute tests in 2 ways:

  1. From inside Warewolf: In the Explorer, open the Test Editor and click Run ALL
  2. Or externally:
    • To run all the tests for a resource, add the .tests extension to it. e.g.  “http://localhost:3142/secure/Hello World.tests
    • To run all the tests for a folder, add the .tests extension to it. e.g.  “http://localhost:3142/Examples/Dice Roll Example.tests
    • To run a specific test for a resource, add the .tests extension to it, followed by a forward slash and the test name e.g.  “http://localhost:3142/secure/Hello World.tests/Valid Input

To execute and create tests, you will need View and Execute permission on the resource.

 Test Results

Test passed - Testing Framework for Warewolf

Test has passed


Test has failed - Warewolf test framework

Test has failed


Test needs to run in Warewolf

 The test needs to run. A change has occurred on the test since the last run or it has never been run

Test invalid in Warewolf test framework

The test is invalid and needs attention. Something has changed on the service that makes this test invalid


Updated on June 30, 2020

Was this article helpful?

Related Articles

Enjoying Warewolf?

Write a review on G2 Crowd