Yksikkö- ja integraatiotestien yhdistäminen jatkuvan integraation putkeen GitHubissa
Thornberg, Mikael (2022)
Thornberg, Mikael
2022
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2022121730699
https://urn.fi/URN:NBN:fi:amk-2022121730699
Tiivistelmä
Yksikkö- ja integraatiotestaus ovat menetelmiä, joilla varmistetaan, että ohjelmisto toimii odotetulla tavalla. Jatkuva integraatio (CI) on ohjelmistokehityksessä käytetty käytäntö, minkä tarkoituksena on automatisoida koodimuutosten yhdistäminen yhteiseen päähaaraan tietovarastossa.
Tämän opinnäytetyön tavoitteena oli toteuttaa Proof of Concept -ohjelma, jonka yksikkö- ja integraatiotestit suoritetaan luodussa jatkuvan integraation putkessa GitHubin tarjoamalla Actions alustalla. Teoreettisessa osassa opinnäytetyötä tarkastellaan GitHubin Actions alustan ominaisuuksia ja muita käytettyjä teknologioita PoC-ohjelmassa. Tämän lisäksi työssä perehdytään syvällisemmin yksikkö- ja integraatiotestaamiseen parhaimpiin käytäntöihin ja niiden tuomiin etuihin sovelluskehityksessä.
Opinnäytetyön tuloksena saatiin suunniteltua Proof of Concept -ohjelma valmiiksi. Ohjelmalle tehtiin yksikkötestejä, joita päästiin ajamaan luodussa CIputkessa käyttäen GitHubin Actions alustaa. Actions todettiin toimivaksi alustaksi jatkuvan integraation putken toteuttamiseksi ohjelmistoprojekteille riippumatta ohjelmointikielestä ja ajoympäristöstä. Unit and integration testing are methods which are used to ensure that the software works as expected. Continuous integration (CI) is a practice used in software development to automate the merging of code changes to a common main branch in the remote repository.
The purpose of this thesis was to implement a Proof of Concept application on which unit and integration tests are run on created continuous integration pipeline in GitHub’s Actions platform. The theoretical part of the thesis examines the features of GitHub Actions and other used technologies in the Proof of Concept application. In addition, the thesis examines more in-depth unit and integration testing best practices and the benefits that they bring in the process of developing software.
As a result of the thesis, the planned Proof of Concept application was completed. Unit tests were created for the program, which were successfully run in the created pipeline using the GitHub Actions platform. Actions platform was verified as a suitable platform for implementing a continuous integration pipeline for software projects regardless of the programming language and the runtime.
Tämän opinnäytetyön tavoitteena oli toteuttaa Proof of Concept -ohjelma, jonka yksikkö- ja integraatiotestit suoritetaan luodussa jatkuvan integraation putkessa GitHubin tarjoamalla Actions alustalla. Teoreettisessa osassa opinnäytetyötä tarkastellaan GitHubin Actions alustan ominaisuuksia ja muita käytettyjä teknologioita PoC-ohjelmassa. Tämän lisäksi työssä perehdytään syvällisemmin yksikkö- ja integraatiotestaamiseen parhaimpiin käytäntöihin ja niiden tuomiin etuihin sovelluskehityksessä.
Opinnäytetyön tuloksena saatiin suunniteltua Proof of Concept -ohjelma valmiiksi. Ohjelmalle tehtiin yksikkötestejä, joita päästiin ajamaan luodussa CIputkessa käyttäen GitHubin Actions alustaa. Actions todettiin toimivaksi alustaksi jatkuvan integraation putken toteuttamiseksi ohjelmistoprojekteille riippumatta ohjelmointikielestä ja ajoympäristöstä.
The purpose of this thesis was to implement a Proof of Concept application on which unit and integration tests are run on created continuous integration pipeline in GitHub’s Actions platform. The theoretical part of the thesis examines the features of GitHub Actions and other used technologies in the Proof of Concept application. In addition, the thesis examines more in-depth unit and integration testing best practices and the benefits that they bring in the process of developing software.
As a result of the thesis, the planned Proof of Concept application was completed. Unit tests were created for the program, which were successfully run in the created pipeline using the GitHub Actions platform. Actions platform was verified as a suitable platform for implementing a continuous integration pipeline for software projects regardless of the programming language and the runtime.