describe the difference between a Unit Test Plan and a Strin
describe the difference between a Unit Test Plan and a String Test Plan
Solution
First let me define Unit testing vis a vis String testing.
Unit Testing: Unit testing, as the name suggests, is to make sure that each unit does what it is supposed to do, kind of, in isolation. If we take a piece of code for example that contains multiple functions, unit tests are writen for each of the functions to ensure that the function produces the expected output when given the expected input. Thus, by the very nature, Unit testing can be performed by the developer who writes the code.
String Testing: String testing, as the name suggests, is more like integration testing to see whether the all the different pieces, which are unit tested in isolation work well together to solve a business problem. So here the all the pieces have to come together and serve a business purpose which typically involves certain functonal aspect. Hence for string testing the developers as well as the functional experts have to come together.
Example: Take a calculator program and for the sake of simplicity assume that it has just four basic operations of addition, subtraction, multiplication and division. The developer writes four functions, one each for each of the operations.
In the above context, unit test plan involves writing four unit tests, one each for each of the functions. These unit tests accept two numbers, perform the operation defined by the function and returns the actual result which is then compared with the expected result. Depending on whether the actual and expected results match or not, a test is either marked as pass or fail.
Now the string test plan comes into picture when this program is used to solve a complex problem involving a series of these four basic mathematical operations. This would need a functional expert, in this case a guy with the knowledge of the BODMAS rule to be able to decide the order in which the four basic functions have to be called to solve the problem.
