WHAT TESTING IS AND WHAT TESTING DOES
So far we’ve worked with a natural thought of what testing is. we’ve perceived that it’s a movement wont to diminish chance and improve quality by discovering surrenders, which is all evident. In any case, we’d like to grasp somewhat more about how programming testing functions by and by before we will consider the way to execute powerful testing.
Testing and debugging
Testing and debugging are different sorts of activities, both of which are vital. Debugging is that the process that developers undergo to spot the explanation for bugs or defects in code and undertake corrections. Ideally, some check of the correction is formed, but this might not reach checking that other areas of the system haven’t been inadvertently suffering from the correction. Testing, on the opposite hand, maybe a systematic exploration of a component or system with the most aim of finding and reporting defects. Testing doesn’t include correction of defects – these are passed on to the developer to correct. Testing does, however, make sure that changes and corrections are checked for his or her effect on other parts of the component or system.
Effective debugging is important before testing begins to boost the extent of quality of the component or system to A level that’s worth testing, that’s A level that’s sufficiently robust to enable rigorous testing to be performed. Debugging doesn’t give confidence that the component or system meets its requirements completely. Testing makes a rigorous examination of the behavior of a component or system and reports all defects found for the event team to correct. Testing then repeats enough tests to make sure that defect corrections are effective. So both are needed to realize a top-quality result.
Static testing and dynamic testing
Static testing is that the term used for testing where the code isn’t exercised. this might sound strange, but remember that failures often begin with a person’s error, namely an error during a document like a specification. we’d like to check these because errors are less expensive to repair than defects or failures (as you’ll see). that’s why testing should start as early as possible, another fundamental explained in additional detail later during this chapter. Static testing involves techniques like reviews, which may be effective in preventing defects, for instance by removing ambiguities and errors from specification documents. Dynamic testing is that the kind that exercises the program under test with some test data, so we speak of test execution during this context. The discipline of software testing encompasses both static and dynamic testing.
Testing as a process
We have already seen that there’s far more to testing than test execution. Before test execution there’s some preparatory work to try to to to style the tests and set them up; after test execution, there’s some work needed to record the results and check whether the tests are complete. Even more important than this is often deciding what we try to realize with the testing and setting clear objectives for every test. A test designed to offer confidence that a program functions consistent with its specification, for instance, are going to be quite different from one designed to seek out as many defects as possible. We define a test
the process to make sure that we don’t miss critical steps which we do things in the right order. we’ll return to the present important topic later, where we explain the elemental test process intimately.
Testing as a set of techniques
The final challenge is to make sure that the testing we do is effective testing. it’d seem paradoxical, but an honest test is one that finds a defect if there’s one present. A test that finds no defect has consumed resources but added no value; a test that finds a defect has created a chance to enhance the standard of the merchandise. How can we design tests that find defects? We actually do two things to maximize the effectiveness of the tests. The techniques are all supported certain testing principles that are discovered and documented over the years, and these principles are the second mechanism we use to make sure that tests are effective. Even once we cannot apply rigorous test design for a few reasons (such as time pressures) we will still apply the overall principles to guide our testing. We address these next.