This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unit testing with abbot and junit

 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello, i'm beginning to use abbot and junit for unit testing, i have already been able to generate the scripts with junit, using the samples included with abbot. however i am still confused with the idea of using abbot with junit in unit testing without using the scripts. for example, what if i want to just test my class for existence of a component? like in this,

JFrame frame;
public JavaEventHandler(JFrame f) {
frame = f;
}

i want to test my constructor and see if frame already exists. how do i do that with abbot? and if i just use the junit plugin in eclipse, that would only give me

public class JavaEventHandlerTest extends TestCase {

public void testJavaEventHandler() {
// TODO Auto-generated method stub

}
}

does that mean that i have to extend my class to ScriptFixture and use ScriptTestSuite inside? and instead of a function, i have to put my test in a script (i.e., xml?)? i'm really very sorry if this is trivial but i'm so confused with using abbot for my test cases and i'm also practically new with unit testing.

and if i may also request if there are any other helpful tutorials out there for this type of testing - abbot in junit. thanks thanks! any help would be greatly appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic