Karate DSL: Cannot read file with certain characters in the file name

Viewed 34

I have these 3 files in the same directory. When the file has dash (-) or x in the name as below, karate cannot read the file and gives the error: org.graalvm.polyglot.PolyglotException: not found: image/image004-69.36.jpg

They are the same file in the same location, and when I rename the file to not have a dash (-) or x in the file name, it works. Are only certain characters allowed in a file name ? I am using MacOS Catalina version: 10.15.7 (19H15).

Here is the some code to recreate the problem. The first line works, the 2nd and 3rd line does not. If I rename to remove x and dash(-) from the filename, it works.

  Scenario: Image Read
    * print read('classpath:image/image004_69.36.jpg')
    * print read('classpath:image/image004_69x36.jpg')
    * print read('classpath:image/image004-69.36.jpg')
1 Answers

It worked with karate version 1.1.0. The problem was with version 1.0.1. I am leaving the question out, just in case anyone else has the same problem.

Related