Hot answers tagged

9 votes

Agile test driven development

Taking the waterfall model in agile would be a good idea but there seems to be a misunderstanding on your part regarding the concept of test driven development. Test driven development doesn't mean ...
user avatar
8 votes
Accepted

Will writing unit tests block developers from coding?

The TDD cycle is more a development cycle for a developer, to quote James Shore, The Art of Agile, Test-Driven Development chapter: Programmers new to TDD are often surprised at how small each ...
user avatar
8 votes
Accepted

What is exact difference between TDD and BDD?

TDD (Test Driven Development) Who's involved: Developers Summary: Developers start writing code by first defining tests (in general unit tests). It could sound strange, but this practically ...
user avatar
7 votes

QA in an Extreme Programming Agile Environment

The short version: regardless of the development methodology, your role is to provide information about the overall quality of the application. You do that via testing anything that isn't included in ...
user avatar
  • 30.8k
6 votes

What is exact difference between TDD and BDD?

Both are a form of test driven development, since you write the tests upfront. The main difference is that TDD tests are technical tests often unit-tests created during developing of a feature and are ...
user avatar
6 votes
Accepted

Is dependency injection suitable for TDD?

Yes, proper dependency injection benefits testing and TDD greatly because it allows to test individual components/dependencies easier - mocking/stubing each of the dependencies without affecting any ...
user avatar
  • 11.4k
6 votes

Is dependency injection suitable for TDD?

The TirePressureMonitoringSystem coding kata is an situation that is very hard to test without dependency injection. It simulates an Alarm which is part of tire pressuring system. The implemented ...
user avatar
5 votes

How to handle “fake” unit tests that don’t really test anything?

I believe that the strongest instrument for filtering such a-low-quality tests is a code review. You can power-up your code review with mutational testing techniques which will help you to detect the ...
user avatar
  • 11.4k
4 votes

Challenges of begining test driven development with legacy codebase

This book is exactly what you need: Working Effectively with Legacy Code by Michael Feathers. Michael offers several approaches to TDDing legacy code. One of those is: Before you add a new feature, ...
user avatar
  • 4,440
4 votes

What is exact difference between TDD and BDD?

Adding my view points here. TL;DR : BDD focuses on the behavioural aspect of the system rather than the implementation aspect of the system that TDD focuses on. BDD gives a clearer understanding as ...
user avatar
  • 3,540
4 votes

Will writing unit tests block developers from coding?

I'd plan it this way: The specific tests that are written 'before the code' are unit tests that are written by developers just before they write the actual code. It should only take 5-20 minutes to ...
user avatar
4 votes
Accepted

Why does the test always fails at the start in TDD?

D) There is no code This is the one and only correct answer because the idea of TDD is that you only implement code for which you have a failing test. It prevents you from implementing things you do ...
user avatar
3 votes

Importance of using TDD with Selenium/Webdriver

Test-Driven Development is a way of of developing software, its a practise. It is a process you can follow. You write a failing tests and implement just enough code to make the test pass, afterwards ...
user avatar
3 votes

Will writing unit tests block developers from coding?

Unit tests should be written by developers. Unit tests are very close to the core code and developers have intimate knowledge of how units should work. testers are usually more removed from the deep ...
user avatar
3 votes

Will writing unit tests block developers from coding?

If developers also write unit tests, then what's the point of having special testers in our team and should we replace testers with developers? Unit testing is not the only kind of automated testing. ...
user avatar
  • 23k
3 votes

TDD and Refactoring

Short answer: Limit refactoring to "removing duplication". This is Kent Beck's summary of the refactoring step in Test-Driven Development by Example. Long answer: the time spent refactoring because ...
user avatar
3 votes

TDD and client-server interactions

Lets assume that you go with the TDD approach to writing your tests. In this case you should be focusing on writing tests for the code you are implementing. If in this case you are working on client ...
user avatar
  • 1,523
3 votes

What are some common pitfalls of Test Driven Development?

In TDD you write the minimum amount of code to pass the test case. That test case, of course, should only be testing at a unit level. You want to test individual pieces, so you write test cases to ...
user avatar
3 votes

Suggestions for "Selling" TDD, and BDD to sceptical non engineering managers

In my experience, you can't sell new development processes. The only path I've found which works is to simply start doing it: Only develop with TDD from this point forward. You'll still deliver your ...
user avatar
3 votes

How do I build a personal project big enough to learn from automated testing it?

To learn TDD I suggest doing a kata everyday. Start with the String Calculator Kata and do it test-driven. The coding dook handbook has loads more example kata's to practise and learn the following ...
user avatar
3 votes

Can we use java to design specflows?

Use cucumber. Specflow is a part of cucumber family that is developed for .Net world. So if you do not need .Net but need Java, just use the solution that was originally intended for Java
user avatar
  • 11.4k
3 votes

Design test class dependent on current datetime, 24 hours a day, seven days a week

You can use some Boundary Value Analysis to filter out the list of test cases. You would probably do a better risk analysis than anyone else in this case, but I can imagine the following as the ...
user avatar
  • 9,949
2 votes

Should I write a small test for every ticket / defect?

Just like with everything else in IT - it depends. Depends on whether the bug can be easily reproduced, it depends on how severe this bug is, depends on the chance of the bug reappearing again ...
user avatar
  • 21
2 votes

What methods or resources could I use to refactor current programs to use test-driven development?

It really doesn't work that way. Test-Driven really means that the tests come before the code. So if you already have the code, it's too late to test-drive it. What you can do, on a project which ...
user avatar
2 votes

How to dissect a large legacy codebase and start using TDD

This book is exactly what you need: Working Effectively with Legacy Code by Michael Feathers. That book goes directly to both of your questions: How to start refactoring a legacy codebase, and how to ...
user avatar
  • 4,440
2 votes

What are the disadvantages of test driven development?

You should teach developers to write tests Test writing is time consuming It's complicated to judge test completeness TDD may not work due to project workflow and features TDD doesn't give you ...
user avatar
  • 789
2 votes

What are some common pitfalls of Test Driven Development?

Make each test very small and focused. Avoid making tests depend on each other, either explicitly or implicitly. Dependencies among tests are a path to pain, expense, fragility, and complication. I ...
user avatar
  • 4,440
2 votes
Accepted

Given When Then - is one 'then' per test acceptable usage?

One assertation ('then') per test is a good thing and generally considered a best practice. It may seem a bit wordy and long but the idea is that when it fails you know exactly and specifically what ...
user avatar
2 votes

How do I build a personal project big enough to learn from automated testing it?

Need to do following: Learn Phases of software development Need to learn why testing is necessary Need to think logically where ans what functionality of an software should have and is software ...
user avatar
2 votes

How do I build a personal project big enough to learn from automated testing it?

@Frank I think for most successful new testers the testing mindset usually precedes a lot of the technical skill depth. When I talk to people starting their testing careers one of my go-to speeches ...
user avatar
  • 1,189

Only top scored, non community-wiki answers of a minimum length are eligible