failing-tests

TDD - When is it okay to write a non-failing test?

From what I understand, in TDD you have to write a failing test first, then write the code to make it pass, then refactor. But what if your code already accounts for the situation you want to test? For example, lets say I'm TDD'ing a sorting algorithm (this is just hypothetical). I might write unit tests for a couple of cases: input =...

How do you deal with failing Unit Tests?

I have a number of projects in a solution file that have unit tests written for them and I am wanting to set them up to be run by our continuous integration server. However, because many of the tests have been written poorly and have not been run regularly there are many that are failing. I don't have the time at the moment to fix all o...

Java/Swing FEST test fails absurdly

I have a test that sometimes fails on the requireSelected() call, and I can't figure out why. public void testSimple() { JRadioButtonFixture fixture = getFixture(); fixture.check(); fixture.requireSelected().requireVisible(); } I tried changing the code to run on the EDT instead of in the test's main, but none of the fixture's m...