Modern Cyber-Physical Systems (CPS) and Internet of Things (IoT) systems consist of both loosely and tightly interactions among various resources in IoT networks, edge servers and cloud data centers. These elements are being built atop virtualization layers and deployed in both edge and cloud infrastructures. They also deal with a lot of data through the interconnection of different types of networks and services. Therefore, several new types of uncertainties are emerging, such as data, actuation, and elasticity uncertainties. This triggers several challenges for testing uncertainty in such systems. However, there is a lack of novel ways to model and prepare the right infrastructural elements covering requirements for testing emerging uncertainties. In this paper, first we present techniques for modeling CPS/IoT Systems and their uncertainties to be tested. Second, we introduce techniques for determining and generating deployment configuration for testing in different IoT and cloud infrastructures. We illustrate our work with a real-world use case for monitoring and analysis of Base Transceiver Stations.