Hi,

Sorry but I had misunderstood the usecase, the report will show the original 
textual value. 

What you might consider is parametrised scenarios, where the values are 
replaced at the each execution.   The table values can be read from a file.

If you can provide a simplified example of your usecase we can add it our core 
examples.

Cheers



> On 12 Apr 2015, at 17:56, Patel, Nikunj (GE Healthcare) <nikunj.pa...@ge.com> 
> wrote:
> 
> Mauro,
>  
> I tried just simple String conversion using @AsParameterConverter (haven’t 
> created ErrorCode type yet) . It is returning converted string fine but I 
> don’t see converted string in HTML report. Report still showing original 
> string from feature file in report. How can I replace converted string in 
> report?
>  
>  
> Thanks,
> Nikunj
>  
> From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
> Sent: Tuesday, April 07, 2015 3:30 AM
> To: dev@jbehave.codehaus.org
> Subject: Re: [jbehave-dev] Override step in Jbehave
>  
> Here's an example of dynamic lookup via a parameter converter method: 
> 
> https://github.com/jbehave/jbehave-core/blob/master/examples/core/src/main/java/org/jbehave/examples/core/steps/TraderSteps.java
> 
> Look for:
> 
> public Trader retrieveTrader(String name);
> 
> On 05/04/2015 16:07, Patel, Nikunj (GE Healthcare) wrote:
> Thanks Mauro.
>  
> Can you please guide to the example (if any)?
>  
> Thanks,
> Nikunj
>  
> From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
> Sent: Saturday, April 04, 2015 11:01 AM
> To: dev@jbehave.codehaus.org
> Subject: Re: [jbehave-dev] Override step in Jbehave
>  
> Hi, 
> 
> thanks for explaining your scenario.  In this case, a custom ErrorMessage 
> type and a custom converter that looks up the translation in a file or 
> database would seem your best option. 
> 
> Let use know if you encounter problems in its implementation. 
> 
> Cheers
> 
> On 03/04/2015 14:38, Patel, Nikunj (GE Healthcare) wrote:
> HI,
>  
> This is one the option we are thinking for i18n testing.
> I know JBehave have i18n testing example but we don’t want to convert entire 
> story file in language we supporting. We only want to convert labels and 
> messages in different language and test and keep everything in English. We 
> are planning to have converted text in multiple languages available in files 
> (key/values) or database.
> Using below example, error message or label “abc” will be in English, then 
> using language files we convert values to appropriate language(language set 
> in application.properties) before do compare with actual value. Now, we want 
> to include this converted text in the HTML report.
>  
> One other option I was thinking to these message in story example template 
> and use meta filter but there are so many and we don’t want to maintain in 
> feature file.
>  
> What do you suggest we should do to test this kind of scenario?
>  
> Thanks,
> Nikunj
>  
>  
> From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
> Sent: Friday, April 03, 2015 6:15 AM
> To: dev@jbehave.codehaus.org
> Subject: Re: [jbehave-dev] Override step in Jbehave
>  
> It's possible if you define your own custom converter, but it should be 
> associated to a custom parameter type, e.g. ErrorCode.
> 
> Then you implement the value conversion logic in the parameter converter. 
> 
> That said, it does not really seem very logical to do this.   What's your 
> usecase? 
> 
> On 03/04/2015 03:00, Patel, Nikunj (GE Healthcare) wrote:
> Hi,
>  
> Is there any way in Jbehave we can override step with converted parameter 
> values?
>  
> Here is what I am trying to do:
> For Example:
> I have step in feature file- Then error message “abc” should be displayed. 
> Let’s see I am converting  string from “abc”  to “xyz”.
> Now, I want to override feature file step with converted value and see HTML 
> report like-  Then error message “xyz” should be displayed.
>  
> Thanks,
> Nikunj
>  
>  
>  
>  
>  
>  
>  

Reply via email to