Community report: Sydney cloudcamp 2010 – Ultraserve

The 5th lightning talk at the cloudcamp was done by Samuel Yates from Ultraserve
http://ultraserve.com.au


http://www.vimeo.com/15703781

By David Burela

Developer Blog Banter #2 response

This is my response to the 2nd Developer Blog Banter. The question asked is

How do you organise your tests. Do you separate your unit tests, integration tests and UI tests into separate projects? Do you do anything specific to keep track of your tests? What naming conventions do you use? Do you run them before a check in or is that what the build server is for?

Structure

Most of my testing efforts focus on unit testing. I structure it so that I have a unit test project per code project. For example

DavidSolution
/BusinessLogic
/BusinessLogicTests
/MoreCode
/MoreCodeTests
/…

If it is a really small application with only a logic project and a host, then I will usually roll the tests into a single unit test project.

Naming conventions old

My naming conventions of my unit tests have change from project to project. On my last project I used to put all unit tests for a class into a single test class and do name each test something similar to this TheBusinessLogicCreatePersonMethodShouldReturnANewPerson()

However I found the names too long to quickly see what broke. Having them all the tests in a single TestClass combined with the tests being sorted alphabetically in the test results it would make it really hard to see what area of my code had broken.

Naming conventions new

I was talking to Damian Maclennen who showed me an example of how he is setting up his BDD tests. I took his approach of using extension methods and bastardised it into my new naming convention.

In my unit test project, I have a namespace for each logic class I am testing. E.g. Person
DavidProject.BusinessLogicTests.Person

Inside of that namespace I have a TestClass for each method I am testing on that class. I name the test class with the method name and ‘Should’ appened to the end, e.g.
CreatePersonShould

Finally I have all of my tests for that method inside that class. This brings it out so my tests look like

namespace DavidProject.BusinessLogicTests.Person
{
    [TestClass]
    public class CreatePersonShould
    {
        [TestMethod]
        public void NotCrashWhenPassedNull()
        {
        ....
        }
    }
}

When I run my tests in Resharper, I will then see all of the tests nested nicely by class name, and then all of the tests for that method.

When do I run them?

Whenever I change a big chunk of code. I don’t practice TDD, I usually create tests and code together as I write (or slightly after I have finished writing the code).

I haven’t set it up to run them on the build server on my current project, that is something I’ll get running this week.

Other forms of testing

I don’t do automated UI tests as I feel the effort required to script them isn’t worth the pay off as they are very brittle.

By David Burela

Developer Blog Banter #2: How do you test your applications?

Last time we discussed how you organise your technology stack. This month’s discussion point is around testing your applications.

How do you organise your tests. Do you separate your unit tests, integration tests and UI tests into separate projects? Do you do anything specific to keep track of your tests? What naming conventions do you use? Do you run them before a check in or is that what the build server is for?
If you are not testing, then how would you like to test your apps if given the opportunity?

I apologise, it has been a while since the last Developer Blog Banter. I was too busy getting my applications ready for the launch of Windows Phone 7.

As usual, comment on this post when you join the Developer Blog Banter and I’ll add your response below

Participants

  1. David Burela – testing applicaitons
  2. Liam Mclennan – testing, huh! what is it good for?
  3. Tarn Barford – How do you test your applications?
  4. Eric Ridgeway – I can haz tests?
  5. Peter Gfader – How do you test your applications?

By David Burela

Community report: Sydney cloudcamp 2010 – IBM

The 4th lightning talk was done by Adam Ginsberg from IBM http://www.ibm.com/cloud/learn


http://www.vimeo.com/15703326

By David Burela

Community report: Sydney cloudcamp 2010 – enStratus

Here is the 3rd lightning talk at the Sydney Cloudcamp

Anne Bilek @AnneBilek from enstratus talks about cloud governance. This was one of the most random lightning talks I have seen. She was told the day before that she would be delivering someone else’s slides, so she is a little confused and the talk comes out very quirky as she tries to do the talk on the fly.


http://www.vimeo.com/14946964

By David Burela

The next Melbourne Cloudcamp

The next cloudcamp in Melbourne is scheduled for Thursday 7th October 2010. The location is the same as the event earlier this year.

The event in Melbourne had a good turn out with some interesting lightning talks and breakout sessions. I recorded the lightning talks and they are available on my blog

I’ll be taking my camera along to record as much of the event as I can again. Hope to see you all there!

By David Burela

Follow

Get every new post delivered to your Inbox.