Changing Profile during run time

How can I create a “Before” cucumber groovy script that will change the “profile” which will launch the app according to “Feature” example?