Creating and automating browser based tests for a web-application in maintenance
Martas, Ville (2023)
Diplomityö
Martas, Ville
2023
School of Engineering Science, Tietotekniikka
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi-fe2023061956936
https://urn.fi/URN:NBN:fi-fe2023061956936
Tiivistelmä
Automation of the development process is essential for modern software projects. Deploying a software application usually requires the same predictable actions and introducing automation to a project could reduce the time between deploying new versions and decrease the number inevitable human errors that happen because of manual processes. As software projects grow and maintaining gets more difficult, the importance of software testing also increases. Testing all the different views and functionality of an application that has been developed for over two decades would take a lot of time to test manually, although creating automated tests for all the features would also require a considerable investment.
This thesis investigates if value can be gained from introducing development process automation and testing to a software project that is already in the maintenance phase. Selenium Webdriver is used for creating a browser automation test suite prototype. The test suite is later automated to the development process of the application by using Azure DevOps Pipelines services. Results show that introducing automation to the project offers noticeable improvements in the development process and that a test framework can be created for an existing project. The challenges that were faced were regarding the end-to-end test cases themselves. Tests running on the browser were occasionally failing because of reasons not directly related to the functionality of the application under testing, which produced unreliable test results. Getting the tests from failing back to passing would often require changes to the tests themselves or the environment where the application is running, not to the application under testing itself. Kehitysprosessin automatisointi on olennainen osa moderneja ohjelmistoprojekteja. Sovelluksen julkaisu vaatii yleensä samat ennustettavat toimenpiteet, ja automaation käyttöönotto projektiin voi lyhentää uusien versioiden julkaisuväliä ja vähentää manuaalisista prosesseista aiheutuvien väistämättömien inhimillisten virheiden määrää. Ohjelmistoprojektien kasvaessa myös ylläpito vaikeutuu, ja ohjelmistotestauksen merkitys korostuu. Kaikkien eri näkymien ja toiminnallisuuksien testaaminen sovelluksessa, jota on kehitetty yli kahden vuosikymmenen ajan veisi paljon aikaa testata manuaalisesti, vaikkakin automatisoitujen testien luominen kaikille ominaisuuksille vaatisi myös merkittäviä investointeja.
Tässä lopputyössä selvitetään, voidaanko lisäarvoa saada kehitysprosessin automatisoinnista ja automatisoiduista testeistä, kun kyseessä on jo ylläpitovaiheessa oleva ohjelmistoprojekti. Selenium Webdriveria käytetään selainpohjaisen testiprojektin prototyypin luomiseen. Testisarja automatisoidaan myöhemmin sovelluksen kehitysprosessiin Azure DevOps Pipelines -palveluiden avulla. Tulokset osoittavat, että automaation käyttöönotto projektiin parantaa kehitysprosessissa ja että toimivat testiprojekti voidaan luoda ylläpidossa olevalle ohjelmistoprojektille. Kohdatut haasteet koskivat pääasiassa itse testitapauksia. Selaimessa suoritettavat testit epäonnistuivat ajoittain syistä, jotka eivät olleet suoraan yhteydessä testattavan sovelluksen toiminnallisuuteen, mikä tuotti epäluotettavia testituloksia. Testien havaitsemien ongelmien korjaus vaati usein muutoksia itse testeihin tai ympäristöön, jossa sovellus oli julkaistu eikä itse sovellukseen johon testaus kohdistui.
This thesis investigates if value can be gained from introducing development process automation and testing to a software project that is already in the maintenance phase. Selenium Webdriver is used for creating a browser automation test suite prototype. The test suite is later automated to the development process of the application by using Azure DevOps Pipelines services. Results show that introducing automation to the project offers noticeable improvements in the development process and that a test framework can be created for an existing project. The challenges that were faced were regarding the end-to-end test cases themselves. Tests running on the browser were occasionally failing because of reasons not directly related to the functionality of the application under testing, which produced unreliable test results. Getting the tests from failing back to passing would often require changes to the tests themselves or the environment where the application is running, not to the application under testing itself.
Tässä lopputyössä selvitetään, voidaanko lisäarvoa saada kehitysprosessin automatisoinnista ja automatisoiduista testeistä, kun kyseessä on jo ylläpitovaiheessa oleva ohjelmistoprojekti. Selenium Webdriveria käytetään selainpohjaisen testiprojektin prototyypin luomiseen. Testisarja automatisoidaan myöhemmin sovelluksen kehitysprosessiin Azure DevOps Pipelines -palveluiden avulla. Tulokset osoittavat, että automaation käyttöönotto projektiin parantaa kehitysprosessissa ja että toimivat testiprojekti voidaan luoda ylläpidossa olevalle ohjelmistoprojektille. Kohdatut haasteet koskivat pääasiassa itse testitapauksia. Selaimessa suoritettavat testit epäonnistuivat ajoittain syistä, jotka eivät olleet suoraan yhteydessä testattavan sovelluksen toiminnallisuuteen, mikä tuotti epäluotettavia testituloksia. Testien havaitsemien ongelmien korjaus vaati usein muutoksia itse testeihin tai ympäristöön, jossa sovellus oli julkaistu eikä itse sovellukseen johon testaus kohdistui.
