With the fast growth of artificial intelligence and big data technologies, AI-based mobile apps are widely used in people' s daily life. However, the quality problem of apps is becoming more and more prominent. Many AI-based mobile apps often demonstrate inconsistent behaviors for the same input data when context conditions are changed. Nevertheless, existing work seldom focuses on performing testing and quality validation for AI-based mobile apps under different context conditions. To automatically test AI-based plant identification mobile apps, this paper introduces TestPlantID, a novel metamorphic testing approach based on test contexts. First, TestPlantID constructs seven test contexts for mimicking contextual factors of plant identification usage scenarios. Next, TestPlantID defines test-context-based metamorphic relations for performing metamorphic testing to detect inconsistent behaviors. Then, TestPlantID generates follow-up images with various test contexts for testing by applying image transformations and photographing real-world plants. Moreover, a case study on three plant identification mobile apps shows that TestPlantID could reveal more than five thousand inconsistent behaviors, and differentiate the capability of detecting inconsistent behaviors with different test contexts.
Authors: Hongjing Guo (College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics), Chuanqi Tao (College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics), Zhiqiu Huang (College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics),
Hide Authors & Abstract