Learn how to use JUnit as well as TDD principles to create automated execution code for testing.

I was asked a question from someone learning how to automate with Java. I’ve rewritten and paraphrased the question below.

I see that JUnit is a way for a developer to write Unit tests because I want the outcome of the code to work as per assertions. JUnit is for Unit Testing. And Unit tests are written by developers. When will a tester use JUnit?

I think it is a good question, because JUnit is often presented as a “Unit Testing Framework” and “TDD” is for creating application code. How could any of that apply to automated execution code written to support Testing?

Much of the automated execution code we write is not TDD in a traditional sense.

#java #junit #testing

JUnit and TDD for Testing
1.95 GEEK