Hi all, this time we are using a module template to which we want to apply some integration tests, create all the file structure as recommended in the documentation for testing an application service and we are getting the error you can see below, it seems to be happening in the SeedTestData method of the "TestBaseModule" but we can't figure out more than that, can you point us in the right direction?
SA.Modules.Reports.EntityFrameworkCore.Applications.Reports.EfCoreReportAppService_Tests.Should_Get_List_Of_Reports Source: ReportAppService_Tests.cs line 24 Duration: 1 ms
Message: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module SA.Modules.Reports.ReportsTestBaseModule, SA.Modules.Reports.TestBase, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null: Value cannot be null. (Parameter 'source'). See the inner exception for details. ---- System.ArgumentNullException : Value cannot be null. (Parameter 'source')
Stack Trace:
ModuleManager.InitializeModules(ApplicationInitializationContext context)
AbpApplicationBase.InitializeModules()
AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
AbpIntegratedTest1.ctor() ReportsTestBase
1.ctor()
ReportsApplicationTestBase1.ctor() ReportAppService_Tests
1.ctor() line 18
EfCoreReportAppService_Tests.ctor()
RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
----- Inner Stack Trace -----
ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
Enumerable.Select[TSource,TResult](IEnumerable1 source, Func
2 selector)
PermissionDataSeeder.SeedAsync(String providerName, String providerKey, IEnumerable1 grantedPermissions, Nullable
1 tenantId)
PermissionDataSeedContributor.SeedAsync(DataSeedContext context)
DataSeeder.SeedAsync(DataSeedContext context)
AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapter.ProceedAsync()
UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
<<SeedTestData>b__0>d.MoveNext() line 61
--- End of stack trace from previous location ---
TaskExtensions.WaitAndUnwrapException(Task task)
<>c__DisplayClass15_0.<Run>b__0(Task t)
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
TaskExtensions.WaitAndUnwrapException(Task task)
AsyncContext.Run(Func1 action) AsyncHelper.RunSync(Func
1 action)
ReportsTestBaseModule.SeedTestData(ApplicationInitializationContext context) line 57
ReportsTestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) line 52
OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
ModuleManager.InitializeModules(ApplicationInitializationContext context)
1 Answer(s)
-
0
Hi,
Could you also please share the steps to reproduce the problem and share the related code blocks, especially from the SeedTestData() method where the PermissionDataSeeder.SeedAsync(...) method is called?
This will help us better understand the root cause and provide you with a more accurate solution. Thank you!