Goal Question Metric ( GQM ) is a systematic approach to the production of specific quality models in the area of software development. This can be represented as a tree structure. As root is the goal ( Goal ), which is refined over the nodes ( Questions) to the leaves ( Metric ). In this way, questions and software dimensions are derived. On the way from the leaves to the root of the measured values ​​are interpreted.

Suitable metrics can be divided into the Softwaremetrie identify about answering the following questions:

  • What is the goal to be achieved by the measurement? ( Goal )
  • What is to be measured or which questions to answer, the measurement? ( Question)
  • Which metric ( s) are able to describe the necessary characteristics? ( Metric )
  • 2.4.1 measurement plan
  • 2.5.1 questionnaires
  • 2.5.2 Data Sheets
  • 2.5.3 interviews
  • 2.5.4 observation
  • 2.5.5 Automated tools
  • 2.5.6 validation
  • 2.5.7 analysis
  • 2.6.1 Measurement Results
  • 2.6.2 Lessons Learned


"How can you decide what you need to measure in order to achieve its objectives? "

Just in front of such a problem were the inventors of the Goal - Question-Metric model, Prof. Victor R. Basili and Dr. David White, as they in the area of software engineering laboratories, the NASA Goddard Space Flight Center, at various flight dynamics projects worked. The definition of goals ( Goals) helped them to focus on the essential and important. Writing down questions ( Questions) made ​​it easier to specify the targets more accurately and thus could be simultaneously relevant metrics ( Metrics ) can be derived. GQM was born and quickly established himself as a quality model at the Goddard Space Flight Center.

Goal-Question - Metric model

The GQM model describes the procedure for creating a quality model, where the model can be divided into six separate steps:

In short: " The GQM process begins with the characterization of the organization and the project environment, taking into account the environment information needs to be recorded by means of objectives and corresponding questions in the second step are then documented measurements in the third step, which serve to quantify these information needs in the fourth. .. and fifth step, the measurements are performed and interpreted the resulting data. Finally finds a follow-up in the sixth step instead. Here, for example the quality of planning and lessons learned to be saved. "

Literature is located in the distribution of the six steps, however, no general agreement. Therefore encountered in the search for GQM in a variety of organizations and various different names. Unanimous in the literature is the fact that there are six steps and the methods on which they are based, are always applied in the same order. The first three steps of the GQM model are often referred to as a definition phase. In this phase, the goals ( Goals), questions ( Questions) and calculated metrics ( Metrics ), which give the GQM model its name.

Objectives ( goals ) identify what we want to achieve; Questions (questions ), if answered, tell us if we achieve the goals, or help us to understand and interpret; and the metrics ( metrics ) identify the measurements that are needed to answer the questions (questions ), and quantify the objectives ( goals ). The goals, questions and metrics with their associated dimensions, graphs and other expansions are summarized as GQM plan. Several questions can be associated with a target and a question several metrics. In other words, the relationship between " objectives and questions" and "Questions and Metrics" is both times 1 to n The entire GQM model is defined " top-down ", ie it is a goal-oriented approach that defines the goals of starting down questions and metrics. The analysis and interpretation happens again " bottom-up ", ie from bottom to top.

Step 1: Characterization of the corporate and project environment, detection of the mission statement, definition of measurement goals

In this first step, it comes GQM goals ( goals ) to be defined. There are two types of targets GQM:

  • Business objectives (business goals )
  • Measurement objectives ( measurement goals )

Business objectives, often referred to as a mission statement, are the overarching mission statement of a company and define its long-term goals. A company always defined business objectives. These have to be identified and used as a focus for the creation of measuring locations. Without business goals the entire measurement would have no orientation. Business objectives drive, consequently, the identification of measurement destinations, with business goals and measurement objectives does not necessarily have to differ from each other, so it is only spoken of GQM goals below.

Each GQM goal should be expressed by five aspects:

  • Object of measurement
  • Purpose
  • Quality focus
  • Perspective
  • Context

Setting the measurement object

Define object of measurement means finding out about what you want to know more: " What you want to measure? " GQM allowed to examine a variety of objects. This could be generalized said processes, products, resources, projects, etc., to name just a few examples.

Defining the purpose

Set purpose determines what is to be achieved. Examples include characterization, improvement, monitoring, evaluation, prediction or optimization.

Setting the focus on quality

