Testing Strategy for Multi-Tenant Web Applications Using TestContainers with Use Case: MealMatrix - Dimovski, Davor; Koteska, Bojana; Mishev, Anastas (My University, 2025)
This paper addresses the problem of missing a standardized approach for verifying the architectural setup of multi-tenant applications by offering a testing strategy that covers scenarios of common problems that multitenant applications face (divided in 3 areas: data isolation, data integrity and constraints, tenant context). Using TestContainers to create a replica of a production environment, with a big bang integration testing approach, we showcase the practical usage of the proposed testing strategy with a Spring Boot and Kotlin web application for managing meal orders – MealMatrix. The results show that the testing approach is effective in identifying faulty setup for multi-tenant environments, with a limitation that TestContainers does not cover an easy-setup for the multiple databases, multiple schemas model with a single instance of the application serving multiple tenants. This work contributes to the field of software testing by offering an easily applicable, high-level testing approach for multi-tenant web applications.
Keywords: multi-tenant; integration testing; TestContainers; software testing; testing strategy