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.
- Expand Test Suite: getItemByTitle Unit Tests > Test Suite: getItemByTitle Negative Test and double-click the Test 1: getItemByTitle node.
- 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. - Save your changes to Test 1.
- Right-click the test, choose Create/Update Regression Control, choose 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.