JUnit

Resetting/Invalidating User Input

Hello,

I am writing JUnit test cases and I was wondering if there was any way that I could provide the user inputs during each test case? Currently I am using the student.TestCase.setSystemIn(...) to set the inputs for all of the test cases at the beginning of the JUnit tests but I'd like to reset or invalidate the input stream at the beginning of each test case and set the inputs during the test cases itself.

Is there a way to do this? I've tried using resetSystemIO() but that doesn't seem to work. 

Any help would be greatly appreciated!

Thanks,

Varun

LIFT

The Library for InterFace Testing makes GUI unit testing quick and easy through a streamlined API that is simple to use.

LIFT was written to make GUI Unit Testing quick and easy. It was written with introductory programming students in mind, but can be used by anyone using Java and Swing to create graphical user interfaces. LIFT does three main things for the programmer:

  • Provides a simple, type safe way to retrieve GUI object references.

  • Provides a simple means of simulating mouse and keyboard interactions.

  • Transparently deals with thread synchronization issues inherent to GUI programming.

Which JUnit version should I get?

I received this question from a new user, who wanted to download JUnit and asked:

> what version should i get?

SIGCSE 2012 Workshop: Absolute Beginner's Guide to JUnit in the Classroom

Welcome to all the workshop participants from our SIGCSE workshop.  Our workshop materials are available on-line here

http://web-cat.org/sigcse2012/

Feel free to post any questions, suggestions, or comments here in this forum, which you can use before, during, and after the workshop. It is also a place for anyone else in the Web-CAT community to discuss JUnit issues.

CxxTest

A student-friendly, JUnit-style testing framework for C++.

The CxxTest plug-in for Eclipse provides Eclipse users who are developing C++ code with a graphical user interface for CxxTest. CxxTest is a unit-testing framework for C++ development that behaves similarly to Eclipse's native support for JUnit. This plug-in provides better integration with Eclipse and the CDT. Some key features are:

Syndicate content