Return to search

Test suite optimisation based on response status codes and measured code coverage

A software test suite often comprises of thousands of distinct test cases. Therefore, the execution of an unoptimised test suite might waste valuable time and resources. In order to avoid the unnecessary execution of redundant test cases, the test suite should be optimised to contain fewer test cases. This thesis focuses on the optimisation efforts of a commercially available Hypertext Transfer Protocol (HTTP) fuzzing test suite.

A test setup was created for the optimisation purposes. The test setup consisted of the given fuzzing test suite, five different HTTP server implementations used as test subjects, and a code coverage measurement tool. Test runs were executed against the five test subjects with the test suite, and at the same time code coverage was measured from the test subjects.

In this thesis, three different types of test suite optimisation algorithms were implemented. The original test suite was optimised by applying the optimisation algorithms to the results of the test runs. Another set of test runs were performed with the optimised subset suites, while again measuring code coverage from the same test subjects. All of the coverage measurement results are presented and analysed. Based on the code coverage analysis, the test suite optimisation algorithms were assessed and the following research results were obtained.

Code coverage analysis demonstrated with a strong degree of certainty that a variation in the response messages indicates which test cases actually exercise the test subject. The analysis showed also with a quite strong degree of certainty that an optimised test suite can achieve the same level of code coverage which was attained with the original test suite. / Ohjelmistojen testisarja koostuu usein tuhansista erilaisista testitapauksista. Testisarjan suorittamisessa voi mennä hukkaan arvokasta aikaa ja resursseja, jos testisarjaa ei optimoida. Testisarja tulee optimoida siten, että se sisältää vähän testitapauksia, jotta epäolennaisten testitapausten tarpeeton suoritus vältetään. Tämä diplomityö keskittyy kaupallisesti saatavilla olevan Hypertext Transfer Protocol (HTTP) -palvelimien fuzz-testisarjan optimointiyrityksiin.

Optimointia varten luotiin testiympäristö, joka koostuu fuzz-testaussarjasta, testikohteina käytetyistä viidestä HTTP-palvelimesta ja koodikattavuuden mittaustyökalusta. Ennalta määriteltyä testisarjaa käytettiin testikohteille suoritetuissa testiajoissa, joiden aikana mitattiin testikohteista koodikattavuus.

Diplomityössä toteutettiin kolme erilaista testisarjan optimointialgoritmia. Alkuperäinen testisarja optimoitiin käyttämällä algoritmeja testiajojen tuloksiin. Optimoiduilla osajoukkosarjoilla suoritettiin uudet testiajot, joiden aikana mitattiin testikohteista koodikattavuus. Kaikki koodikattavuusmittaustulokset on esitetty ja analysoitu. Kattavuusanalyysin perusteella arvioitiin testisarjan optimointialgoritmien toimivuus ja saavutettiin seuraavat tutkimustulokset.

Koodikattavuusanalyysin avulla saatiin varmuus siitä, että muutos vastausviesteissä ilmaisee, mitkä testitapaukset oikeasti käyttävät testikohdetta. Analyysilla saatiin myös kohtalainen varmuus siitä, että optimoidulla osajoukkosarjalla voidaan saavuttaa sama koodikattavuus, joka saavutettiin alkuperäisellä testisarjalla.

Identiferoai:union.ndltd.org:oulo.fi/oai:oulu.fi:nbnfioulu-201305201293
Date23 May 2013
CreatorsParttimaa, T. (Tuomas)
PublisherUniversity of Oulu
Source SetsUniversity of Oulu
LanguageEnglish
Detected LanguageEnglish
Typeinfo:eu-repo/semantics/masterThesis, info:eu-repo/semantics/publishedVersion
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess, © Tuomas Parttimaa, 2013

Page generated in 0.0025 seconds