我希望我的默认活动配置文件是productionif if -Dspring.profiles.activenot set.
我尝试了以下内容,application.properties但它不起作用:
spring.profiles.default=production
Run Code Online (Sandbox Code Playgroud)
Spring-boot版本= 1.3.5.RELEASE
我有一个Java自动测试框架。我需要在多个环境(例如SIT,UAT和Prod)上运行此代码,但是所有这些环境都具有不同的URL。
sit-config.properties
hompepage = XXX
uat-config.properties
主页= YYY
Maven个人资料
<profiles>
<profile>
<id>sit</id>
<activation>
<property>
<name>environment</name>
<value>sit</value>
</property>
</activation>
</profile>
<!-- mvn -Denvironment=sit clean test -->
<profile>
<id>uat</id>
<activation>
<property>
<name>environment</name>
<value>uat</value>
</property>
</activation>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
问题(编辑):
http://www.testautomationguru.com/selenium-webdriver-how-to-execute-tests-in-multiple-environments/
请帮忙。谢谢。