Building in positive, negative, boundary, and limit testing
Because the test methods are data driven, users can build a variety of different tests and initially build a positive test for the feature. Test coverage can be extended by varying data and including additional sets in the JSON data file for each test method. The test methods should be generic enough to allow those additional sets of data to be used. At the minimum, the user should include two positive test cases: one to test just the required fields and one to test all the fields in the feature.
Negative testing
What about negative testing? Usually, when working in the Agile world, users test at the minimum, and then extend test coverage after the feature has been built. But, when using a data-driven testing model, users can cover both the positive and negative testing scenarios all at once. This opens the door to testing the boundary and limits of the feature, testing the exceptions that may occur when exceeded.
Let's look at how...