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