Regression testing has nothing to do with a language. It is a technique that is used to ensure future code changes do not break existing features. In Java you can use junit or testng or anything else. Typically a regression test is a functional test and is not a pure unit test.
JUnit is generally aimed for unit tests rather than full-scale functional testing (of which regression testing is an example if one is looking at the system as a whole).
However, it is not uncommon to use a separate test suit to perform "heavy" functional and integration tests that connect to actual backends, etc., and verify results against expectations.
One reason for the use of JUnit here is the ability to go from 'mocked tests' to actual functional tests using dependency injection. You could provide, for example, a mock collaborator in the lighter test, and an actual collaborator instance in the full functional test.
发布评论
评论(3)
回归测试与语言无关。这是一种用于确保未来的代码更改不会破坏现有功能的技术。在 Java 中,您可以使用 junit 或 testng 或其他任何东西。通常,回归测试是功能测试,而不是纯粹的单元测试。
Regression testing has nothing to do with a language. It is a technique that is used to ensure future code changes do not break existing features. In Java you can use junit or testng or anything else. Typically a regression test is a functional test and is not a pure unit test.
JUnit 通常针对单元测试而不是全面的功能测试(如果将系统作为一个整体来看待,回归测试就是一个例子)。
然而,使用单独的测试套件来执行连接到实际后端等的“繁重”功能和集成测试并根据预期验证结果的情况并不罕见。
这里使用 JUnit 的原因之一是能够使用依赖注入从“模拟测试”转向实际的功能测试。例如,您可以在较轻的测试中提供一个模拟协作者,并在完整的功能测试中提供一个实际的协作者实例。
JUnit is generally aimed for unit tests rather than full-scale functional testing (of which regression testing is an example if one is looking at the system as a whole).
However, it is not uncommon to use a separate test suit to perform "heavy" functional and integration tests that connect to actual backends, etc., and verify results against expectations.
One reason for the use of JUnit here is the ability to go from 'mocked tests' to actual functional tests using dependency injection. You could provide, for example, a mock collaborator in the lighter test, and an actual collaborator instance in the full functional test.
回归测试是任何捕获回归的测试。
如果您想要接受测试,我听说过关于 FitNesse 的好消息。
A regression test is any test that catches regressions.
If you want acceptance tests I've heard good things about FitNesse.