1

I am getting java heap issue when I execute the below karate feature file using the gradle test command from terminal on my Mac. I used standard DbUtils class from karate framework. The testtable1 and testable2 are temporary tables in the database and each table has over 2 million records. I tried to add the gradle.properties with option = org.gradle.jvmargs=-Xmx4g and also appended the same in grade test command in CLI like this ./gradlew test -Dorg.gradle.jvmargs="-Xmx4g" when running the test case The test1 should return just 10 records. If we execute the same query in the database it takes around 38 seconds or so

@parallel=false
Feature: Perform DB validations

  Background: 
    * def DbUtils = Java.type('com.API.DbUtils')
    * def config = karate.call('classpath:karate-config.js')
    * def db = new DbUtils(config.db)


    @Dbvalidation
    Scenario: test DB
      * def test1 = db.readRows('select * from testtable1 except select * from testtable2;’)
      * print test1
Kavi
  • 87
  • 1
  • 5

1 Answers1

0

There is no such thing as standard DbUtils class from karate framework. What you are referring to is just an example, and you should write the Java code needed for your project.

So this is something you have to figure out for yourself.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248