Nagendra Shrivastava
Nagendra Shrivastava

Reputation: 11

Perfomance Test and API test are not working together in same framework

@ptrthomas - I am able to perform API test and performance test separate in karate. But when I try to merge both in same framework, either of them stopped working.

Reason that I can see here - karate-core is sub dependency of both karate-junit4 and karate-apache. But both of them install different version of karate-core. Hence either have to exclude one of them. But wherever you exclude it, it will stop working. If you exclude it from karate-junit4 then API test will not work, if you exclude it from karate-apache or gatling, performance will not work.

Is there any common version for dependencies for both performance and API test (which run through junit) or any github location where someone might have integrated both in one project?

Below are the version that I am using -

UTF-8 1.8 3.6.0 0.9.0.RC3 2.2.4

<dependency>
    <groupId>com.intuit.karate</groupId>
    <artifactId>karate-junit4</artifactId>
    <version>0.2.7</version>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-core</artifactId>
        </exclusion>
        <exclusion>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<dependency>
    <groupId>com.intuit.karate</groupId>
    <artifactId>karate-apache</artifactId>
    <version>${karate.version}</version>
</dependency>

<dependency>
    <groupId>com.intuit.karate</groupId>
    <artifactId>karate-gatling</artifactId>
    <version>${karate.version}</version>
    <scope>test</scope>
</dependency>

Can someone please help here?

Upvotes: 1

Views: 65

Answers (1)

Peter Thomas
Peter Thomas

Reputation: 58088

Just use this sample project: https://github.com/ptrthomas/karate-gatling-demo

This has the right dependencies set as a simple, stand-alone project and many teams have used and validated it.

If you are still facing issues, please follow the instructions here: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Upvotes: 1

Related Questions