Base solution for your next web application

Activities of "easy2u"

We have the same same issue as in

<a class="postlink" href="https://stackoverflow.com/questions/49798566/the-instance-of-entity-type-product-cannot-be-tracked-because-another-instance">https://stackoverflow.com/questions/497 ... r-instance</a>

but are unsure under what conditions it may happen. It happened to us from unit test in which we created entity through one service call and tried to updated it in the same unit test by invoking update service method (passing it modified DTO from first call) that had very similar code as in the stack overflow question and resolution to the problem as in the answer.

What we would like to understand is when/why it is happening? Is there anything in the documentation how to prevent this from happening or why it may happen? We understand how it works with EF Core (and how to solve it), but are unsure how Abp/ASP.NET Zero wrappers (repositories) are interacting/causing this with EF and when/how we need to prevent this from happening.

From my reply to the statement from the e-mail

I understand that they are integration tests

but is there an easy way to perform setup only once for a larger group of tests

So the focus of the question is on the "is there an easy way to perform setup only once", so that whole setup is not repeatedly done for each test? Fact that they are not unit tests, but integration tests, does not change a thing. Both can have heavy setup and both can have common heavy setup extracted to happen only once (with some drawbacks eventually). Question is if there is an easy way with boilerplate/ASP.NET zero "wrapper" around core methods to do this when inheriting from "AbpIntegratedTestBase" class? Is there a sample how to do this?

Since tests that came with the template and all samples published on the web, execute pretty long, given the number of them that is supposed to be in the final developed solution, is there a way to improve performance of them, so that they don't execute 5 seconds each? If final solution has 4000 tests, it would take more than 5 hours to execute them all. That seems to be unacceptable for a good CI.

I understand that they are integration tests and that is why they take long time to execute, but is there an easy way to perform setup only once for a larger group of tests, so that individual tests can execute faster (have only one "setup" of 4.5s instead of X * 4.5s)?

Showing 1 to 3 of 3 entries