Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2021.1

...

  1. Open the Smart Test Templates view and click the Add Template button.
  2. Specify a name and location for the template and click Next. The template must be saved to the TestAssets folder or a subfolder of the TestAssets folder.
  3. Choose Empty and click Finish.
  4. Double-click on the Resource Suite and specify a pattern in the Match field. The pattern should identify the endpoints you want the rules to apply to. See  Defining Smart API Test Generation Scope for additional information about matching resources. 
  5. Right-click on the Resource Suite and choose Add New > Resource Template.
  6. Specify any additional pattern-matching logic (e.g., REST method or path segment) to identify tests that the template should be applied to. Leave the Match field empty to match all tests matched by the parent Resource Suite. 
  7. Right-click on the Resource Template and choose Add Output...
  8. Choose Beginning from the Suite menu and choose Test Suite Reference.
  9. Click Finish and specify the .tst file created in the Configuring the Authentication Source section. If you enable the Persist as relative path option, the path generated in the test suite configuration when the template is applied will be relative to the TestAssets field. You can use the ${project_loc } variable to reference tests in another project. For example, if the REST Client you created is saved to a project called "auth" and the .tst file has the name "AuthSuite", you could specify ${project_loc:auth}/AuthSuite.tst in the field. When the template is applied, the path to the reference will be correct.
  10. Right-click on the Resource Template again and choose Add Output...
  11. Choose Transport Header from the Request menu and choose HTTP Header.
  12. Click Finish and add the following header in the Tool Settings section of the HTTP Header tool:

    No Format
    Authorization: ${access_token} ${token_type}

  13. Save your changes.

...