Hi,
When I try to execute the following Unit test (please see below) in Volo.Abp.LanguageManagement.Application.Tests (or most of the modules for that matter),
[Fact]
public async Task Get()
{
// Arrange
// Act
var localizedText = await _languageTextAppService.GetAsync("LanguageManagement", "en", "Yes", "en");
//Assert.True(true);
// Assert
localizedText.ShouldNotBeNull();
}
I get an error :
\JetBrains\Installations\ReSharperPlatformVs16_2db4cf06_000\TestRunner\netcoreapp2.0\ReSharperTestRunner.exe:3048 exited with code '-42': Not available
--- EXCEPTION #1/1 [LoggerException] Message = “ Process \JetBrains\Installations\ReSharperPlatformVs16_2db4cf06_000\TestRunner\netcoreapp2.0\ReSharperTestRunner.exe:3048 exited with code '-42': Not available ” ExceptionPath = Root ClassName = JetBrains.Util.LoggerException HResult = COR_E_APPLICATION=80131600
When I debugged the issue further I noticed the error occurs in the following method : (SeedTestData) in the class
namespace Volo.Abp.LanguageManagement
{
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule),
typeof(AbpAuthorizationModule),
typeof(LanguageManagementDomainModule)
)]
public class LanguageManagementTestBaseModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAlwaysAllowAuthorization();
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("en-US", "en", "English", "flag-icon flag-icon-gb"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "flag-icon flag-icon-tr"));
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
SeedTestData(context);
}
private static void SeedTestData(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(async () =>
{
using (var scope = context.ServiceProvider.CreateScope())
{
await scope.ServiceProvider
.GetRequiredService<IDataSeeder>()
.SeedAsync();
}
});
}
}
}
I am unable to debug any further, but I do get to this point and can see the failure happens on SeedAsync(). I think that either the IDataSeeder is not being injected properly, or there is something I need to configure when executing Volo Unit Tests. It is using the in-memory database to seed the data, however I can not get the test to run. The test runner shuts down without any further exception message or stack trace. We have been able to duplicate this on three other developer machines.
Could you pleae provide me with a sample of how to execute the volo test cases in question? Is there something I was supposed to configure? This is specific to the Volo test cases that come out of box, when modules are installed locally using the abp suite tool.
Thanks in advance,
Jesse
- ABP Framework version: latest
- UI type: Blazor Server
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:"
6 Answer(s)
-
0
is it beta version?
-
0
is it beta version?
Hi Albert,
No it is the commercial version from ABP...
Thanks,
Jesse
-
0
I mean ABP Commercial has beta version as well. What's the ABP version? (it's written in your csproj files)
-
0
Hi Albert,
The ABP Commercial version we are using is Version="4.4.2"
Please let me know if there is anything else you need.
Thanks,
Jesse
-
0
is this duplicate of https://support.abp.io/QA/Questions/1979/Exception-When-creating-BUnit-tests-for-Blazor#answer-c9001c91-e3ee-56b4-21c0-39ffb0f55e57 ?
-
0
Hi Albert, yes Maliming was able to answer the question posed in the that support request along with this issue I am experiencing with this support request.
The ticket can be closed.
Thanks,
Jesse