Note that there are some explanatory texts on larger screens.

plurals
  1. POIncreasing testability, when coding with Bold for Delphi framework
    primarykey
    data
    text
    <p><strong>Background</strong> I work in a team of 7 developers and 2 testers that work on a logistics system. We use Delphi 2007 and modeldriven development with <a href="http://boldfordelphi.blogspot.com/" rel="nofollow noreferrer">Bold for Delphi</a> as framework. The system has been in production about 7 years now and has about 1,7 millions lines of code. We release to production after 4-5 weeks and after almost every release we have to do some patches for bugs we don’t found. This is of course irritating both for us and the customers.</p> <p><strong>Current testing</strong> The solution is of course more automatic testing. Currently we have manual testing. A Testdbgenerator that starts with an empty database and add data from the modelled methods. We also have <a href="http://smartbear.com/products/qa-tools/automated-testing/" rel="nofollow noreferrer">Testcomplete</a> that runs some very basic scripts for testing the GUI. Lack of time stop us from add more tests, but scripts is also sensitive for changes in the application. For some years ago I really tried unit testing with DUnit, but I gave up after some days. The units have too strong connections.</p> <p><strong>Unit testing preconditions</strong> I think I know some preconditions for unit testing:</p> <ul> <li>Write small methods that do one thing, but do it well.</li> <li>Don’t repeat yourself.</li> <li>First write the test that fails, then write the code so the test pass.</li> <li>The connections between units shold be loose. They should not know much about each other.</li> <li>Use dependency injection.</li> </ul> <p><strong>Framework to use</strong> We may upgrade to Delphi XE2, mainly because of the 64-bit compiler. I have looked at <a href="http://code.google.com/p/delphi-spring-framework/" rel="nofollow noreferrer">Spring</a> a bit but this require an update from D2007 and that will not happen now. Maybe next year.</p> <p><strong>The question</strong> Most code is still not tested automatically. So what is the best path to go for increasing testability of old code ? Or maybe it is best to start writing tests for new methods only ? I’m not sure what is the best way to increase automatic testing and comments about it is welcome. Can we use D2007 + DUnit now and then easily change to Delphi XE2 + Spring later ?</p> <p><strong>EDIT:</strong> About current test methodology for manual testing is just "pound on it and try to break it" as <a href="https://stackoverflow.com/users/289135/chris-thornton">Chris</a> call it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload