karatelabs / karate

Test Automation Made Simple

Home Page:https://karatelabs.github.io/karate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting this exception org.graalvm.polyglot.PolyglotException: not found: src/test/resources/payload/user.json in Karate

kushanbhai opened this issue · comments

getting this exception org.graalvm.polyglot.PolyglotException: not found: src/test/resources/payload/user.json in Karate.
My POM.XML looks like this:-

4.0.0 KarateFramework KarateFramework 0.0.1-SNAPSHOT UTF-8 1.8 1.8 com.intuit.karate karate-apache 0.9.6 test com.intuit.karate karate-junit5 1.1.0 test com.intuit.karate karate-core 1.0.1
</dependencies>

and my feature file looks like this

Feature: create user using POST api using json file

Background:
* url 'https://gorest.co.in'
* def requestPayload = read('classpath:src/test/resources/payload/user.json')
Scenario: create a user with given data
Given path '/public/v2/users'
And request requestPayload
And header Authorization = 'Bearer ' +tokenID
When method post
Then status 201
And match $.id == '#present'
And match $.name == '#present'
And match $.name == 'Sanjay Mathur'
And match $.email == 'sanmathur123@gmail.com'
Please suggest the changes i need to make.My feature file is failing everytime i run it.

@kushanbhai kindly read the instructions here and follow that process (exactly) to reopen: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

also note you are using old versions of karate and mixing versions in ways not supported