Workshop 4: The Absolute Beginner’s Guide to JUnit in the Classroom
Wednesday Feb 29, 2012, 7:00pm-10:00pm, SIGCSE 2012, Raleigh, NC

Workshop #4 Abstract

Software testing has become popular in introductory courses, but many educators are unfamiliar with how to write software tests or how they might be used in the classroom. This workshop provides a practical introduction to JUnit for educators. JUnit is the Java testing framework that is most commonly used in the classroom. Participants will learn how to write and run JUnit test cases; how-to’s for common classroom uses (as a behavioral addition to an assignment specification, as part of manual grading, as part of automated grading, as a student- written activity, etc.); and common solutions to tricky classroom problems (testing standard input/output, randomness, main programs, assignments with lots of design freedom, assertions, and code that calls exit()).

SIGCSE 2012, Raleigh, NC

Wed Feb 29, 2012, 7:00pm-10:00pm

Intended audience

This workshop is intended for CS educators who want to write software tests or who want students to write tests for their own assignments. No prior experience with testing is required. Java fluency is expected. Basic knowledge of Eclipse is preferred, but not required. The examples presented will focus on CS1- and CS2-level Java assignments.

Pre-Workshop Preparation

Before you join us at the workshop, please read through the following materials:

Make sure you have set up your own environment for using JUnit if you want to try out some examples live during the workshop (not necessary, but you're welcome to try out a few ideas live if you want).

JUnit Discussion Forum: we have an on-line forum set up (use Facebook Connect to login, or create an account) on the Web-CAT web site for you to ask questions, discuss ideas, and share with each other; feel free to use it before, during, and after the workshop.

Agenda

The goal is to give participants a solid introduction to writing JUnit tests. The workshop will be discussion-oriented and driven primarily by live examples. As examples are demonstrated, participants can ask questions as they arise and answers or alternatives can be illustrated in real time. In addition, hands-on “practice” activities will give participants a chance to work with live examples of the content. The agenda we will follow includes:

Part I. Intro to Unit Test and Uses in the Classroom

Part II. Writing Assignments with Unit Testing Components