tdd

Mock/fake test data generator into NET classes

Does anyone know of a test data generator that will create the code to populate a .NET collection class which can then be copied into a unit test? Searching this site, all the tools mentioned seem to hit databases and I already have Red Gate's SQL Data Generator for that task. However if one follows the TDD paradigm and/or model first d...

How to indicate that a PHPUnit test is expected to fail?

Is it possible to mark a test as "expected to fail" with PHPUnit? This would be useful when performing TDD, and you want to distinguish between genuinely failed tests, and tests that happen to fail because the associated code hasn't been written yet. ...

When applying TDD, what heuristics do you use to select which test to write next?

The first part of the TDD cycle is selecting a test to fail. I'd like to start a community wiki about this selection process. Sometimes selecting the test to start with is obvious, start with the low hanging fruit. For example when writing a parser, an easy test to start with is the one that handles no input: def testEmptyInput(): ...

Which agile practices are compatible with game development?

Hi, Lately I've been a lot into agile methodologies. Some papers I've read at Martin Fowler's website looked thoroughly unflawed to me to say the least, and I was wondering what agile practices are most suited to game development, particularly for small-budget, small-sized and inexperienced team projects (bold because it's really import...

How can I open multiple concurrent sessions with cucumber, capybara, and selenium?

I'm fixing up some old integration tests for our (RoR 2.3.5) website, and some scenarios (and their behaviors) depend on having multiple users logged in simultaneously. Once upon a time, these worked... three engineers and 18 months ago. Our basic scenarios are written in cucumber, with capybara binding to selenium. I've tried all of t...

How to TDD for CouchDB with CouchApp?

Recently I've discovered CouchDB. I want to use CouchApp to build a flash games site. It looks like a perfect fit 'cause this kind of a site is totally document based with a bit of binary attachments. The only thing I need to learn before I start is how to TDD with CouchApp/CouchDB. I couldn't google any workflow tutorial and I'm not ex...

Best Practice: Order of application design

I can think of quite a few components that need to be created when authoring a web application. I know it should probably be done incrementally, but I'd like to see what order you usually tackle these tasks in. Layout your usual order of events and some justification. A few possible components or sections I've thought of: Stories (i...

Resources for learning TDD and getting setup on Windows 7 for doing TDD with Rails?

I am trying to learn TDD, but getting RSpec + Autotest setup on Windows 7 has been a pain. Does anyone have any good resources that can point me in the right direction of getting this thing setup, so I can continue learning how to do TDD in Rails? Thanks. ...

Please review my test architecture (in memory database)

I've just started with unit testing, and would like to know if I'm on the right track. Can you guys please take a look at my code and tell me what you think if it? This is the (basic) method that I want to test: public void Accept(long resumeId) { // Get the resume that has to be accepted Resume originalResume = ResumeDAC.GetById...

"Run tests" in Visual Studio are not testing Class Library projects

"Run tests" in Visual Studio are not testing "handmade" Class Library projects. Is only testing one "test project"that was created automatically. If I run TestDriven.Net all the test projects are tested, but not with "Run tests" of Visual Studio. Why? I can I make him test them all? :P ...

Static Methods : When and when not

I am new to TDD and DDD and I have one simple question regarding static methods in general. Most of the gurus of TDD says in one word that static methods are bad (and that we should forget about creating tons of static utilities that we (um or I) used to make before as they are not testable. I can see why they are not testable ( a great ...

How do I test an abstract class's protected abstract method?

I've been working on the best way to test an abstract class named TabsActionFilter. I've guranteed that classes that inherit from TabsActionFilter will have a method called GetCustomer. In practice this design seems to work well. Where I've had some issues is figuring out how to test the OnActionExecuted method of the base class. This m...

Is it proper TDD practice to design your model before you write tests, or write tests that design your model?

I am building a DDD system and we have all the requirements on paper for the system already set. There is a disagreement on how we go about building our domain model that I need an opinion on. My preference is to take the requirements and sketch out a basic domain model with the outline for the classes, their properties and behaviors a...

How do you create a mock object without an interface class in AMOP?

I'm just getting into Test Driven Development with mock objects. I can do it the long way with UnitTest++, but now I want to try to minimize typing, and I'm trying to use AMOP mock framework to do the mocking. AMOP states: The main differences between AMOP and other mock object library is that, users DO NOT need to implement the ...

Test driven development for SQL code

Have you applied test driven development to purely sql scripts? if so what has been your experience. Is it worth it? What are the rewards? disadvantages ? etc. ...

Has anybody tried Test Driven Development on Netsuite?

I'm new to Netsuite customizations and I'm wondering if anyone has used any unit testing tool that plays nice with Netsuite. ...

Where does my DDD logic belong?

I’ve been persuaded by Eric Evans’ book and am integrating DDD into my framework. All basic elements (services, repositories, bounded contexts, etc) have been implemented and now I’m looking for feedback on how to correctly integrate this. I have some business logic which has to be performed when an entity is created or modified. This e...

Project Performance with Agile Development

I remember reading an article stating that someone had measured project performance under Agile (or maybe just TDD?) and found that it accomplished projects more efficiently than its alternatives. Does anyone know where I can find that, or a similar article? ...

Increase scan rate autotest with rspec

I find the integration with RSpec, Growl and rails particularly useful. However, it takes about two to three seconds before a change (save file) is picked up by autotest. Is there a way to increase the interval by which autotest scans for filechanges? ...

Can't use flash in ActionView::TestCase when I want to test my helper class

I wanted to test a method in my helper class but when I do something like: require 'test_helper' class ApplicationHelperTest < ActionView::TestCase def test_flash_messages flash[:notice] = "Hello World" assert_equal "<div class=\"message-notice\">Hello World<\/div>", flash_messages end end than I get "NoMethodError: undef...