Bringing unit testing to an existing project

I am working on an existing Java EE project with various maven modules that are developed in Eclipse, merged together and deployed to JBoss using Java 1.6. I have the opportunity to prepare any framework and document on how unit tests should be included in the project.

Can you offer any advice on ...

  • JUnit is what I'm looking to get started, is it still the choice of defacto for Java dev?
  • Any mocking frameworks that come standard? Jmock
  • Any rules that need to be established are code coverage or integrity, not integration tests.
  • Any tools to create attractive results for the Project Managers to be operated on?

Anything else? Thanks in advance.

+3
source share
6 answers

Any tools for generating great results for Project Managers that will look back?

Be careful. An attractive tool for displaying metrics on unit test counts, coverage, code quality metrics, line counts, registration counts, etc. May be dangerous in the hands of some project managers. A project manager (who does not support the realities of software development) may be obsessed with metrics and do not understand that:

  • they do not give a real picture of the state and progress of the project, but

  • they can give a completely false picture of the effectiveness of individual team members.

, , () unit test , . , , .

, , - , , .

  • , /. .

  • .

  • , , , . , / .

  • , , . , . . , N- -, ... .

+2

, : jUnit TestNG. , . jUnit - , , Eclipse, .

, . , , : ( , jUnit). , . ? , ? .

, , , ( ): " , ". . , , unit test, . , , .

- , (Hudson, ), , , . , .. . .

+3

, $work:

+3

, .

+2

++, .

, , , "". , , .

, , - , , , , , .

- 3 (6 , 5 ), 20% - , 80% , , .

0

Regarding test coverage, I think that when you do unit testing in an existing project, it's too early to start setting coverage expectations. You should start by saying that you can really integrate the test structure and get reports from coverage tools. Once you do this, you can begin monitoring coverage, and then you can consider goals.

0
source

Source: https://habr.com/ru/post/1755935/


All Articles