开发者

Java-Based Regression Testing [closed]

开发者 https://www.devze.com 2023-04-06 05:49 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers.开发者_Go百科
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_Go百科

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 6 years ago.

Improve this question

How is regression testing performed in Java? Are there automated regression test frameworks or do you just write (JUnit) unit tests that help ensure against regressions?

Is there a way or set of best practices for coding unit tests so that they also serve the dual purpose of being regression tests, or do you need to keep regression tests separate from your unit tests?


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.


A regression test is any test that catches regressions.

If you want acceptance tests I've heard good things about FitNesse.

0

精彩评论

暂无评论...
验证码 换一张
取 消