Dagados 0 Posted October 19, 2023 (edited) Hi, I should create a test project using DUnitX, for a project with more than 1000 units. The problem that in the test project I was forced to add in the search path all the paths to all the files in the project to be tested and it is very complicated, because each time I have to test a new calsse I would have to add all the dependencies. Is there a way or a simple configuration or architecture for this type of complexity. Any suggestions ? Thanks Edited October 19, 2023 by Dagados Share this post Link to post
Brian Evans 105 Posted October 19, 2023 Far as I know an object's dependencies should come in through the Uses in its own unit file. You only need to add locally in the test unit anything you are using in your tests. Quote add in the search path all the paths to all the files not in the project to be tested Is the "not" accurate? Makes no sense at all. Share this post Link to post
Uwe Raabe 2057 Posted October 19, 2023 When you create a new test project and add one of the units for testing, the project won't compile unless all dependent units can be found. So you need to add the search paths accordingly. There is nothing wrong with having dependencies in the first place. It just makes picking only one unit from the project into another one a bit difficult. Nevertheless, it is always worth thinking about minimizing dependencies, but not only because of simpler testing. 3 hours ago, Brian Evans said: Is the "not" accurate? Makes no sense at all. The not seems appropriate, but the term project to be tested should be changed to test project. Share this post Link to post