title: Using Spring Boot's configuration in karate config
body: <p>I have a Spring Boot application that launches the Karate tests programmatically, in the main source-set. This application is supposed to  configure per environment several URLs that will be used by Karate. I also have a spring-cloud-config server that loads the yaml property file that corresponds to the current environment (dev, prod, etc). As such, my properties are not local to the project and are not readable outside of a Spring Boot property component. </p>
  
  <p>With all that in mind, I want my Karate tests to use these configurable URLs, but I find no way to use the Spring Boot component containing my properties in a Karate context.</p>
  
  <p>As further information, to run the Karate tests programmatically I'm using <strong>JUnitCore#runClasses</strong> : </p>
  
  <pre><code>@SpringBootApplication
  public class MyApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(MyApplication.class, args);
  
          // Run all tests in the application
          Result result = JUnitCore.runClasses(KarateApplicationRunner.class);  
      }
  }  
  </code></pre>
  
  <p>with the <strong>KarateApplicationRunner</strong> being a runner launching the tests and generating a report. </p>
  
  <p>If someone has a functioning idea it would make my day :) .  </p>