How to specify directory to access test resources in yaml from a different repo in Github in Karate

Viewed 42

I have API schemas in yaml in a different repo in github. I would like to verify schemas in my API tests

I have currently specified in pom.xml as

<testResource>
          <directory>https://github.com/software/Swagger/blob/main/api/schemas/</directory>
           <includes>
                <include>**/*.yaml</include>
            </includes>
</testResource>

I have two questions

  1. Why am I not able to see the yaml files in target/test-classes?
  2. Is there a way to test schemas in Karate from Yaml ?
1 Answers

This is not anything supported by Karate it sounds like a Maven question, and I don't think it is supported.

That said, maybe all you need is to get the YAML file via an HTTP GET, and you should know how to do that using Karate by now.

Related