Questions tagged [tdd]
TDD stands for Test-Driven Development, or Test-Driven Design. It is the practice of writing a unit test before writing code to satisfy it, in what is known as the Red-Green-Refactor cycle.
668
questions
0
votes
2
answers
121
views
Setting up private properties for unit testing
I'm doing some TDD practice for my own learning.
I'm trying to figure out how to transparently set up private properties of an object to support testing.
I have a binary tree node:
internal class Node ...
3
votes
3
answers
1k
views
TDD when removing long lived feature
Suppose I had some Manager class that I need to change in regards to existing functionality by removing code.
The Manager always sends an initial message after a connection was established to do an ...
38
votes
12
answers
7k
views
How do unit tests facilitate refactoring without introducing regressions?
We all know the standard TDD cycle: I first write a unit test, the smallest unit test that fails; then I write some production code, again the smallest amount of production code that is sufficient to ...
0
votes
3
answers
352
views
Would you test this piece of configuration code? How do I determine which code is worth testing?
We have a piece of code that decorates an interface to transparently add retry logic.
Inversion of Control configuration
service.AddOurRestApiClient()
.AddResilienceHandler("Retry", ...
11
votes
4
answers
2k
views
Should you define acceptance tests for vital yet simple behavior?
I'm trying to practice BDD by applying it to a simple problem—in this case, the flocking algorithm, better known as "boids".
Before any of the rules (cohesion, alignment, etc.) comes the ...
1
vote
3
answers
419
views
Is low code quality and lack of testing the norm in B2B software development?
I've been working at this company for about a year now. it's a growth company working in B2B. I'm one year out of university, with a major in computer science. I work in the web team, using an Angular ...
0
votes
1
answer
67
views
Load Testing for Large-Scale Architecture Involving Cloud Servers and Switches
We currently have an architectural setup as described below. Our plan is to conduct a load test, but we face a challenge due to the high cost of real switches. We have two options: either build the ...
1
vote
2
answers
188
views
Can TDD be suitable for a small team with overlapping but not identical domain knowledge
I am trying to get a better understanding of TDD. From a quick google I've found this:
In layman’s terms, Test Driven Development (TDD) is a software development practice that focuses on creating ...
0
votes
4
answers
339
views
How to test a service that only connects other services
I'm currently scratching my and my colleagues head about whether and how we could test SyncService::syncFoo in any meaningful way
that does not involve basically recreating the whole call tree as ...
1
vote
3
answers
214
views
TDD - What to do when adding a new function on a dependency causes many previous tests to fail?
I was programming today and encountered something that just feels like I'm doing something wrong (maybe?). I've encountered this situation before, but I wanted to reach out and ask if there's a better ...
-1
votes
3
answers
115
views
Code Coverage and Unit Tests nomenclature [closed]
About tests:
I have the following view on nomenclature:
Unit tests are the kind of testes where you have a function
ExtractBacon, where there is a function with an entry parameter Pig
and a return of ...
2
votes
2
answers
498
views
Does the "Pyramid of tests" contradict the idea of tests focusing on behaviour?
I am talking about these two testing strategies :
Have a pyramid of tests (with many more unit tests than high-level tests), because high level tests are harder to maintain and slower (see also : ...
0
votes
3
answers
238
views
Test driven reduction of technical debt
Suppose you have been put in charge of an already existing project. As you are starting to familiarize yourself with the repository, you notice a few technical debt issues (insufficient test coverage, ...
2
votes
3
answers
248
views
Method that returns an object is it adequate for TDD?
Let's suppose I want to follow TDD (Test driven development) and I want to implement a class that is supposed to return a considerable object.
It starts to get really complex in my opinion and doesn't ...
9
votes
5
answers
3k
views
Do test-driven and behavior-driven development belong to the "verification" category?
In university, we were introduced to the two terms "verification" and "validation". The definitions can be summarized as follows:
Validation checks that the specifications and ...