Sometimes we want a system application to be tested against the defined specifications. That is, we wish to check how the system reacts to an inappropriate condition. By force testing, we intend to check the system with the help of negative test scenarios or test cases.
The objective of forced error testing is to generate a predefined set of errors. A list of error messages that the program must generate, is prepared in advance. The code is analysed to verify the possible point of error occurrence, and test cases should be prepared accordingly to analyse the error messages generated by each condition.
Hence forced error testing emphasises-
Preparing negative test cases
Compiling a list of errors generated by the program
Such a list is used as a blueprint for developing test cases
Forced Error Testing must be perceived at the very initial stages of software development
An analysis of a given code shall help testers to create test cases and assess what could be a possible scenario for an error
But how do we decide what error conditions are worth consideration or what all possible error conditions could arise? We can take a decision based on the following activities :
Communication with developers is important, as they are well versed with the code.
Referring to the data specifications can help a great deal.
Verifying the string data in the resource file.
Analysing each case to understand what could possibly lead to an error.
Using combinations of input/output data.
Implementing test tools to extract test strings from the resources.
Last but not least, one is obviously expected to use his own ingenuity based on experience, to identify potential errors.
After enlisting all possible error conditions, one must plan to perform the following stages of testing process :
Create an error state, that is, the state at which the system shall react. Like incorrect input or simply disconnecting the network etc.
Check the logic behind detection of software bugs. Detection is performed through validating the test cases.
Check whether the application is capable of handling the error condition efficiently. By this, we intend to see that the system recovers from the bug itself or it needs user assistance to deal with the same.
To verify that the error message is able to communicate to the users very clearly, about the error.
Checking for some additional problems which may be associated with the occurrence of an error condition.
Among many forms of testing, forced error testing is an efficient approach towards attainment of an application that is capable of delivering the best service.
The very purpose of forced error test is that we are able to customise the test cases as per our own approach towards the problem.
The first stage of error correction states that the errors are at least showing up, in the next stage we try to ensure error message is correct. It takes several steps of error detection and correction to finally reach a final solution.