Test à partir de spécifications axiomatiques - TEL - Thèses en ligne Accéder directement au contenu
Thèse Année : 2007

Testing from axiomatic specifications

Test à partir de spécifications axiomatiques

Résumé

Testing is a very common practice in the software development process. The testing activity consists in executing the software on a subset of all its possible inputs in order to detect failures. A failure is detected when the software behaviour does not conform to its expected behaviour, represented or described by a reference object. The testing process is usually decomposed into three phases: the selection of the subset of inputs on which the software will be executed, the submission of these inputs to the software, collecting the outputs (the software answers) and the decision of the relevance of these outputs, when compared to the expected ones.

The selection of inputs to submit to the software can be performed according to different approaches. When the test set selection phase is based on a reference object describing more or less formally the software expected behaviour, without any knowledge about the implementation, testing is said to be "black-box". Among the different black-box testing approaches, a formal framework has been defined for the one using as a reference object a logical specification of the system under test.

The general framework for testing from logical (or axiomatic) specifications fixes the conditions and the hypotheses under which it is possible to test a system. The first hypothesis consists in considering the system under test as a formal model implementing the operations behaviour of which is described in the specification. The second hypothesis concerns the observability of the system under test. To be a test case, a formula has to be interpreted by the system under test. Then the form of formulas that the system is able to interpret must be fixed. These formulas usually do not contain variables. Once these hypotheses are set, we have an initial test set, the set of all observable formulas that are logical consequences of the specification.

The first result to establish is the exhaustiveness of this set, that is its ability to prove the system correctness if it could be submitted in its whole. The exhaustive test set is usually of infinite size, a selection phase is then needed in order to choose a test set of finite and reasonable size to submit to the system. Several approaches are possible. The approach followed in my thesis, called partition testing, consists in dividing the initial exhaustive test set into test subsets, according to a certain selection criterion corresponding to a functionality or a characteristic of the system under test. Once this partition is fine enough, building a test set consists in choosing one test case in each obtained subset, thus applying the uniformity hypothesis (test cases in a test set all are equivalent to make the system fail). The second result to establish is to show that the division of the initial test set do not add (procedure correctness) neither lose (completeness) any test case.

In the algebraic specification framework, a method that has extensively been studied, called axiom unfolding, consists in making a case analysis of the specification. Until now, this method was based on equational specifications whose axioms had the characteristic to be positive conditional (a conjunction of axioms implies an equation).

My PhD work was aimed at extending and adapting this test selection framework to dynamic systems specified in an axiomatic formalism, namely first-order modal logic. The first step was to generalise the selection method that has been defined for positive conditional equational specifications to first-order specifications. This testing framework was then adapted to first-order modal specifications. The first specification formalism considered was a modal extension of positive conditional logic for which the testing framework has been defined. Once the framework has been adapted to positive conditional modal specifications, it could be generalised to first-order modal specifications.

In each of these formalisms, we achieved two goals. On the one hand, we studied the necessary conditions to impose to the specification and the system under test in order to obtain the exhaustiveness of the initial test set. On the other hand, we adapted and extended the selection procedure by axiom unfolding to these formalisms and showed its correctness and completeness. In the two general frameworks of first-order and first-order modal specifications, we showed that the conditions required for the exhaustiveness of the initial test set were minor because they were easy to ensure in practice. This ensures a satisfying generalisation of test selection in this setting.
Le test est l'une des méthodes les plus utilisées pour la validation du logiciel. L'activité de test consiste à exécuter le logiciel sur un sous-ensemble de ses entrées possibles de manière à déceler d'éventuelles erreurs. La présence d'erreurs est établie par confrontation du comportement du logiciel avec un objet de référence. Le processus de test est généralement décomposé en trois phases : la sélection du sous-ensemble des entrées sur lequel le logiciel sera exécuté, la soumission de ces entrées au logiciel en collectant les sorties (les réponses du logiciel) et la décision de l'adéquation de ces sorties avec les sorties attendues.

La sélection des données à soumettre au logiciel peut être effectuée selon différentes approches. Lorsque la phase de sélection d'un jeu de tests est opérée à partir d'un objet de référence décrivant plus ou moins formellement le comportement du logiciel, sans connaissance de l'implantation elle-même, on parle de test « boîte noire ». Une des approches de test boîte noire pour laquelle un cadre formel a été proposé est celle qui utilise comme objet de référence une spécification logique du système sous test.

