how to run/turn off selective tests based on profiles in spring boot
<p>I have a <code>spring-boot</code> application for which I am writing IT tests.</p>

<p>The data for the tests comes from <code>application-dev.properties</code> when I activate <code>dev</code> profile</p>

<p>Here is what I have for tests:</p>

<pre><code>@RunWith(SpringRunner.class)
@SpringBootTest
@WebAppConfiguration
public class ApplicationTests {

    @Autowired
    Environment env;

    @Test
    public void contextLoads() {
        System.out.println(Arrays.toString((env.getActiveProfiles())));

    }

}
</code></pre>

<p><strong>ServiceITTest</strong></p>

<pre><code>public class ServiceITTest extends ApplicationTests {


     @value
     String username;

     @value
     String address;

     @Autowired
     MyService myService;


      @Test
      public void check_for_valid_username_address(){
            myService.validate(username,address);
      }
}
</code></pre>

<p>I want the above test to run only when I set the profile of "dev","qa". by default, it should not run.</p>

<p>Is it possible to get that fine control in spring boot testing?</p>