How to use custom path in karate feature file?

Viewed 17

In the karate feature file, classpath is - "scr/test/java"

But instead, the detailed "classpath:examples/resources/module1/sub_module/test.json" path, Is there any other way that hides the detailed path? like

Here, My expectation is Instead of

  • def file1 = read(classpath:examples/resources/module1/sub_module/test.json)

I want to use

  • def file1 = read(customclasspath:test.json) or similar to this which can hide the full path details of any file in the feature file.
1 Answers
Related