| Products: | Compendium-TA A modelling tool | Email Control Center Free - Control Outlook | URL Control Center Free url manager | Perl Path Analysis Free Testing Tool | Test Utilities in Excel Free Testing Utilities | Test Data Utilities Free Test Data Utilities | ForceWindowVisible Free System Util |
![]() | ||
| Little Essays & Modelling Notes Little essays towards a model of modellingThis is a Compendium Development dynamic document. As such it may lack the narrative flow of, and may change more often than, our other documents. But modelling is such an intrinsic part of the testing process that we could not allow this document to sit around until we had fully pulled our thoughts together. So here are the Little essays, and Modelling Notes.
Modelling
Modelling
Human beings model the world. We learn by constructing models and then subjecting those models to tests in order to determine their validity. Human beings do this all the time. By the time a human reaches adulthood it has constructed so many models that the person is probably unaware of all those models, and may even be unaware of the modelling process. When we are faced with something new which we don't understand, a new fangled tap in the washroom for example, we will use the models that we have already developed which are similar to that situation; all our tap models. If they fail to make the tap work then we will use other models associated with the washroom. Having encountered hand driers with proximity sensors we may wave our hands around to get the tap working. If we have been on a train or a plane then we may have encountered taps that work through foot pedals and we would start to look for those. We have models for turning things on outside the washroom using buttons or levers and we would start using those. We use models and strategies all the time. We are experts at constructing models and strategies to apply to those models. We interact with the world through those models. The software development process constructs software that works more often than it fails. This is in spite of us not doing what we are told is best practise, or even what we believe we should do; we don't spend enough time on requirements, we don't stabilise requirements, we don't design, we don't unit test, we don't document, we don't review. We often get away with it because modelling is a natural talent and software development is a process of modelling. Unfortunately we also learn from experience, and if our experience of success includes not doing all these best practise processes then that leads us to not do these processes again. We have to understand what we do and what each step is for, in order to ascertain if we can miss them out in the situation we are in. Modelling explicitly, and understanding our models, allows us to be pragmatic.
Modelling the development processSoftware development tries to create a product. It does this by engaging in a number of processes (requirements, design, coding, etc.). Each of these processes will create a model that will either be the final product or an input to a follow on process. The best example of this is one of the popular life cycle models: waterfall or V model. There are constraints on the construction of a product; we need it in X days, it must only cost Y thousand, and you only have Z staff members. The skill of developing software is in the effective application of the strategies that have been learned bearing in mind the constraints involved. Modelling is a fundamental activity of the software development process. To take the main processes from a minimal software life cycle:
Each of the models produced in the development process is a refinement of a previous model, even if the previous model was never formally documented. A requirement is a refinement of the dreams and aims associated with the picture in the specifier of the requirement's head.
Checking the modelDo we want to produce programs that are fault free or do we want to produce programs that allow people to do what they want to do in a quality manner? Ideally I'd prefer both, but humans make mistakes so we should aim for a product that functions in a quality manner. When we achieve that we do it by assuring ourselves of the quality of the models in the software development process as they are produced, and before they are fed into a downstream process that will build new models using the information contained in those models. How do we assure ourselves that the model is a quality model? We have to know what we want from a model, control the production process as much as possible, check the model when it is done and periodically throughout its production. This is the fundamental assertion of the T.O.T.E model in psychology [1]. The T.O.T.E model is a sequence of steps: Test, Operate, Test, Exit. With a goal in mind we Test to see if the goal has been achieved, if not then we operate to change something which will hopefully bring us closer to our goal, we test and if the test is satisfied we exit that process as our goal has been achieved. The T.O.T.E model describes a process of refinement.
Testing and ModellingIn order to test a model we have to have some way of recognising the success or failure of a test, our test must have a goal, it must have a reason for existing. That reason is inherent in the model from which the test is derived. This means that it is difficult to use a model to test itself. In software development this is typically not a problem, we rarely use the source code as the only model when testing the source code. We typically derive tests from a design model, a requirements model or a specific testing model, or even a model which may be derived from the source code, essentially any model which has the level of detail required for our testing. Modelling is as fundamental an activity of testing as it is of development. Test Strategies are applied to models. This is for the purposes of test derivation, derivation and execution coverage measurement, domain analysis, risk analysis, the list includes almost every task that testers do. Strategies typically evolve and are identified by thinking about errors that slipped through and identifying a strategy that could have found them.
Testing
Errors cannot be found without a model. Quality Control cannot be conducted without a model. I have heard it said that "some testers never model" and "reviews are not conducted against a model". These statements are false. In the absence of a defined and identifiable model, there will be an informal model, a model of understanding in the tester's head. A model is our understanding and knowledge of the system. The level of testing that can be done with no understanding and no knowledge of the system is zero. Try this. Take a program that you don't know what it does. Make sure that the program presents all its information in a way that you cannot understand. If you don't know Japanese then test a Japanese program. If the information presented to you is obscure enough then you will find it impossible to build a model of it and then you have no way to assess the correctness of any action. Remember that if you even understand the name of the program or its main purpose then that is information that you will have assimilated into a model and will use during testing. Reviews cannot be conducted without a model of whatever the thing being reviewed is supposed to represent. Review models are different from testing models. A review will be conducted against a number of models:
There are at least as many informal models as there are people. Modelling is a fundamental task in testing. Quality Control is essentially the checking of a model against an implementation of that model. A test is a specific situation with a predefined set of things to check against the model. The differences are errors, either in the model or the implementation.
Error GuessingError Guessing is described in 'Testing Computer Software' by Cem Kaner [2]:
This quote suggests to me that there is an informal model in the tester's head and that the subconscious is applying a strategy to the model which the tester is unaware of. The tester is only aware of the subconscious flagging the results of that check to the conscious as a nagging doubt. If you do engage in error guessing then you should be aware that:
Process ImprovementThe simplest way to improve a process is to analyse the errors that it lets slip through. For every error not found by one of the previous quality control processes, ask, is there a strategy that could have been applied to one of the existing models that would have created a test case that could have identified the error. If the answer is yes then it may well have slipped through because timescales or staffing levels forced your hand and you simply didn't have the time to apply that strategy to that model, or the risk of not applying it was deemed low. If the answer is no then we have to identify a model and a strategy that could have found it. In both cases assess the cost and time impact of adopting that model and strategy. The development process is one of trade offs and compromises.
Test ConditionsTest Conditions are statements of compliance which testing will demonstrate to be either true or false. These are (in effect) test requirements. Conditions serve different purposes. Some conditions will act as the audit reason for a particular test case e.g. The user must be able to create a flight. The tester will create a test which creates a flight, obviously there are more attributes to this case than this - what type of flight, what type of user, fully booked, partially booked, etc. These attributes are other types of conditions. Some conditions are used to define a test’s attributes or preconditions. E.g. create flight of type local, create flight of type international. Or are they.... This may be modelling that has not gone far enough. The initial condition 'create a flight' is valid. When we only have test conditions as our modelling tool then we have to represent this as a condition. It is also a program function - create flight, or an object method, or an entity event, or a business process. Consequently we should really have a model and a derivation strategy that says “there must be at least one test for each entity event” or “there must be at least one test for each object method”. In this case it is obvious that “one test” will not cover the condition but with a rich model, with object or entity models we have a list of properties or attributes, these will have scoping variants (i.e. attribute flightType - international, local). Basically, we use these context rich models to give us the combination information that we require to construct test cases. Without this approach we will never know if we have a valid or complete set of condition combinations. Hierarchical models are appropriate for test grouping i.e. tests related to business processes, program modules, program functions etc. There is no reason why a test cannot be in more than one test grouping. Hierarchical models are appropriate in derivation for hierarchical structures (it is possible to list entities attributes and events as hierarchical structures but this hides valid combination options and is a mix of ELH and ER, we should really have a relationship section on the model) e.g.
Models for test derivation should be rich. This allows a derivation strategy to be created which can be used to gauge the completeness of the test products and the validity of the test products. With rich models, Test conditions become requirements which are used to check the completeness of the test derivation approach rather than the audit reason - unless of course there is no way to make the construction of test cases automatic with the implicit cross referencing of test conditions i.e. we don’t have to state ‘Create a flight’ as a test condition because there is an entity event on flight called create which we know we have to be able to test and it will apply to a variety of attributes on that entity. Without this rich modelling, and without an implicit (or strategy driven) approach to testing, a vast number of test conditions have to be created and maintained and no guarantee of combination thoroughness can be achieved.
References and Consulted Texts
[1] Modeling with NLP, Robert Dilts, 1998, Meta Publications
|
|
Send mail to webmaster@compendiumdev.co.uk with questions or comments about this web site.
Copyright © 2010 Compendium Developments Ltd
Last modified:February 07, 2002