Return to search

Automatiserad testning av webbapplikationer / Automated testing of web applications

Webbapplikationer blir allt mer komplexa och avancerade. Bara några år tillbaka var det största ändamålet med webbapplikationer att servera statiskt innehåll. Sedan dess har tillämpningen vuxit och lika så dess komplexitet. Det finns till och med projekt som försöker utnyttja webbläsare som operativsystem och i takt med att komplexiteten ökar, ökar även testningens betydelse. En annan anledning till att testning inom just webbutvecklingen är så pass viktig är för att stor del av koden exekveras hos klienten vilka kan använda olika typer av interpretatorer för tolkning av exempelvis Javascript och CSS. För att eliminera risker bör koden testas för dessa interpretatorer och renderingsmotorer innan koden når slutanvändaren. En vanlig metod för att minimera förekomsten av defekter är testning. En variant är automatiserad testning som bygger på att interaktion med applikationen eller delar av applikationen simuleras från en användares perspektiv utan mänsklig inblandning. Det är detta som denna rapport behandlar och utgår ifrån frågeställningen: vilka möjligheter finns det att automatisera testning av webbapplikationer? Genom litteraturstudier och egenutveckling har lösningar på olika problem arbetats fram och det har visat sig att en av de större tekniska svårigheterna är hur man kan få stor täckningsgrad bland webbläsare för de testningstyper som kräver en webbläsares inblandning, exempelvis enhetstestning av klient-Javascript, acceptanstestning och GUI-testning. Det har även visat sig att kommunikationen och möjligheten att ta gemensamma beslut mellan olika utvecklare/testare spelar en stor roll för att testningsprocessen skall kunna införas i en organisation med lyckat resultat. En missuppfattning kan vara att testning skall lösa alla problem och finna alla defekter, något som i praktiken inte är sant. Testning bör ses som ett moment för att ge en tryggare utvecklingsmiljö och ge högre kvalité på applikationen och framförallt källkoden. Kontentan är dock att det inte finns något ”rätt” sätt att utföra testning på utan organisationen måste själv hitta det sätt som passar bäst för dem. / Web-applications have recently become increasingly complex and more and more companies tend to shift from traditional desktop applications to web-based applications. The more complex an application tends to become, the more defects tend to occur. This applies not only during development but also during maintenance. A common method to minimize the number of defects is by testing, for instance by automated testing that simulate interactions with an application, or parts of an application, from a user's perspective without human intervention. The aim of this thesis is to review the difficulties with automated testing of web-applications. The report focuses on client-side Javascript and Python as server-side language. This thesis has shown that one of the major, technical, difficulty is how to execute test cases that require a web browser, such as unit testing of client-Javascript, acceptance testing and GUI testing, and how these test case can be executed in browsers on remote machines. It has also been found that the communication and the ability to make joint decisions between different developers/testers have a major impact if the testing process can be introduced in an organization successfully. A misconception may be that testing will solve all problems and find all defects – that is, unfortunately, not true. Testing should be seen as a tool to give developers more confidence and provide a higher quality of the application. The bottom line is that there is no "right" way to perform testing; organization must find the way that works best for them.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-107883
Date January 2014
CreatorsKarlsson, Oskar
PublisherLinköpings universitet, Institutionen för datavetenskap, Linköpings universitet, Tekniska högskolan
Source SetsDiVA Archive at Upsalla University
LanguageSwedish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0025 seconds