Automated Testing of API Mapping Relations

Hao Zhong,Suresh Thummalapenta,Tao Xie
2011-01-01
Abstract:Software companies or open source organizations often release their applications in different languages to address business requirements such as platform independence. To produce the same applications in different languages, existing applications already in one language such as Java are translated to applications in a different language such as C#. To translate applications from one language (L1) to another language (L2), programmers often use automatic translation tools. These translation tools use Application Programming Interface (API) mapping relations from L1 to L2 as a basis for translation. It is essential that API elements (ie, classes, methods, and fields) of L1 and their mapped API elements of L2 (as described by API mapping relations) exhibit the same behavior, since any inconsistencies among these mapping relations could result in behavioral differences and defects in translated applications. Therefore, to detect behavioral differences between API elements described in mapping relations, and thereby to effectively translate applications, we propose the first novel approach, called TeMAPI (Testing Mapping relations of APIs). In particular, given a translation tool, TeMAPI automatically generates test cases that expose differences among mapping relations described in the tool. To show the effectiveness of our approach, we applied our approach on five popular translation tools. The results show that TeMAPI effectively detects various behavioral differences between mapped API elements. We summarize detected differences as eight findings and their implications. Our approach enables these findings that can improve …
What problem does this paper attempt to address?