How does JUnit work?

2

How does the open-source JUnit framework work? Does it guarantee the quality of the software? Is it advisable to write unit tests on a daily basis?

    
asked by anonymous 28.03.2017 / 13:00

1 answer

3

How does the JUnit framework work

At work, we use JUnit to ensure the results of our system. At any moment, we have the IDE perform the automatic tests to find out if there is anything out of the expectation.

Does it guarantee increase in quality?

By itself, no. It can be used for TDD (test-driven development) and also as a guarantee to detect software regression (regression: something worked before but does not work anymore).

Testing guarantees a lot more dependence on the test designer than just JUnit itself. If the test is poorly programmed, JUnit will not work miracles. Possibly its existence is worse for development than if tests did not exist.

On a day to day basis, do you recommend writing unit tests?

SIIIIM !!!!! With all the strength! Develop using TDD method and you will have much less headache. Not to mention that you can test the pure logic of your program, without UI.

This test tip without UI is especially important for tests where interaction with the UI is long until it reaches the desired stretch or if UI is traumatic. (Example of uploading traumatic UI: poorly structured GWT projects, it may take more than 40 minutes to upload the server, then start testing).

    
28.03.2017 / 13:07