Conceptric
  1. Testing applications for the Web

    I’ve spent more time on web development using PHP frameworks recently, and I’m realising just how difficult it is to provide the sufficient code coverage, avoiding that feeling that I’m about to step on a mine.

    My experiences got me thinking about what I needed to code confidently. As a minimum, I need to know that everything works before committing code to version control, but security comes with regular testing, and this is no use unless everything is covered.

    Based on web development frameworks using the nearly ubiquitous MVC design pattern, the logic and side effects at each application tier must be tested, and I came up with this list.

    1. The Database tier schema, whether RDBMS, XML or anything else.
    2. Data Access logic is usually implemented in models, but often uses built-in features of the framework, such as ActiveRecord.
    3. Business logic is encapsulated in the models, libraries, and sometimes controllers.
    4. Presentation logic at the server comprising controllers and their respective views.
    5. Presentation and business logic at the client tier implemented by DOM scripting, mostly in JavaScript.
    6. The actual data presentation at the client tier based on XHTML and CSS.

    I’ve tried to order it from inside the application, working out from the data tier to the client, and it’s quite a list; I’d be interested to hear what I’ve missed.

    Since this is a huge topic, I hope to write a series of posts isolating specific areas as I encounter them, and comparing tools and approaches. The first will look at how a few development frameworks in popular languages appear to measure up.

    There are no comment for this post at the moment. Please feel free to let me know what you think.

    What do you think?

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.