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 Tests
    Screenshot of Context Menu Tests for Warewolf
  3.  Click the Create a new Test buttonCreate New Test Icon - Used in Warewolf to create a new test
  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 tileRun Button - test services in Warewolf
  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 tilesuccessful test result on Warewolf serviceb. The debug information for the test run will be shown in the debug Output Windowtest debug output warewolf test framework
  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 tileWarewolf test framework valid input
  15. To delete a test, first ignore it and then click the delete iconvalid input not checked Warewolf delete
  16. Clicking Run All runs all the tests in Parallel

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

 

FacebookTwitterLinkedInGoogle+Email
Updated on July 19, 2017

Was this article helpful?

Related Articles