Funktionaalisen testauksen kehittäminen web-sovellukselle Robot Frameworkilla
Mäkäräinen, Sami (2024)
Mäkäräinen, Sami
2024
Automaatiotekniikan DI-ohjelma - Master's Programme in Automation Engineering
Tekniikan ja luonnontieteiden tiedekunta - Faculty of Engineering and Natural Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2024-12-10
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-2024111110099
https://urn.fi/URN:NBN:fi:tuni-2024111110099
Tiivistelmä
Testaus on tärkeä osa mitä tahansa ohjelmistoprojektia. Testauksen avulla saadaan tietoa ohjelman toimintavarmuudesta ja löydetään vikoja ennen kuin ne ehtivät aiheuttaa suurempia kustannuksia. Tavanomainen manuaalinen testaus on kuitenkin aikaa vievää ja siksi tähän on noussut ratkaisuksi testiautomaatio. Testiautomaatio mahdollistaa ohjelmiston laadunvarmistuksen modernissa ketterässä ohjelmistokehityksessä. Testiautomaatiota varten on kehitetty monia työkaluja, joista yksi on web-sovellustestaukseen tehty Robot Framework. Tässä diplomityössä tutkitaan keinoja kehittää testiautomaatiota käyttöliittymätasolla käyttäen Robot Frameworkia ja sen Browser Libraryä.
Työn tavoitteena on tutkimuksen avulla parantaa aiempaa SeleniumLibraryllä toteutettua web-sovelluksen käyttöliittymätestausta. Tähän tavoitteeseen pääsemiseksi teoriaosissa tutustutaan ohjelmistotestaukseen erityisesti ketterän kehityksen näkökulmasta. Lisäksi selvitetään, mikä tekee testauksesta laadukkaan. Selvinneistä asioista muodostuu työn tarkempi tavoite: luotettavuuden, ylläpidettävyyden ja nopeuden parantaminen. Työssä käytettäviä työkaluja, Robot Framework Browser -kirjastoa ja Page Object Model -suunnittelumallia, esitellään ja tutkitaan tarkemmin, jotta niiden hyödyntäminen olisi mahdollisimman tehokasta toteutusvaiheessa. Toteutusvaiheessa keskitytään testiautomaation kirjoittamiseen ja käyttöönottoon liittyviin vaiheisiin.
Työn lopussa käsitellään tuloksia ja arvioidaan ratkaisua. Tuloksissa todettiin, että parannuksia saatiin kaikissa testauksen kannalta kriittisissä osa-alueissa. Luotettavuutta parannettiin kattavuutta lisäämällä. Ylläpidettävyys koodin Page Object Model -mallin avulla ja tehokkailla avainsanoilla. Nopeuteen saatiin parannuksia vaihtamalla SeleniumLibrary Browser-kirjastoon ja poistamalla turhia testivaiheita. Testing is an essential part of any software project. Testing provides information about the reliability of the program and identifies defects before they can lead to larger costs. However, traditional manual testing is time-consuming, and thus test automation has emerged as a solution. Test automation enables software quality assurance in modern agile software development. Many tools have been developed for test automation, one of which is Robot Framework, designed for testing web applications. This thesis explores ways to develop test automation at the user interface level using Robot Framework and its Browser library.
The goal of this thesis is to improve the previous SeleniumLibrary implementation of user interface testing of the web application. To achieve this goal, the theory sections will examine software testing, particularly from the perspective of agile development. Additionally, it will investigate what makes testing high-quality. From the findings, the specific objectives of the work will be formed: improving reliability, maintainability, and speed. The tools used in the work, the Robot Framework Browser Library, and the Page Object Model design pattern are introduced and studied in more detail to enable their most effective utilization during the implementation phase. The implementation phase will focus on the steps related to writing and deployment of test automation.
The work concludes with an analysis of the results and an evaluation of the solution. The results indicated improvements in all critical aspects of testing. Reliability was enhanced by increasing coverage. Maintainability improved through the use of the Page Object Model and efficient keywords. Speed was improved by switching from SeleniumLibrary to Browser Library and by eliminating unnecessary test steps.
Työn tavoitteena on tutkimuksen avulla parantaa aiempaa SeleniumLibraryllä toteutettua web-sovelluksen käyttöliittymätestausta. Tähän tavoitteeseen pääsemiseksi teoriaosissa tutustutaan ohjelmistotestaukseen erityisesti ketterän kehityksen näkökulmasta. Lisäksi selvitetään, mikä tekee testauksesta laadukkaan. Selvinneistä asioista muodostuu työn tarkempi tavoite: luotettavuuden, ylläpidettävyyden ja nopeuden parantaminen. Työssä käytettäviä työkaluja, Robot Framework Browser -kirjastoa ja Page Object Model -suunnittelumallia, esitellään ja tutkitaan tarkemmin, jotta niiden hyödyntäminen olisi mahdollisimman tehokasta toteutusvaiheessa. Toteutusvaiheessa keskitytään testiautomaation kirjoittamiseen ja käyttöönottoon liittyviin vaiheisiin.
Työn lopussa käsitellään tuloksia ja arvioidaan ratkaisua. Tuloksissa todettiin, että parannuksia saatiin kaikissa testauksen kannalta kriittisissä osa-alueissa. Luotettavuutta parannettiin kattavuutta lisäämällä. Ylläpidettävyys koodin Page Object Model -mallin avulla ja tehokkailla avainsanoilla. Nopeuteen saatiin parannuksia vaihtamalla SeleniumLibrary Browser-kirjastoon ja poistamalla turhia testivaiheita.
The goal of this thesis is to improve the previous SeleniumLibrary implementation of user interface testing of the web application. To achieve this goal, the theory sections will examine software testing, particularly from the perspective of agile development. Additionally, it will investigate what makes testing high-quality. From the findings, the specific objectives of the work will be formed: improving reliability, maintainability, and speed. The tools used in the work, the Robot Framework Browser Library, and the Page Object Model design pattern are introduced and studied in more detail to enable their most effective utilization during the implementation phase. The implementation phase will focus on the steps related to writing and deployment of test automation.
The work concludes with an analysis of the results and an evaluation of the solution. The results indicated improvements in all critical aspects of testing. Reliability was enhanced by increasing coverage. Maintainability improved through the use of the Page Object Model and efficient keywords. Speed was improved by switching from SeleniumLibrary to Browser Library and by eliminating unnecessary test steps.