It's an old post, but I'm also discovering that even a very basic test is taking 1 second (on my computer, 5 on visual studio.com)
This is awfully slow for just testing a simple, rounding method (I'm just calling Math.Round, in fact)
There's no call sto ABP, Services, Context, anything, except in the constructor/ initialize.
I think the problem is due to XUnit, since it create a new test class instance for every test methods, all ABP pipeline/init must be started anew, so, it's too slow.
I'm going to rewrite my tests using MS Test, using LocalDb (1) to create a test DB, and using transactions to keep it clean
(1) Effort is supposed to be faster, but I have two problems with it :
Here is it, but really, you should recreate it AllAbpMigrations.zip
I solved my problem using [DisableValidation] on my method.
No, I don't have this problem anymore :
But as for your questions : I was getting my error in n global.asa/application, so nothing specific was called.
Thanks !
I had the same kind of problem (forgot an IApplicationService so DI was not working), and I think it was not handled by ABP because the error came before ABP error handling was set up.
BTW, in unit tests, the error was clearly visible.
Going further : So, when I create an entity using Dbcontext, I can't find it by ApplicationService.List (when testing) BUT, if in my unit test, I create another entity using the ApplicationService.Create function, then ApplicationService.list returns both entities !
( Both the list and the Create function are using the basic IRepository implementation)
That's quite weird.
I have exactly the same problem.
In the TestBase Contructor, I create some seed data which is correctly initialized (with a valid TenantId)
But as soon as I am in my unit tests, the data is not found by my Application service (I checked that the current Tenant Id is the right one)
(I also removed the DependsOn on TotoWebApi in TotoWebAdminModule) ( using 0.97)
Okay, testing further, my error was so "uncommon" (it was a Castle Core injection error because I forgot a IDomainService) that I think normal ABP error handling was not yet activted
I tested on a more "normal" scenario, and if I got a "Internal server error" as a response, the logs are filled correctly.
Sorry !
I fixed my problem, but I'm not sure how I could have got the real error.
Also, I use DontWrapResult on my service.