You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the Reqnroll test scenarios in Debug mode, there are uncaught exceptions that look like:
Exception thrown: 'Gherkin.NoSuchLanguageException' in Gherkin.dll
Gherkin.NoSuchLanguageException: 'Language not supported: en-US'
at Gherkin.GherkinDialectProvider.GetDialect(String language, Location location)
These are thrown in the following method:
[global::NUnit.Framework.OneTimeTearDown]
[MethodImpl(MethodImplOptions.NoInlining)]
public static async ValueTask AssemblyCleanupAsync()
{
var currentAssembly = typeof(MYPROJECT_NUnitAssemblyHooks).Assembly;
await global::Reqnroll.TestRunnerManager.OnTestRunEndAsync(currentAssembly);
}
It seems that the Gherkin.dll is always trying to load the 'en-US' language in the GherkinDialectProvider.GetDialect() method.
Setting the language in either the feature files or reqnroll to a different value still seems to take the same default 'en-US'.
Values tried:
en-NL
en-UK
en
en-US
Steps to Reproduce
Run the tests in debug mode in Visual Studio 2022.
The tests are executed in an air-gapped environment.
The system locale is set to en-US English (United States)
Regional Format: English (United Kingdom)
Stack trace:
at Gherkin.GherkinDialectProvider.GetDialect(String language, Location location) in Gherkin\GherkinDialectProvider.cs:line 31
Link to Repro Project
No response
The text was updated successfully, but these errors were encountered:
I have tried to reproduce the problem, but I cannot.
I can reproduce a NoSuchLanguageException being thrown (the debugger stops when I enable "Break when thrown" in the "Exception Settings", but it is handled.
Does this also happen with a newly created reqnroll NUnit project?
If not, could you provide a small repro where this also happens?
Does this not happen in other environments, e.g. not air-gapped?
Can you provide the full call stack when the exceptions occur (including wrapped exceptions)?
For the record, even the handled version of the exception might be reduced now significantly with #336 by @obligaron. It is merged already, but not released yet.
Reqnroll Version
2.2.1
Which test runner are you using?
NUnit
Test Runner Version Number
4.2.2
.NET Implementation
.NET 8.0
Test Execution Method
Visual Studio Test Explorer
Content of reqnroll.json configuration file
{
"livingDocExecutionDataCollector": {
"enabled": true,
"filepath": "TestExecution.json"
},
"language": {
"feature": "en-US",
"binding": "en-US"
},
"bindingAssemblies": [
{ "assembly": ...}
...
]
}
Issue Description
When running the Reqnroll test scenarios in Debug mode, there are uncaught exceptions that look like:
Exception thrown: 'Gherkin.NoSuchLanguageException' in Gherkin.dll
Gherkin.NoSuchLanguageException: 'Language not supported: en-US'
at Gherkin.GherkinDialectProvider.GetDialect(String language, Location location)
These are thrown in the following method:
[global::NUnit.Framework.OneTimeTearDown]
[MethodImpl(MethodImplOptions.NoInlining)]
public static async ValueTask AssemblyCleanupAsync()
{
var currentAssembly = typeof(MYPROJECT_NUnitAssemblyHooks).Assembly;
await global::Reqnroll.TestRunnerManager.OnTestRunEndAsync(currentAssembly);
}
It seems that the Gherkin.dll is always trying to load the 'en-US' language in the GherkinDialectProvider.GetDialect() method.
Setting the language in either the feature files or reqnroll to a different value still seems to take the same default 'en-US'.
Values tried:
Steps to Reproduce
Run the tests in debug mode in Visual Studio 2022.
The tests are executed in an air-gapped environment.
The system locale is set to en-US English (United States)
Regional Format: English (United Kingdom)
Stack trace:
at Gherkin.GherkinDialectProvider.GetDialect(String language, Location location) in Gherkin\GherkinDialectProvider.cs:line 31
Link to Repro Project
No response
The text was updated successfully, but these errors were encountered: