0
webking-abp2 created
- ABP Framework version: v5.1.4
- UI type: Angular
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): yes / no
- Exception message and stack trace:
- [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 6.0.1) [xUnit.net 00:00:00.87] Starting: Volo.Saas.Domain.Tests The active test run was aborted. Reason: Test host process crashed
- Steps to reproduce the issue:"
- Replace the Volo.Saas package with source code from Suite. When i run the tests that was added i get the exception.
I Used the Abp Suite to Replace Volo.Saas module with source code. When i try to run the tests that was added i get the message in the Output in VS.
3 Answer(s)
-
0
Hi,
I have created an internal issue for that and will try to fix it in next releases.
Thanks for your feedback. Your question credit is refunded.
-
1
Hi again,
Problem is be fixed in and will be released in the next patch release. To fix it in 5.1.4, follow these steps:
- Create
appsettings.json
&appsettings.secrets.json
files undertest\Volo.Saas.TestBase\Volo\Saas
folder.
appsettings.json
content:{ }
appsettings.secrets.json
content:{ "AbpLicenseCode": "Your Abp License Code" }
(You can find your license code in the main solution. Just copy from there.)
- Add the following configuration to
test\Volo.Saas.TestBase\Volo.Saas.TestBase.csproj
file:
<ItemGroup> <None Remove="Volo/Saas/appsettings.json" /> <Content Include="Volo/Saas/appsettings.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <ExcludeFromSingleFile>true</ExcludeFromSingleFile> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> </Content> <None Remove="Volo/Saas/appsettings.secrets.json" /> <Content Include="Volo/Saas/appsettings.secrets.json"> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup>
- Add the following configuration to
ConfigureServices
method intest\Volo.Saas.TestBase\Volo\Saas\SaasTestBaseModule.cs
file:
var builder = new ConfigurationBuilder(); builder.AddJsonFile("Volo/Saas/appsettings.json", false); builder.AddJsonFile("Volo/Saas/appsettings.secrets.json", true); context.Services.ReplaceConfiguration(builder.Build());
(you may need to add
Microsoft.Extensions.Configuration
namespace) - Create
-
0
Works perfect! Thanks!!