Changes for page Test Speedup
Last modified by chrisby on 2025/03/08 11:39
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,9 +1,9 @@ 1 -Fast testingnotonlysaves time,butalsoenablesmore frequentexecution, leading to improved code quality.Optimizingandmanagingthespeed oftest executionistherefore critical. While extensive andfrequent testing isideal, it shouldn'texcessively slow the pace of development.1 +Fast-executing tests require less time and are executed more frequently, contributing to improved code quality. Therefore a high test execution speed is beneficial. 2 2 3 3 4 4 === Measures === 5 5 6 -* **Test type segregation**: endtorun much faster than other types of tests. For large test suites,you shouldconsider running unit tests regularly on the developer's local machine, while scheduling more resource-intensive testsin a CI environment.The CI environmentcan,for example,runtheslower testsinparalleland notify youjustincase somethingfails. Ifthe tests take too longfor this approach, you canrun themat a fixed rate,usuallyonceaday atmidnight.6 +* **Test type segregation**: Unit tests typically run much faster than other types of tests. For large test suites, consider running unit tests regularly on the developer's local machine, while scheduling more resource-intensive tests to run at a fixed rate in a continuous integration environment, for example. 7 7 * **Partial testing**: You don't have to run all tests every time. Often, it is sufficient to run only the tests related to recently changed code. 8 8 * **Mock slow dependencies** to minimize code execution time, especially operations such as I/O, transaction management, and networking. 9 9 * **Prefer in-memory databases during testing** for cleaner and faster operations compared to standard databases.