- 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.
- OpenDaylight Cookbook
- Python快樂編程:人工智能深度學習基礎
- PaaS程序設計
- C語言程序設計(第2版)
- Selenium Design Patterns and Best Practices
- ASP.NET Core 2 and Vue.js
- Java Web基礎與實例教程
- Getting Started with Laravel 4
- Learning Laravel's Eloquent
- 區塊鏈技術進階與實戰(第2版)
- Continuous Delivery and DevOps:A Quickstart Guide Second Edition
- 零基礎學Java第2版
- TypeScript全棧開發
- Vue.js 3.x高效前端開發(視頻教學版)
- Java程序設計及應用開發