This question can be answered in two ways with respect to the test setups:
Test Setup-I is very well secured because your SUT or IPR is inside your network that’s protected under the DMZ and you are just accessing the test framework available on the cloud for test execution.
For choosing Test Setup-II one must ensure the following before migrating the SUTs to the cloud:
Ensure the visibility of your SUT in the multi tenant environment
Analyze security characteristics of the cloud service provider.
Ability to control the accessibility towards your servers based on the profiles
Whether encrypting your data is mandatory
Also, when it comes to security, different companies have different security mechanisms to protect their IPRs and organizations considering cloud-based services must understand the associated risks and ensure appropriate visibility. However, the cloud computing environment is secure and there are different types of security measures taken at different levels, like infrastructure, platform, and application levels. Also, there are organizations which provide software’s that protect your IPR on the cloud.