citrusframework / yaks

YAKS is a platform to enable Cloud Native BDD testing on Kubernetes
Apache License 2.0
82 stars 28 forks source link

[Question] Loading file in steps #387

Closed mogui closed 2 years ago

mogui commented 2 years ago

Hi all,maybe it's just me missing something.

I'm trying to load the request body for an http send step: Given load HTTP request body user.yaml, but it fails everytime saying Failed to load body from file resource user.yaml. The file is in my local machine in teh same directory of the feature file. Am I miss something?

I assume the file is somehow loaded in the container as a volume, isn't it? If not how can it work?

christophd commented 2 years ago

yes you have to add the resource to the test container. You can use the yaks-config.yaml to add resources to the runtime.

something like:

config:
  runtime:
    resources:
      - foo.yaml
mogui commented 2 years ago

Oh thanks I also found the --resource optionin the run command line

Don't know why with the config doesn't work. Is it right to pass the config file just with -s yaks.confog.yaml, isn't it?

christophd commented 2 years ago

if yaks-config.yaml is in the very same directory as the feature file it is automatically loaded