Set Quality Focus: The focus on quality is an element of the measurement target. The following examples show a wide range of quality attributes:

  • Reliability / availability
  • Usability
  • Security
  • Functional Safety
  • Scalability
  • Maintainability
  • Customization
  • Time to Market
  • Performance
  • Efficiency
  • Portability
  • Interface compatibility

Setting of viewing angle

Set of view: This is - as the name suggests - the perspective from which the test object is considered, and this is usually the customer, developer, tester, project manager or contractor.

Setting the Context

Set Context: This determines the context in which the test object is. The context should be explained as accurately as possible, which it offers to provide information on company, department, project and period.


The definition of GQM goals can be represented with the following lemma:

Analyze the development process for the purpose of modification in terms of correctness from the perspective of the developer in the context of X. project GQM plan

Collecting the targets can happen in various ways. The most common methods are workshops and interviews. It is important that the objectives of the various process involved are collected to obtain as broad a spectrum. The goals themselves are documented in a so-called Abstraction Sheet. Often several Abstraction sheets are held in a GQM plan, which will then be provided before further processing with priorities. The GQM plan is the documentation tool of the Goal-Question - Metric. The setup is simple. It starts with a thematic introduction to match the defined target. Subsequently, questions, written with the respective associated metrics. The following template can help in the production of a GQM plan.

Q.1 Frage1   M.1.1 Metrik1   M.1.2 Metrik2 Q.2 Frage2   M.2.1 Metrik1   M.2.2 ... Q.3 ... Abstraction sheets

Abstraction sheets are used to assign a GQM goal important information, or to group them with the GQM goal. It can co-exist several Abstraction sheets. The sheet is divided into five parts:

  • The five aspects ( object of measurement, purpose, quality focus, perspective, context ) out to which GQM goal the sheet part.
  • Quality factors are directly related to the GQM goal. To figure them out, you should ask yourself the question: " What factors need to be considered in this GQM goal and what affect it? "
  • The hypothesis is the estimated or expected response to the defined quality factors.
  • Factors in turn relate directly to the quality factors: " What affects the quality factors? "
  • Influences on the hypotheses are stated in the last section of the sheet: " How do the factors influencing the hypotheses? "

Step 2: Formulate questions for a more precise definition of the objectives

In this phase of the model questions (questions ) are provided, which are derived from the Abstraction sheets. For each retained component of Abstraction Sheets can also be formulated as a question in the rule. Answering these questions helps Thus, the target ( goal ) to come closer. To define questions, you should first determine what you want to learn about the properties of the quality focus of the target. The following points should be considered:

  • Accordance with the target Stay on topic! Especially the purpose and point of view should reflect the questions.
  • Quantifiability The questions must be formulated so that they can be answered through readings. So do not " Which test cases would in this context well? " But " Which test cases have found the most errors? ". More complicated questions should be divided into several simple questions.
  • Meaning of the response One should ask the questions: " What do we do with the answer to this question? ", " What are the possible measures to achieve this goal? ". If the defined question leads to no improvements / actions that need the question should be again reconsidered.
  • Understand diagrams It must be clear what is shown on the axes of the chart, which analyzes the representation precedes and what data were excluded.
  • Use of well-known graph types It should be in the selection of chart types not be too creative, but whenever possible fall back on well-known ( to the appropriate question type ) diagrams.
  • Cost / benefit Weighs the benefits one expects from answering the question, the cost of data collection on?
  • Clarity of the terms It should be ensured that terms such as quality, effectiveness, efficiency and reliability are precisely defined.
  • Reasonable number of questions Experience of successfully implemented measurement programs show that three to seven questions should be defined per target.
  • Good relationship between quality and influence factors It should be the question "What influences this quality aspect " checks to see if there are important influences. However, no more than about three times as many influencing factors such as quality factors to be defined, since one is ultimately interested in the latter.

Step 3: Identify measurement goals and derived metrics

This step builds on the Previous and attempts to derive using the previously developed GQM goals, metrics ( metrics ). The essence of this phase is to find the right metric to the question asked, which often turns out to be easier than previously thought. To be particularly suitable to ask the following dimensions or metrics and measurements resulting out:

  • Depth of Inheritance Tree (DIT )
  • Number of Children of a Class ( NOC)
  • Response for a Class ( RFC)
  • Weighted Methods per Class ( WMC)
  • Coupling in between Object Classes ( CBO)
  • Lack of Cohesion of Methods ( LCOM )
  • Constructive Cost Model I II ( COCOMO I II)
  • Halstead metrics
  • McCabe metrics ( cyclomatic complexity)
  • Lines of code ( LOC)
  • Function Point method
  • Defect density
  • Difficulty

