Tampilkan postingan dengan label codecamp. Tampilkan semua postingan
Tampilkan postingan dengan label codecamp. Tampilkan semua postingan

Fairfield/Westchester code camp

Diposting oleh good reading on Rabu, 24 Oktober 2007

I will be at presenting a session on Testing with Mocks at the the Westchester/Fairfield code camp on November 11.

Register here

The session is a shortened version of the tutorial Oksana and I are giving at the Agile Development Practices conference in December.

Hope to see you there!
More aboutFairfield/Westchester code camp

Continuous Integration, revisited...

Diposting oleh good reading on Senin, 12 Maret 2007

Sorry for the delay... I was sick with a broken dev machine, and without our source tree for reference, my knowledge on the subject is, well, not quite there...

Oxygen was setup for continuous integration before I started, so I know the "how" it works, but not the "why."

Before I started, I never had continuous integration setup (wow, I didn't know what I was missing!), so I don't know if my previous organizing methods would have worked so well... (even if I did really like them)

On to the point...

We use subversion for source control and have a build server running CruiseControl. We try to keep the build machine clean, so we're confident we have the project dependencies under control. The build machine does not even have Visual Studio installed -- just the .NET SDK so our projects can be built on the command line.

As for the development tree, its pretty simple:

1. Project Root
a. lib (Oxygen libraries)
b. tools (3rd party libraries) -- references like mbunit or rhinomocks and tools needed to build (like nant, msbuild...)
c. src (project source code)

There are some other folders in the root, but they are specific to the project, like documents or media... All references are to assemblies in lib or tools, never the GAC, this minimizes dependencies that need to be installed on the build server.

The only other file of note in the project root is our build file, which is a NAnt script. This script has several targets, like compile, unit-test, setup-dev-environment, install, cruiseconrol, etc (such a pain to write, but well worth the effort!) The cruisecontrol target, compiles, runs tests, builds installers, deploys installers, runs metrics, sends us result emails and has our bunny tell us updates.

So, "D", I hope this satisfies your curiosity about our development tree! If you have more specific questions, please let me know :)
More aboutContinuous Integration, revisited...

Development tress and continuous integration...

Diposting oleh good reading on Selasa, 06 Maret 2007

Oksana, who doesn't have a blog to answer this on her own, is very disappointed I have not responded to the comment asking how we setup our development tree for continuous integration...

Well, its war room hours and I haven't had a chance to respond, so this post serves as a reminder, that yes Oksana, I will respond... back to coding :)
More aboutDevelopment tress and continuous integration...

InternalsVisibleTo

Diposting oleh good reading

At the chat on mocks, I mentioned you can test "internal" methods in your test fixture even if it isn't in the same assembly as the class under test (CUT). I used the wrong terminology (of course) and called it making the assembly friends, so if you spent the last few days googling that, my appologies :P

Testing internal methods comes in handy quite a bit:
1. Testing things that you don't want other assemblies accessing
2. Testing state machines or some other context of a class that you wouldn't otherwise expose
3. Using partial mocks

So, how do you let your test assembly access you internal methods?

Its quite easy, first you'll need your test assembly to have a strong name. Once thats done, you need to add one line to your CUT's AssemblyInfo.cs file.

[assembly: InternalsVisibleTo("TestAssembly, PublicKey=yourpublickey")]

For those of you used to 2003, you give your assemblies key files in the properties of the project and not in the assembly info :)
More aboutInternalsVisibleTo

Failing at TDD

Diposting oleh good reading on Sabtu, 03 Maret 2007

Someone asked for more clarification about how I failed at TDD... I gave reasons why I failed, but no measurement of success. In the class, I had said that I failed until I finally changed my way of thinking and actually got what test driving is all about...

But I was thinking about this statement on the way home and this isn't true. Even after I understood how to test, my classes under test would outgrow their test fixtures because I wasn't in the habit of writing tests first or the tests were too rigid to change or I just wanted to get something to work really quick without having to write a test... a little extra code here and there eventually leads to a lot of failing tests, ignored tests, ignored assemblies and then total failure...

A few years ago I was lucky enough to have lunch with Bob Martin and we had a long talk about discipline. I would argue that this is the most important attribute for test development (he really knew what he was talking about, how little I knew then).

I finally considered myself successful in TDD when I had several projects that were test driven, and continued to evolve test driven as well... i.e. I was finally successful when my tests were refactored with the rest of my code, my tests continued to drive change and it wasn't painful.
More aboutFailing at TDD

Hope you had fun at code camp

Diposting oleh good reading



For everyone who sat in on our talks at code camp, thanks for being a great audience. I'll post some notes, answers to questions and code samples in the near future.

We hope you had fun and maybe learned a thing or two :)
More aboutHope you had fun at code camp

Code Camp Registration is Now Open

Diposting oleh good reading on Minggu, 18 Februari 2007

Register Here
Thanks for the link Luke!
More aboutCode Camp Registration is Now Open