In one of my test scenarios I make the request and I want to collect data from the response to an array and here for this purpose I've defined the js function within karate-config.js
which accepts one argument.
When I call it, I'm always get the same error, but when i use another function with static value it works nice, but when i try to pass the dynamic object (response from the pre-request) it fails. Here is the error:
Logger feature call failed: classpath:integration/base_oai_pmh_tests/mod-configuration-integration-cases.feature
arg: null
mod-configuration-integration-cases.feature:14 - Failed generating bytecode for :33
The object that i pass to the function is okay and its definitely not null.
here is the function into config file
here is the scenrio with js function usage
I've tried these possible solutions as well and they are failed too:
- define js function in background
- define js function in scenario