Return to search

Behavioural comparison of test and field executions of video games / Beteendejämförelse av test- och fältkörningar av videospel

Software developers write tests to ensure that their application behaves as intended. However, the behaviour of an application in production may deviate from the behaviours that are tested. This difference between test and field executions is rarely assessed in practice. Yet, it can be useful in identifying opportunities for the improvement of the test suite. In this thesis, we propose a technique for monitoring the test and field executions of video games. We derive three models to represent the observed behaviours. The first model is method coverage, which enumerates the methods invoked by the test suite, as well as those triggered as a result of player interactions in production. The second model, temporal call chains, identifies the sequences of method calls, in the order of invocation, that arise from test and field executions. The third model, stack call chains, gives additional context into the distinct ways in which each method is triggered by the test suite and in the field. We implement our technique for observing test and field executions of video games in a tool called Ailinea. Ailinea is a video game mod that injects custom instrumentation into methods within C# games, in order to monitor their invocation. We use Ailinea with two popular, real-world video games: Demeo which is developed by Resolution Games, and Osu!, which is open-source. We monitor the execution of Demeo and Osu! with Ailinea in both test and field environments. We successfully derive the three models from the field and test behaviours of the two games, captured by Ailinea. Moreover, all three models identify untested software behaviours, that represent opportunities for improvement of the test suite of each game. In total, we find 139 untested methods, as well as 5, 108 temporal chains and 371 stack chains that occur in the field but are not exercised by the test suites of the two games. Furthermore, in order to automatically propose new test scenarios for Demeo, we extend Ailinea to capture game events in the field, in addition to the stack call chains. Our interview with three Demeo developers indicates that the information contained in these test scenarios can facilitate test suite improvement. The use of mods for runtime observability of video games can have applications such as automated test generation and detection of invalid video game states, paving the way for further work in this direction. / Mjukvaruutvecklare skriver tester för att säkerställa att deras applikation fungerar som avsett. En applikations beteende i fjältet kan dock avvika från de beteenden som testas. Denna skillnad mellan test- och fältutföranden bedöms sällan i praktiken. Ändå kan det vara användbart för att identifiera möjligheter för förbättringar av testsviten. I det här examensarbetet föreslår vi en teknik för att övervaka tester och fältutföranden av videospel. Vi härleder tre modeller för att representera de observerade beteenden. Den första modellen är metodtäckning, som räknar upp de metoder som åberopas av testsviten, såväl som de som utlöses som ett resultat av spelarinteraktioner i produktionen. Den andra modellen, temporala anropskedjor, identifierar sekvenserna av metodanrop, i anropsordning, som uppstår från test- och fältutföranden. Den tredje modellen, stack anropskedjor, ger ytterligare kontext till de distinkta sätt på vilka varje metod utlöses av testsviten och i fält. Vi implementerar vår teknik för att observera test- och fältutföranden av videospel i ett verktyg som heter Ailinea. Ailinea är en videospelsmod som injicerar anpassad instrumentering i metoder inom C#-spel, för att övervaka deras anrop. Vi använder Ailinea med två populära, verkliga videospel: Demeo som är utvecklat av Resolution Games och Osu!, som är öppen källkod. Vi övervakar utförandet av Demeo och Osu! med Ailinea i både test- och fältmiljöer. Vi härleder framgångsrikt de tre modellerna från fältet och testar beteenden för de två spelen, fångad av Ailinea. Dessutom identifierar alla tre modellerna oprövade mjukvarubeteenden, som representerar möjligheter till förbättringar av testsviten för varje spel. Totalt hittar vi 139 oprövade metoder, såväl som 5, 108 temporala kedjor och 371 stackkedjor som förekommer på fältet men som inte utövas av testsviterna i de två spelen. Dessutom, för att automatiskt föreslå nya testscenarier för Demeo, utökar vi Ailinea för att fånga spelhändelser i fält, förutom stackanropskedjorna. Vår intervju med tre Demeo-utvecklare indikerar att informationen i dessa testscenarier kan underlätta förbättring av testsviten. Användningen av mods för körtidsobservation av videospel kan ha applikationer som automatisk testgenerering och upptäckt av ogiltiga videospelsstater, vilket banar väg för ytterligare arbete i denna riktning.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-330706
Date January 2023
CreatorsPorion, Chloé Marie
PublisherKTH, Skolan för elektroteknik och datavetenskap (EECS), Stockholm : KTH Royal Institute of Technology
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess
RelationTRITA-EECS-EX ; 2023:112

Page generated in 0.0023 seconds