Top "Tdd" questions

Test-Driven Development (TDD) involves writing a failing automated test to specify what is to be built.

Mocking file objects or iterables in python

Which way is proper for mocking and testing code that iters object returned by open(), using mock library? whitelist_data.…

python tdd mocking python-mock
How to unit test a method that runs into an infinite loop for some input?

This question just occurred to my mind and I want to ask this here. The case is intentional, I just …

unit-testing junit tdd nunit infinite-loop
Test-Driven Development - How to write a test before none of implementation code exists

I'm learning TDD but struggling to adopt it as it's not straightforward. The question I cannot answer is "How to …

java unit-testing junit tdd
How to repeat/loop through mocha tests

I've been working on a few mocha/chai tests, and I still haven't found a good way of running my …

tdd mocha chai
Do polymorphism or conditionals promote better design?

I recently stumbled across this entry in the google testing blog about guidelines for writing more testable code. I was …

c++ oop tdd polymorphism
How Snapshot testing works and what does toMatchSnapshot( ) function do in Jest Snapshot testing for React components?

I am new to Jest testing and I was going through some examples of how test cases are written in …

reactjs tdd jestjs snapshot
Bash and Test-Driven Development

When writing more than a trivial script in bash, I often wonder how to make the code testable. It is …

bash tdd
When to rewrite a code base from scratch

I think back to Joel Spolsky's article about never rewriting code from scratch. To sum up his argument: The code …

architecture tdd testing
How can I unit test my ASP.NET MVC controller that uses FormsAuthentication?

I'm working with a ASP.NET MVC solution in a test driven manner and I want to login a user …

asp.net-mvc unit-testing tdd mocking forms-authentication
How to attach message to rspec check?

In rspec: Can I attach a message to a check the same way as I would do in xUnit style …

ruby tdd rspec xunit