Step 4: Development of mechanisms for data collection

In this step describes how the data and dimensions are to be detected, which are necessary for the GQM plan. It also speaks of the creation of a measurement plan. The following points should be covered with the help of the measurement plan:

  • Formal definition of the measurements
  • Written drafting of measurements
  • All output values ​​of the measurements
  • The person or roller that performs the measurements
  • The time at which the measurements are carried out
  • The medium ( tool or questionnaire ), which is used to perform the measurements

For the entire data collection and measurement, that those measurements, or collect data that need to be specially trained. This is necessary in order for the data collection to be valid, consistent and comparable. After this step are raw data, or also called primary data before. You have received this name because they were not prepared in any way and are not representative in this form.

Measurement plan

The measurement plan includes how data are collected most effectively and to whom is it disclosed for processing. It is defined by the metrics that have been previously selected. It is, the procedure from the measurement during which the raw data must be collected, such as.

Step 5: Collect, analyze and interpret data

In this step, the previously specified in the measurement plan raw data are collected. This step now describes the way in which the raw data are recorded. The main work is still not the collection of raw data, but the analysis and interpretation of the raw data, so that you get treated at the end of this step data, so-called secondary data. Raw data can be captured using a variety of processes:

  • Questionnaires
  • Datasheets
  • Interviews
  • Observation
  • Automated tools


Questionnaires can be queried semi-automatically via a web frontend on the Internet or intranet, or classic over sheets of paper. With questionnaires can be ideally experiences, perceptions and feelings capture.


Data sheets can also be queried semi-automatic or classic. The difference with questionnaires is that they are static and technical. So you can more accurately record technical degree.


Interviews are meetings with one or more persons. Interviews are more dynamic than previous methods because in addition to the pre-determined questions also additional input can be collected. The cost may be higher, but this may be worthwhile.


Observation means that a specially trained person (the observers) participating in the development process in the company. The observer under surveillance a defined process or an action of a process such as the preparation of reports or team collaboration. The observation may, depending on the process size, take a few weeks to years. The results of this method are recorded in a logbook.

Automated tools

Automated tools can not always be used, but make the job easier and faster. Automatic data collection particularly is used in all processes whose output (eg source code) is already available in electronic form.


Regardless of the method used, the captured raw data must be validated and processed before they can be used for analysis. Validate means not only the pure Checking the raw data for correctness, but also the check for completeness and consistency in this context. It is often the case that outliers are present in the raw data. Outliers are values ​​that differ significantly from the remaining collected values. These need to be tracked, i.d.R. be automated, and removed as they would otherwise distort the measurement result.


Once present valid raw data begins the section of the analysis. The data analysis is required in order to obtain measurement results. The validated and analyzed measurement results then in turn help the measurement objectives (or goals GQM ) to drive and initiate improvements. Here you can see very well the bottom-up interpretation of the GQM model.

Step 6: summarize and apply experiences

In this last step of the GQM model, all results previously obtained are bundled together with a description. There are again two types of results bundling:

  • Measurement results
  • Lessons Learned

Measurement results

Measurement results in the form of validated and analyzed data are with the completion of the third step. These are summarized here again and are available for further processing.

Lessons Learned

Lessons Learned is a compressed collection of experiences, developments, information, errors, risks, etc., which were made during a process. They are bundled together in lessons learned in order to use them at a later date in a similar situation, or for the same problem again can. In contrast to the measurement results, lessons learned are more of a qualitative evaluation.


The Goal-Question - Metric model is a model quality assurance and improvement of the quality of processes, which was developed by Dr. Victor R. Basili. GQM is not dedicated to a specific process, but versatile. It helps technical how to analyze personal processes. It is a goal-oriented model, which is constructed in six steps. The first three steps also call themselves " definition phase ". In the definition phase, firstly objectives ( goals ) are defined which are to be achieved. Questions (questions ) help to specify the objectives better and metrics ( metrics ) are defined in order to make the process measurable. The last three steps are also referred to "interpretation " phase. In this phase, a plan is created that describes how the necessary measurement data for the specified in the definition phase metrics are being collected. Using the plan, the raw data are recorded, then validated and analyzed. Finally, the results gained are held in order to apply them again and can initiate improvement measures. A co- writing the results in the form of "lessons learned" is also a common measure.