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?
-
1Possible duplicate of Library vs. framework vs API?gnat– gnat2016年08月23日 11:06:13 +00:00Commented Aug 23, 2016 at 11:06
-
@gnat: I updated my question, with more detail.Mostafa Mahdieh– Mostafa Mahdieh2016年08月23日 12:16:49 +00:00Commented Aug 23, 2016 at 12:16
-
2Top 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.Michael Borgwardt– Michael Borgwardt2016年08月23日 12:18:48 +00:00Commented Aug 23, 2016 at 12:18
1 Answer 1
A simple rule of thumb that many use for whether to call something a library or framework is:
- Does the external code call your code, ie does the external code control your code? Is yes, it's a framework.
- 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.
Explore related questions
See similar questions with these tags.