Developing Device Adaptation for Model-Based Testing
Reinikainen, Osku (2014)
Reinikainen, Osku
2014
Signaalinkäsittelyn ja tietoliikennetekniikan koulutusohjelma
Tieto- ja sähkötekniikan tiedekunta - Faculty of Computing and Electrical Engineering
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ä
2014-03-05
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tty-201402211088
https://urn.fi/URN:NBN:fi:tty-201402211088
Tiivistelmä
Software testing is an important part of software development. In this work, a general testing interface which can be used to control separate test equipment is implemented. The purpose is to match the two different interfaces. This is done by implementing a higher-level interface which controls lower-level equipment. The thesis deals with general software development and its different levels. Different levels of automatic testing that are Capture and replay, scripts, data driven, keywords and action words and model-based testing, are presented. Model-based testing is dealt with more detail because the interface will become part of a system which is used for model-based testing. Automatic testing of a graphical user interface is dealt with separately because test devices are used and tested with this method. The implementation of the interface needs tools and image processing as a technical basis. Regarding the image processing, text recognition as well as the image and pattern recognition are dealt with because they are needed for the verification of the system state. Interfaces that are part of the tools are dealt with because the interface is implemented on them. These include fMBT (free Model-Based Testing) and TnT (Touch and Test). fMBT is a model-based testing system and TnT is OptoFidelity’s robotic testing system. Other tools include Android interface, AAL (Adapter Action Language), and Tesserac. Android interface can control system which contains Android mobile operating system. AAL is modeling language used by fMBT and Tesseract is OCR (Optical Character Recognition) engine used by fMBT. Interesting cases of the implementation are dealt with in more detail. The implementation is divided to functionalities of general, fMBT-version and TnT-version. Testing of the interface is dealt after these implementation problems. A few models were made to Google’s Gmail, Calendar, Google+ and Hangouts programs by using interface. These models were used for debugging of the programs and with their help logical mistakes of the interface were resolved. As a result, the fMBT version of the interface has been made to work and the TnT version has executed preliminary tests. The interface can be used with models and it is easy to change to another version. Ohjelmistotestaus on tärkeä osa ohjelmistokehitystä. Tässä työssä toteutetaan yleinen testausrajapinta, jonka avulla voidaan hallita useampaa erilaista testausjärjestelmää. Tarkoitus on saada sovitettua kaksi erilaista rajapintaa. Tämä tapahtuu toteuttamalla ylemmän tason rajapinta, jonka kautta alemman tason laitteistoja hallitaan. Työssä on käsitelty yleistä ohjelmistokehitystä ja sen eri tasoja. Automaattisesta testauksesta käsitellään nauhoita ja toista -skriptit, komentojonot, dataohjattu testaus, avain- ja toimisanat sekä mallipohjainen testaus. Mallipohjaista testausta käsitellään tarkemmin, sillä rajapinta tulee osaksi järjestelmää, jota käytetään mallipohjaiseen testaukseen. Erikseen käsitellään automaattinen graafisen käyttöliittymän testaus, koska testattavia laitteita käytetään ja testataan tällä menetelmällä. Rajapinnan toteutukseen tarvittavat tekniset perusteet liittyvät työkaluihin ja kuvankäsittelyyn. Kuvankäsittelystä käsitellään tekstin sekä kuvan- ja hahmontunnistus, joita tarvitaan järjestelmässä tilan varmennukseen. Työkaluista käsitellään rajapinnat joiden päälle rajapinta toteutetaan. Näitä ovat fMBT (free Model-Based Testing), joka on mallipohjainen testausjärjestelmä ja TnT (Touch and Test), joka on OptoFidelityn robottitestausjärjestelmä. Muita työkaluja ovat Android-rajapinta, jonka kautta voidaan hallita Android mobiilikäyttöjärjestelmällä varustettua laitetta, AAL (Adapter Action Language), joka on fMBT:n käyttämä mallinnuskieli sekä Tesseract, joka fMBT:n käyttämä tekstintunnistusmoottori. Rajapinnan toteutuksesta mielenkiintoiset tapaukset käsitellään tarkemmin. Toteutus jaotellaan yhteisiin, TnT-version ja fMBT-version toiminnallisuuksiin. Rajapinnan testaus käsitellään näiden toteutusongelmien jälkeen. Muutama malli toteutettiin Googlen Gmail-, Calendar-, Google+- ja Hangouts-ohjelmalle hyödyntämällä tehtyä rajapintaa. Malleja käytettiin ohjelmien testaukseen ja niiden avulla selvitettiin rajapinnan loogisia virheitä. Lopputuloksena rajapinnasta on saatu toimimaan fMBT-versio ja TnT-versiolla on ajettu alustavia testejä. Rajapintaa voidaan käyttää mallien kanssa ja tarvittaessa sen vaihtaminen toiseen versioon on helppoa.