TLDR: running tests in debug mode crashes, running them via dotnet test
works.
Running tests that depend on pro modules in debug mode fails (crashes testhost.exe
) if we don't login using abp login
before debugging tests.
Simple reproduction:
var licenseCode = "Valid license code here";
SaasDomainModule.LicenseChecker.Check<...>(licenseCode, isDevelopment: true)
- if we run this code without logging in (
%UserProfile%\.abp\cli\access-token.bin
is not available), it just crashes the test host. - if we run it after logging in, it works.
- if
isDevelopment: false
, it works regardless of authentication status.
This is problematic for us, since we want to be able to debug tests in vs test explorer (which sets isDevelopment: true
) while only providing licenseCode
via appsettings.secrets.json
Abp version: 8.1.0
Abp CLI version: 8.1.3
3 Answer(s)
-
0
hi
In short, You have to
abp login
to debug the test methods.access-token.bin
is required.I have refunded your ticket.
-
0
hi mailming, yes i realize that, but what I am asking is why? I can already run the tests via dotnet test, why can't I debug them ?
our use case is that we have a separate test writing team that is NOT part of our organization, so they can't login, as they don't have active seats.
Since we already pay for Enterprise plan, and have access to the source code, I expect that we can use it however we want.
-
0
ok, I see, I will ask our colleague.