Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate report file with Japanese SpecFlow keyword (Given, when, then, ...) #205

Open
duy123a opened this issue Jan 9, 2024 · 1 comment

Comments

@duy123a
Copy link

duy123a commented Jan 9, 2024

I try to generate a Japanese report but no idea how to do that

What I haved tried

I am using .NET 8 with SpecFlow
The feature file is Japanese (followed this keyword https://github.com/cucumber/gherkin/blob/main/gherkin-languages.json)

var sparkReporter = new ExtentSparkReporter(...)
_extentReports = new ExtentReports();
_extentReports.GherkinDialect = "ja";
_extentReports.AttachReporter(sparkReporter);

...

_feature = _extentReports.CreateTest(
new GherkinKeyword(Feature.Name.MapToLocaleKeyword()), // change "Feature" to "フィーチャ"
FeatureContext.FeatureInfo.Title,
string.Empty);

...

_extentReports.Flush();

But the report file still have SpecFlow keyword as English

Can you help me about that. Thanks

@namilkimfree
Copy link

@duy123a Hi,
I checked it in the mater branch, but it is displayed normally in Japanese.

master branch
5.0.3-beta

  _path = DateTime.Now.Millisecond + FileName;

  _extent = new ExtentReports();
  _spark = new ExtentSparkReporter(_path);

  _spark.Config.Theme = AventStack.ExtentReports.Reporter.Config.Theme.Dark;
  _extent.GherkinDialect = "ja";

  _extent.AttachReporter( _spark);

_extent.CreateTest(new GherkinKeyword("フィーチャ"), // change "Feature" to "フィーチャ"
"フィーチャ  ",
 string.Empty);
_extent.Flush();

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants