citrusframework / citrusframework/yaks

How to log/print variable?

Open
#451 1 comment 0 reactions 0 assignees View on GitHub
help wanted question
Dominant language
Java
Stars
90
Forks
28
PR merge metrics
No merged PRs in 30d

Description

According to the documentation it seems possible to log variables, but with yaks 0.12 I'm not able to get it to work.

https://citrusframework.org/yaks/reference/html/index.html#steps-variables

I tried with single quotes, but it then logs everything as text and yaks doesn't resolve the variable.

When I try this:
```
Given variable datetime is "citrus:currentDate('yyyyMMddHHmmss')"
Given variable corrMessageId is "MESSAGE-${datetime}"
Then print "CorrMessageId: ${corrMessageId}"
```

I get an error like:

```
[ERROR] Run 1: The step 'print "CorrMessageId: ${corrMessageId}"' is undefined.
You can implement this step using the snippet(s) below:

@Then("print {string}")
public void print(String string) {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.