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.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11