Sammendrag
Masteroppgåva prøver å besvara problemstillingar om val av testteknikkar for testing og feilsøking generelt, samt korleis Riksarkivet sitt SAS-program Arkade best bør testast/feilsøkast.
Testteknikkar har innverknad på kva for feil som blir funne, og i praksis opplever mange testarar at ulike testteknikkar er komplementære til kvarandre (dei finn ulike feil). Men det er også mange andre forhold som har innverknad, og ofte er det uråd å fastslå forklaringsvariablane sin relative innverknad.
Det er mange forhold som er felles for testing og debugging for dei generelle og spesielle problemstillingane. Det indikerer at desse forholda er allmengyldige. Eksempler på slike forhold er utføringen av ein testteknikk, testverktøy, den enkelte feil sin natur, det tekniske testmiljøet, innstillinga til å finna feil, testkompetanse, utviklingsmetodikk og programmerngsstil.
Eg har valt testteknikken utforskande testing som utgangspunkt for å testa Arkade direkte eller til å finna andre testteknikkar som passar til ulike situasjonar. Oppgåva diskuterer fordeler og ulemper med denne testteknikken. Eg brukar testteknikken til å utvikla ein testteknikk for å analysera SAS-loggen. Hensikten er å kvalitetssikra og effektivisera gjennomgangen av SAS-loggen etter kodeeksekvering. Eg brukar også utforskande testing til design av testtilfelle for dynamisk testing av Arkade.
Rapporten konkluderer med at Arkade kan bli lettare testbar ved å forbetra programmeringsstilen. Eit anna forslag er bruk av globale makrovariablar til erstatning for bortkommentering av testkode, slik at aktivering og deaktivering av bortkommentering av testkode i kjeldekoden enkelt kan gjerast ved berre å endra verdien på ein makrovariabel. Rapporten foreslå også at Arkade-applikasjonen bør få implementert større robustheit for feilhåndtering. Kvar makro bør få si eiga programfil, slik at makroane blir lettare å finna når ein treng dei. Applikasjonen kan også gjerast meir testbar ved å aktivera ei rekke systemopsjonar i SAS som gjer at innebygd funksjonalitet for debugging blir brukt.
Dynamisk testing av Arkade ved eksekvering av 23 testtilfelle har avdekka 9 feil. 14 testtilfelle køyrde feilfritt. 1 feil er ikkje funne årsaken til. 8 av feila er kategorisert som dårleg feilhåndtering (2 feil), feil i ein spesifikk del av programmet (3 feil) og for dårleg validering (3 feil) av samsvar mellom inndata-filer (datafiler og metadatafil).
The master thesis tries to answer research questions regarding choice of testing techniques to test and debug programs in general, and also how the SAS-program Arkade belonging to the Norwegian National Archives should be tested and debugged.
The choice of testing technique does influence which faults are detected, and many testers experience that different techniqes complement each other. But there are also many other circumstances that matters, and often it is not possible to say how much each factor implies on the total result.
Many of the factors identified are common both for the general and specific research questions studied in this thesis. This indicates that theese factors are of general importance. Examples of such factors are the execution of a testing technique, the testing tool, the nature of the fault, the test environment, the mindsett of the tester, testing experience and test competence, the development method and the programming style
I have selected Exploratory Testing as a starting point for the testing of Arkade. Either by using it directly or by using it to find other techniques which is regarded best suited for the different situations that might appear. The master thesis discusses advantages and disadvantages with this technique. By means of Exploratory Testing I have developed a testing technique for quality assurance of the walkthrough of the SAS log. I have also used Exploratory Testing to design testcases for dynamic testing of Arkade.
The master thesis concludes that Arkade can be more testable by improving the programming style. Another proposal is to use global macrovariables to substitute the comments in the code which masks a lot of code to test the program. Then the testing code can be easily activated and deactivated just by changing the value of the macro variable. The report also suggests to implement better error handling. Every macro should get its very own program file to simplify the process of finding the macro definition when needed. The Arkade application can be made more testable also by activating quite a lot of system options in SAS to make use of built-in features for testing/debugging purpose.
Dynamic testing of Arkade by executing 23 testcases has revealed 9 faults. 14 testcases ran without any faults. For 1 fault I have not found the cause for the failure. 8 of the faults are classified as improper error handling (2 faults), fault in one specific part of the program (3 faults) and too bad validation (3 faults) of possible mismatch between input-files (data files and the metadata file).