0

Citing JUnits homepage: "JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks."

According to a the answer of this question: Library vs. framework vs API?, a framework is "a collection of patterns and libraries to help with building an application" and library is defined as "a collection of functions / objects that serves one particular purpose. you could use a library in a variety of projects".

As a framework is said to have collection of libraries, why is junit called a framework and not a library?

3
  • 1
    Possible duplicate of Library vs. framework vs API? Commented Aug 23, 2016 at 11:06
  • @gnat: I updated my question, with more detail. Commented Aug 23, 2016 at 12:16
  • 2
    Top comment on the answer you cite: "That's not a very good definition of a framework.". Look at the other comments and the others answers. Commented Aug 23, 2016 at 12:18

1 Answer 1

9

A simple rule of thumb that many use for whether to call something a library or framework is:

  1. Does the external code call your code, ie does the external code control your code? Is yes, it's a framework.
  2. Does the external code only get called by your code (ignoring callbacks), ie does your code control the external code? Is yes, it's a library.

"Tool" is a very generic term that could be applied to all frameworks, libraries, apps, APIs, SDKs etc, so probably isn't a good choice of term for JUnit.

answered Aug 23, 2016 at 10:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.