Smart ecosystems combine various heterogeneous and independent software-intensive systems to enable complex functionalities for highly dynamic smart applications, such as Industry 4.0, smart cities, transportation, automotive, and many other critical domains. Due to their complex nature, such ecosystems, which are often referred as to Systems-of-Systems (SoS), should be completely reliable and work without interruption or failures that could cause serious losses and damages. During the smart-ecosystem architectural design, the impact of eventual failures or architectural changes should then be predicted to avoid potential losses or damages. This tutorial presents a simulation-based approach to support the prediction, at design time, of the structure and behavior of smart-ecosystem architectures (which are inherently dynamic at runtime), aiming to evaluate whether the smart ecosystems can sustain their operation. To do that, we present the foundations and concepts associated with smart ecosystems/SoS and simulation, as well as the results of our multiple studies. We also offer hands-on experience in the simulation of software architectures, using artifacts associated with a pre-specified smart-ecosystem architecture and a free commercial simulator. We share with the CBSoft 2021 audience the theoretical knowledge and practical experience that could leverage the adoption of simulation approaches during the development of software-intensive systems, in particular, those so complex and dynamic as smart ecosystems.