3

I'm using JBehave 4.0.5

I need to escape the pipeline(|) from the JBehave tabular parameter verification.

As per this answer from Stack Overflow, In Cucumber we can use '\|' to escape the pipeline on tabular verification, but i couldn't find one for JBehave.

EX:

|Key 1      |Key 2  |
| |value 1| |value 2|
| |value 3| |value 4|
VaL
  • 1,128
  • 15
  • 29
Aski
  • 31
  • 5
  • You can have a look @ https://stackoverflow.com/questions/34357982/how-use-pipe-character-inside-examples-table-of-behave-test-feature-file – Lazycoder-007 May 31 '20 at 13:29
  • @Lazycoder_007 like it says, its an ugly solution. Is there a official jBehave community site where i can post this issue ? – Aski May 31 '20 at 13:49
  • 1
    jBehave is a open source project and you can find your type of jBehave here https://github.com/jbehave?q=&type=source&language= and log the issue. – Lazycoder-007 May 31 '20 at 14:35
  • @Lazycoder_007 The provided link is irrelevant, since it's about Python Behave, but this question is about Java JBehave – VaL Jun 01 '20 at 05:57

1 Answers1

1

JBehave allows to specify custom separators for ExamplesTable-s: Tabular Parameters > Specifying inlined separators.

{headerSeparator=!,valueSeparator=!}
!Key 1      !Key 2  !
! |value 1| !value 2!
! |value 3| !value 4!
VaL
  • 1,128
  • 15
  • 29
  • I cannot change the Separators, because we have used '|' in all our test scenarios. – Aski Jun 04 '20 at 07:57
  • 1
    @Aski you can change separator for one table only, all other tables are kept untouched – VaL Jun 04 '20 at 11:19