tdd

The Agile Way: Integration Testing vs Functional Testing or both?

Hi, I would in an office which has been doing Agile for a while now. We use Scrum for project management and mix in the engineering practices of XP. It works well and we are constantly learning lessons and refining our processes. I would just like to tell you about our usual practices for testing and get feed back on how this could be ...

Testing transactional code

Hello, I'm writing my own transaction-aware (IEnlistmentNotification) piece of code and am trying to test it using XUnit. All I need is to wait the transaction commited and test the outcome is what I expect. The thing is that transaction commitment happens in a separate thread, so I need to synchronize my test and piece of code I'm test...

Examples of great software design and implementation

I hope this isn't a duplicate... What is the most solidly designed and implemented software system/framework/application that you've come across? It seems like TDD, SOLID principles, OO design patterns, and things like that can be easily theorized on podcasts and blogs using really simple examples, but it's hard to imagine developing ...

What kinds of unit tests pay off the most in business value?

My question assumes that folks already believe that unit tests of some sort are worthwhile and actually write them on their current projects. Let's also assume that unit tests for some parts of the code are not worth writing because they're testing trivial features. Examples are getters/setters, and/or things that a compiler/interpreter ...

How do you tell that your unit tests are correct?

I've only done minor unit testing at various points in my career. Whenever I start diving into it again, it always troubles me how to prove that my tests are correct. How can I tell that there isn't a bug in my unit test? Usually I end up running the app, proving it works, then using the unit test as a sort of regression test. What i...

Easiest way to learn mocking in C#?

Please advise on the easiest learning path, as well as simple mocking library to start with. ...

Open source projects that demonstrate TDD and SOLID priciples

I asked a similar question before, and got some good answers, but I think it was too general. http://stackoverflow.com/questions/559484/examples-of-great-software-design-and-implementation Does anyone know of any open-source projects that demonstrate really good TDD practices, and SOLID principles? TDD and SOLID are widely publicized,...

What is the Best Practice to manage older unit test when you're debugging or adding a new feature?

Hi Guys, I'm trying to understand what's the best way to manage older unit test that doesn't really match or works anymore due to reason like bugs or logic changes in your code? Do we just skip them all by and modify them to fit the current logic? For example if those tests weren't written by you, and now you're in charge to modify the ...

How to do TDD with hardware

All the projects I work interface to a piece of hardware and this is often the main purpose of the software. Are there any effective ways I can apply TDD to the code that works with the hardware? Update: Sorry for not being clearer with my question. The hardware I use is a frame grabber that capture images from a camera. I then process...

How far should you apply TDD?

I see the benefit of TDD, and I'm trying to learn how to wrap my head around it. I'm also reading more about DDD and want to start applying both of them to my software projects. I've purchased a few "hands on" programming books (by "hands on" I mean ones that discuss a real world application with real solutions as opposed to small snip...

Data structure for Double Elmination Tournament

I am in the process of converting my Tournament Organizer software, which allows the creation and manipulation of Double Elimination Tournaments, to use the MVVM design pattern so that it can be more easily tested. In doing so, I'm separating out the 'model' from some code in the UI that directly manipulates the bracket structure. This ...

Creating mock data for unit testing

I consider myself still pretty new to the TDD scene. But find that no matter which method I use (mock framework or stubbing my own objects) I find that I have to write a lot of code to create mock data. I like the idea of loading up objects to create an in-memory database. But what I don't like is cluttering up my tests with a ton of cod...

When to unit-test vs manual test

While unit-testing seems effective for larger projects where the APIs need to be industrial strength (for example development of the .Net framework APIs, etc.), it seems possibly like overkill on smaller projects. When is the automated TDD approach the best way, and when might it be better to just use manual testing techniques, log th...

TDD: Static methods, dependency injection, caching, and you!

Hope I can explain this somewhat decently, as it's blowing a fuse in my brain today. I'm learning TDD in C#, so I'm still trying to rewire my brain to fit it. Let's say I have a User class, that previously had a static method to retrieve a User object (simplified below). public static User GetUser(string username) { User user = GetU...

testing an internal class

how to write unit tests to internal classes ??? ...

TDD and DI: dependency injections becoming cumbersome

C#, nUnit, and Rhino Mocks, if that turns out to be applicable. My quest with TDD continues as I attempt to wrap tests around a complicated function. Let's say I'm coding a form that, when saved, has to also save dependent objects within the form...answers to form questions, attachments if available, and "log" entries (such as "blahblah...

TDD and JPEG compression

In the notorious stackoverflow #38 Joel talked about how difficult it would be to do TDD for something like JPEG compression. Bob Martin wanted to cover how to do TDD for an instance such as that during podcast #41 but I don't think they ever got to it. Thus: How would one go about using TDD to develop and test jpeg compression? ...

Is it bad practice to run tests on a DB instead of on fake repositories?

I know what the advantages are and i use fake data when i am working with more complex systems. What if I am developing something simple and I can easily set up my environment in a real DB and the data being accessed is so small that the access time is not a factor and I am only running a few tests. Is it still important to create fak...

TDD for a Device Communicator

I've been reading about TDD, and would like to use it for my next project, but I'm not sure how to structure my classes with this new paradigm. The language I'd like to use is Java, although the problem is not really language-specific. The Project I have a few pieces of hardware that come with a ASCII-over-RS232 interface. I can issue...

How can I remove the "Test With" menu left after uninstalling TestDriven.NET?

I have uninstalled my trial of TestDriven.NET but it leaves this menu behind on the context menu. How can I remove this? ...