Open Closed

Unit tests so slow #5559


User avatar
0
nguyenngoc.son created

Hi, Currently in my project, I have about more than 1000 unit tests. When I run all tests it took around 90 mins to completed. The reason why the test cases is so slow is because we put all the test data in the data seed contributor so each test cases need to insert all the test data again and again. For example: one test case take 20 seconds to complete but the test data creation took 19 seconds already.

Can we have any option or any idea that we can only need to insert the test data once and other cases can reuse that data instead of inserting new one?


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Unfortunately not reusable, each unit test starts a different process instance, and they cannot share memory data. I have no idea yet.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 15, 2025, 14:41