tdd

Unit Tests/TDD options that can be used for Delphi and FreePascal

I know of the existence of DUnit for Delphi win32. What I'm after is a library that works both on Delphi AND FreePascal. If that is not possible at all, I would really appreciate a list of all the options for one(Delphi) AND the other(FreePascal) ...

Test Projects Conversion

I apologize. This is part rant, part question. For the rant: Dear MS developers who post MVC projects on CodePlex and dedicate their sites to MVC with TDD: I love to learn from you and thanks for the examples, but not everyone has Pro. I'm sick of not being able to load the test project portion of these things because use Standard, whi...

Refactoring strategy for the class which generates specific text file

Hi guys, I am a TDD noob and I don't know how to solve the following problem. I have pretty large class which generates text file in a specific format, for import into the external system. I am going to refactor this class and I want to write unit tests before. How should these tests look like? Actually the main goal - do not break th...

Integrate Silverlight Unit Testing with Visual Studio 2008 Test Results Panel?

I would like to run my Silverlight Unit Tests from Visual Studio instead of opening a new instance of my Silverlight Test App in the browser. Apparently it is possible (http://www.jeff.wilcox.name/2008/09/rc0-new-test-features/ - search for "Visual Studio Team Test log provider output")....but I don't understand how you enable this, doe...

Dumb Question about examples in Test Driven Development By Example by Kent Beck

I suspect that I'm missing something stupid, so feel free to blast me, but: I'm reading through Test Driven Development: By Example and one of the examples is bugging me. In chapter 3 (Equality for all), the author creates an equals function in the Dollar class to compare two Dollar objects: public boolean equals(Object object) { D...

What is the best way to automate integration testing MSMQ with Visual Studio Test suite / NUnit?

I would like to create a series of automated unit tests for an MSMQ application I am writing. As I see it, the challenge is how to accommodate the event handlers from the test method. That is, I send a message from the test method and need to return a result back to that test method that the message has been received and handled. I ha...

Multiple asserts in single test?

Let's say I want to write a function that validates an email address with a regex. I write a little test to check my function and write the actual function. Make it pass. However, I can come up with a bunch of different ways to test the same function ([email protected]; [email protected]; test.test.com, etc). Do I put all the incantations t...

Test Driven Development vs Automated Theorem Proving

One thing I've come to be interested in in digital logic/architecture design is Automated Theorem Proving to verify, for example, a floating point multiplication module. Unit tests are handy, but its almost intractable to try to test (brute-force) every possible input to a floating-point module. Instead, you find either a proof for (1)...

Disable render when testing a controller

Hi, I'm using Test::Unit with shoulda to test a controller. Since I'm just testing the controller I dont wanna the view to be rendered. I'm stubbing some objects, some errors are throw when the view is rendered, but the test shouldn't fail, because the controller is correct. So, theres any way to disable the rendering of a template/v...

What is unit testing?

I have read dozens and dozens about unit testing, and believe that I have learned through context only what a unit test is, but I want to be sure that I am right. What follows is my understanding of what a unit test is. Please correct this statement: "A unit test is a method that provides known arguments to the method being tested, an...

What would be a good browser-independent JavaScript programming environment?

My team's current project involves re-writing retrieval libraries in JavaScript. We are basically looking for a setup which enables us to apply test-driven development methods. So far we plan to use Vim to write the code, no fancy IDE. For generating output we would use Spidermonkey's shell environment. JSLint could serve as a moderate ...

Applying TDD when the application is 100% CRUD

I routinely run into this problem, and I'm not sure how to get past this hurdle. I really want to start learning and applying Test-Driven-Development (or BDD, or whatever) but it seems like every application I do where I want to apply is it pretty much only standard database CRUD stuff, and I'm not sure how to go about applying it. The...

TDD and DDD while still understanding the domain

When you are starting a new project from scratch using DDD, and still isn't very confortable with the domain, TDD comes at a price. While you're still understanding the details of the domain, you figure out a lot of stuff you've done wrong, like a method that makes more sense in some other class, or adding/removing parameters from a cons...

How do I do TDD correctly? When do I write tests for layers deeper than my business logic layer (i.e. DAL)?

I'm still uncertain about how best to use Mocks when doing development from the outside-in (i.e. write test first that mimics the customer's requirement) Assume my client's requirement is "Customer can cancel her order". I can write a test for this - Test_Customer_Can_Cancel_Her_Order. Using TDD I then write the business class and moc...

Test-Driven Development "Barriers to Entry"?

I'm in the process of doing a study on Test-Driven Development and one of the discussion points is the "Barrier to Entry" associated with TDD. Does anyone have any experience around this area, on any projects you've worked on that decided not to use TDD because the barrier to entry was too high? From what I can tell the only barrier to ...

I know I may not write production code until I have written a failing unit test, so can I tell my manager I cannot write UIs?

I've been using TDD for server-side development. I'm not really sure if the benefits of having all of my production code surrounded by unit tests outweigh the disadvantage of spending 4x more time than needed on refactoring. But when I'm developing UI code, I simply cannot apply TDD. To all fundamentalists out there, the first law of TD...

which build tool(s) do you recommend for python?

I'm starting a small/medium-sized python project, likely in Test Driven Development. My backgrounds are more in C and java than python (I used ant and makefile) I know that in python you might not need a build tool, but I will, because I'll use cython and PyInstaller (the thing should work on a couple of different UNIXes, without depend...

Introducing Test Driven Development in PHP

My workplace consists of a lot of cowboy coders. Many of them are junior. Which coincidentally contributes to a lot of code quality issues. I'm looking for suggestions on how to best wane my team into using TDD (we can start with Unit tests, and move into regression tests, and later more automated testing). Ultimately, I want us to l...

Mock svn instance for testing svnkit tests

Hi all A project I'm working on interacts heavily with Subversion, using svnkit. Are there any examples on running a mock in-memory svn instance, to help facilitate testing etc? Cheers Marty ...

What book on TDD for C# with treatment of Mocks

Can you recoment a book on on Unit Testing and TDD for C# with at least some treatment of Mock Objects? I have seen this question but it does not seem to mention mocking. ...