Context-aware applications often consist of a middleware and a collection of services, which run autonomously adaptive to the changing environments, where a variety of sensors are installed in physical facilities, with end-users moving around. Testing such context-aware applications is challenging due to the complex interactions among the components, especially for the complicated environment modeling. This paper extends a bigraphical sorting predicate logic as constraints to create a meta-model, builds a data model based on the bigraphical meta-model, and proposes to use the sorted bigraphical reaction system (BRS) to model the context-aware environments. Tracing the interactions between the BRS model and the middleware model generates the test cases to verify the interactions between the context-aware environments and the middleware together with the domain services. To decrease the number of test cases, this paper proposes a bigraphical pattern flow testing strategy. An example airport is demonstrated to show fault detection capabilities and reductions of test cases.