| Author |
About JUnit with GUI
|
Mikey Chen
Greenhorn
Joined: Jul 12, 2002
Posts: 29
|
|
I am program with swing. But I don't know how to use JUnit with it. I want to use this way for unit test. All logical code will be sperate with swing and the swing only to present the data. So use the JUnit to test the logical code, the UI will not be test by JUnit. Does it a good way? Do you have any Unit test experience with JUnit, will you share it to me? Thanks!
|
Rome was not built in a day.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Yes, it's a good idea to write your code so that testing the logic doesn't require going through Swing components. However, if you want to (or, for some parts of your application, have to) test your Swing components as well, consider using JFCUnit for the job.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Mikey Chen
Greenhorn
Joined: Jul 12, 2002
Posts: 29
|
|
Lasse Koskela: Thanks! Now I have downloaded the JFCUnit. I will add it in my work.
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Also take a look at http://test.javaranch.com/wiki/view?UnitTestingGuis
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
 |
|
|
subject: About JUnit with GUI
|
|
|