WWW-pohjaisen sovelluksen automatisoitu testaus ja sitä edistävät ohjelmointikäytännöt
Pesonen, Ville (2008)
Kandidaatintyö
Pesonen, Ville
2008
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi-fe200805161400
https://urn.fi/URN:NBN:fi-fe200805161400
Tiivistelmä
Ohjelmistotestauksen avulla voidaan tarkastella sovelluksen vastaavuutta vaatimuksiin. Tavoitteena on löytää sovelluksesta virheitä, ja siten parantaa sovelluksen laatua. Sovelluksen laatu voidaan määritellä useilla mittareilla, kuten esimerkiksi testattavuudella. Tässä työssä tarkastellaan WWW-sovelluksen automatisoidun testauksen toteutusta, jossa käytetään apuna testauskehystä. Automatisoituun testaukseen kuuluu testitapausten suunnittelu sekä toteutus, joiden lopputuloksena on uudelleenajettavia testitapauksia. Testaus keskittyy sovelluksen toiminnallisuuteen ja jättää tietokantaan päivitettävien tietojen tarkastamisen tekemättä. Testaus suoritetaan ilman tarkempaa tietoa sovelluksen sisäisestä toiminnasta. Testattava sovellus on Mobilding-hankkeessa toteutettu WWW-sovellus, jonka avulla hallinnoidaan rakennuksen elementtejä. Työssä vertaillaan WWW-sovelluksen käyttöliittymän testaukseen soveltuvia testauskehyksiä, ja pyritään tuomaan esille niiden ominaispiirteitä. Työn tuloksena on uudelleensuoritettavia testitapahtumia. Lisäksi pohditaan ohjelmointikäytäntöjä, joilla voidaan edistää automatisoitua testausta. Ohjelmointikäytännöt perustuvat työn toteutuksen aikana havaittuihin ongelmiin. Software testing can be used to inspect whether the implementation conforms to requirements. The objective is to find errors in the application thus improving the quality of the application. The quality of an application can be defined with number of indicators, for example testability. This work regards the implementation of an automated testing of a WWW application with the help of a testing framework. Automated testing includes test case design and implementation, which result in reusable test cases. The testing focuses on the functionality of the WWW application and leaves out the checking of the updated information from the database. The testing is done without further knowledge about the inner workings of the application. The application being tested is a WWW application implemented in Mobilding-project. The application is used to manage the elements of a building. This work compares the frameworks suitable for testing the user interface of a WWW application and tries to bring out the characteristics of each one. The results of this work are reusable test cases. Furthermore programming practices which can be used to promote automated testing are discussed. The programming practices are based on the problems found during the implementation phase of the work.