The first TDD test
You're adding coupon discount pricing rules to an online course app with TDD. In the red-green-refactor cycle, which example would you pick as the first test?
You're adding coupon discount pricing rules to an online course app with TDD. In the red-green-refactor cycle, which example would you pick as the first test?
Start with the simplest example, that a course costs its list price when there's no coupon, watch it fail first, then add one percentage discount, and after that add examples where the rules branch, like a maximum discount cap or stacked coupons.
TestingShort answerBasics
Why do you split test code into Arrange-Act-Assert (Given-When-Then)?
#tdd #red-green-refactor
TestingShort answerIntro
A teammate says they'd rather build one more feature than spend the time writing tests…
#unit-test
TestingShort answerIntro
What's the difference between unit tests, integration tests, and UI tests?
#unit-test
TestingShort answerAdvanced
You have dozens of UI tests that are slow and break often. How would you restructure the…
#unit-test