Le cadre général de test à partir de spécifications logiques (ou axiomatiques) pose les conditions et les hypothèses sous lesquelles il est possible de tester un système. La première hypothèse consiste à considérer le système sous test comme un modèle formel implantant les opérations dont le comportement est décrit par la spécification. La seconde hypothèse a trait à l'observabilité du système sous test. Il faut fixer la forme des formules qui peuvent être interprétées par le système, c'est-à-dire qui peuvent être des tests. On se restreint généralement au moins aux formules qui ne contiennent pas de variables. Une fois ces hypothèses de test posées, on dispose d'un jeu de tests initial, celui de toutes les formules observables qui sont des conséquences logiques de la spécification.

Le premier résultat à établir est l'exhaustivité de cet ensemble, c'est-à-dire sa capacité à prouver la correction du système s'il pouvait être soumis dans son intégralité. Le jeu de tests exhaustif étant le plus souvent infini, une phase de sélection intervient afin de choisir un jeu de tests de taille finie et raisonnable à soumettre au système. Plusieurs approches sont possibles. L'approche suivie dans ma thèse, dite par partition, consiste a diviser le jeu de tests exhaustif initial en sous-jeux de tests, selon un certain critère de sélection relatif à une fonctionnalité ou à une caractéristique du système que l'on veut tester. Une fois cette partition suffisamment fine, il suffit de choisir un cas de test dans chaque sous-jeu de test obtenu en appliquant l'hypothèse d'uniformité (tous les cas de test d'un jeu de test sont équivalents pour faire échouer le système). Le deuxième résultat à établir est que la division du jeu de tests initial n'ajoute pas (correction de la procédure) et ne fait pas perdre (complétude) de cas de test.

Dans le cadre des spécifications algébriques, une des méthodes de partition du jeu de tests exhaustif qui a été très étudiée, appelée dépliage des axiomes, consiste à procéder à une analyse par cas de la spécification. Jusqu'à présent, cette méthode s'appuyait sur des spécifications équationnelles dont les axiomes avaient la caractéristique d'être conditionnels positifs (une conjonction d'équations implique une équation).

Le travail de ma thèse a eu pour but d'étendre et d'adapter ce cadre de sélection de tests à des systèmes dynamiques spécifiés dans un formalisme axiomatique, la logique modale du premier ordre. La première étape a consisté à généraliser la méthode de sélection définie pour des spécifications équationnelles conditionnelles positives aux spécifications du premier ordre. Ce cadre de test a ensuite été d'adapté à des spécifications modales du premier ordre. Le premier formalisme de spécification considéré est une extension modale de la logique conditionnelle positive pour laquelle le cadre de test a été initialement défini. Une fois le cadre de test adapté aux spécifications modales conditionnelles positives, la généralisation aux spécifications modales du premier ordre a pu être effectuée.

Dans chacun de ces formalismes nous avons effectué deux tâches. Nous avons d'une part étudié les conditions nécessaires à imposer à la spécification et au système sous test pour obtenir l'exhaustivité du jeu de tests initial. Nous avons d'autre part adapté et étendu la procédure de sélection par dépliage des axiomes à ces formalismes et montré sa correction et sa complétude. Dans les deux cadres généraux des spécifications du premier ordre et des spécifications modales du premier ordre, nous avons montré que les conditions nécessaires à l'exhausitivité du jeu de test visé étaient mineures car faciles à assurer dans la pratique, ce qui assure une généralisation satisfaisante de la sélection dans ce cadre.
Fichier principal
Vignette du fichier
TheseLonguet.pdf (1.32 Mo) Télécharger le fichier

Dates et versions

tel-00258792 , version 1 (25-02-2008)

Identifiants

  • HAL Id : tel-00258792 , version 1

Citer

Delphine Longuet. Test à partir de spécifications axiomatiques. Génie logiciel [cs.SE]. Université d'Evry-Val d'Essonne, 2007. Français. ⟨NNT : ⟩. ⟨tel-00258792⟩
259 Consultations
93 Téléchargements

Partager

Gmail Facebook X LinkedIn More