- Mastering Software Testing with JUnit 5
- Boni García
- 345字
- 2021-07-02 15:34:27
JUnit ecosystem
JUnit is one of the most popular test frameworks for the JVM, and it is considered one of the most influential frameworks in software engineering. We can find several libraries and frameworks that provide additional functionality on top of JUnit. Some examples of these ecosystem enhancers are:
- Mockito (http://site.mockito.org/): This is the mock framework, which can be used in conjunction with JUnit.
- AssertJ (http://joel-costigliola.github.io/assertj/): This is the fluent assertions library for Java.
- Hamcrest (http://hamcrest.org/): This is the library with matchers that can be combined to create flexible and readable assertions.
- Cucumber (https://cucumber.io/): This is the testing framework that allows to run automated acceptance tests written in a Behavior-Driven Development (BDD) style.
- FitNesse (http://www.fitnesse.org/): This is the testing framework designed to support acceptance testing by facilitating detailed readable descriptions of system functions.
While JUnit is the largest testing framework for the JVM, it is not the only one. There are several other testing frameworks available for the JVM. Some examples are:
- TestNG (http://testng.org/): This is the testing framework inspired from JUnit and NUnit.
- Spock (http://spockframework.org/): This is the testing and specification framework for Java and Groovy applications.
- Jtest (https://www.parasoft.com/product/jtest/): This is the automated Java testing and static analysis framework made and distributed by the company Parasoft.
- Scalatest (http://www.scalatest.org/): This is the testing framework for Scala, Scala.js (JavaScript), and Java applications.
Thanks to JUnit, testing has moved to a central part of programming. Consequently, the underlying testing model implemented in JUnit, has been ported to a set of testing frameworks outside the boundary of the JVM, in the so-called xUnit family. In this model, we find the concepts of test case, runner, fixture, suite, test execution, report, and assertion. To name a few, consider the following frameworks. All of them fall into the xUnit family:
- Google Test (https://github.com/google/googletest): Google's C++ testing framework.
- JSUnit (http://www.jsunit.net/): Unit testing framework for JavaScript.
- Mocha (https://mochajs.org/): Unit testing framework running on Node.js.
- NUnit (https://www.nunit.org/): Unit testing framework for Microsoft.NET.
- PHPUnit (https://phpunit.de/): Unit testing framework for PHP.
- SimplyVBUnit (http://simplyvbunit.sourceforge.net/): Unit testing framework for VB.NET.
- Unittest (https://docs.python.org/3/library/unittest.html): Unit testing framework for Python.
- The Complete Rust Programming Reference Guide
- Mastering JavaScript Functional Programming
- Visual FoxPro程序設計教程(第3版)
- Python機器學習算法與實戰
- 程序員修煉之道:通向務實的最高境界(第2版)
- Reactive Android Programming
- INSTANT Sinatra Starter
- Learning Node.js for .NET Developers
- C++程序設計
- 30天學通C#項目案例開發
- Python第三方庫開發應用實戰
- 量子計算機編程:從入門到實踐
- Python計算機視覺與深度學習實戰
- WCF全面解析
- HTML5+CSS3+jQuery Mobile+Bootstrap開發APP從入門到精通(視頻教學版)