When creating test cases, you should test against expected and unexpected data to the server. It is important that the server sends the correct responses to valid requests and just as important that it knows how to handle invalid requests.

In this example, we will examine the Negative Unit Test within the Test Suite: getItemByTitle Unit Tests node.

  1. Expand Test Suite: getItemByTitle Unit Tests> Test Suite: getItemByTitle Negative Test, then double-click the Test 1: getItemByTitle node.
  2. In the Test 1: getItemByTitle node located in the Negative Tests test suite, parameterize the titleKeyword element using the Bad Keywords column.

    In the negative test cases, we are sending our service unexpected data and verifying that it returns the correct response or error response.
  3. Save your changes to Test 1.
  4. Right-click the test, choose Create/Update Regression Control, select Create Regression Control> Create Multiple Controls, then click Finish.

New regression controls are created for each test run. If you configure the new Diff tool to ignore that same XPath, no tasks will be reported in the Quality Tasks view.

  • No labels