License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/OASIcs.SLATE.2019.3
URN: urn:nbn:de:0030-drops-108705
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2019/10870/
Go to the corresponding OASIcs Volume Portal


Madeja, Matej ; Porubän, Jaroslav

Tracing Naming Semantics in Unit Tests of Popular Github Android Projects

pdf-format:
OASIcs-SLATE-2019-3.pdf (0.6 MB)


Abstract

The tests are so closely linked to the source code that we consider them up-to-date documentation. Developers are aware of recommended naming conventions and other best practices that should be used to write tests. In this paper we focus on how the developers test in practice and what conventions they use. For the analysis 5 very popular Android projects from Github were selected. The results show that 49 % of tests contain full and 76 % of tests contain a partial unit under test (UUT) method name in their name. Further, there was observed that UUT was only rarely tested by multiple test classes and thus in cases when the tester wanted to distinguish the way he or she worked with the tested object. The analysis of this paper shows that the word "test" in the test title is not a reliable metric for identifying the test. Apart from assertions, the developers use statements like verify, try-catch and throw exception to verify the correctness of UUT functionality. At the same time it was found out that the test titles contained keywords which could lead to the identification of UUT, use case of test or data used for test. It was also found out that the words in the test title were very often found in its body and in a smaller amount in UUT body which indicated the use of similar vocabulary in tests and UUT.

BibTeX - Entry

@InProceedings{madeja_et_al:OASIcs:2019:10870,
  author =	{Matej Madeja and Jaroslav Porub{\"a}n},
  title =	{{Tracing Naming Semantics in Unit Tests of Popular Github Android Projects}},
  booktitle =	{8th Symposium on Languages, Applications and Technologies (SLATE 2019)},
  pages =	{3:1--3:13},
  series =	{OpenAccess Series in Informatics (OASIcs)},
  ISBN =	{978-3-95977-114-6},
  ISSN =	{2190-6807},
  year =	{2019},
  volume =	{74},
  editor =	{Ricardo Rodrigues and Jan Janousek and Lu{\'\i}s Ferreira and Lu{\'\i}sa Coheur and Fernando Batista and Hugo Gon{\c{c}}alo Oliveira},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2019/10870},
  URN =		{urn:nbn:de:0030-drops-108705},
  doi =		{10.4230/OASIcs.SLATE.2019.3},
  annote =	{Keywords: unit tests, android, real testing practices, unit tests, program comprehension}
}

Keywords: unit tests, android, real testing practices, unit tests, program comprehension
Collection: 8th Symposium on Languages, Applications and Technologies (SLATE 2019)
Issue Date: 2019
Date of publication: 24.07.2019


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI