WeBWorK Java Evaluator

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

1 Unit Testing with JUnit CS 3331 Fall 2009 Kent Beck and Eric Gamma. Test Infected: Programmers Love Writing Tests, Java Report, 3(7):37-50, Available.
Chapter 1 Writing a Program Fall Class Overview Course Information –On the web page and Blackboard –
Computer Science 209 Testing With JUnit. Why Test? I don ’ t have time, I ’ ve got a deadline to meet The more pressure I feel, the fewer tests I will.
WeBWorK: An environment to deliver web-based homeworks and more Dr. Christelle Scharff Research Day Wednesday, May
Ch. 2 Exploring core JUnit. This chapter covers ■ Using the core JUnit classes ■ Understanding JUnit mechanisms ■ Understanding the JUnit lifecycle.
1 CS Sept. Customizing a class & testing Quiz 2 on Tuesday 15 Sept Purpose of a constructor (slide 5) Evaluating a new expression (slide 6) Fields;
JUnit. What is unit testing? A unit is the smallest testable part of an application. A unit test automatically verifies the correctness of the unit. There.
In CS Extending and Contributing to an Open Source Web-based System for the Assessment of Programming Dr. Christelle Scharff Dr. Olly Gotel Pace University,
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Java Development Tools project.
DT228/3 Web Development JSP: Directives and Scripting elements.
Fundamental Programming Structures in Java: Comments, Data Types, Variables, Assignments, Operators.
Presentation Outline What is JUnit? Why Use JUnit? JUnit Features Design of JUnit Downloading JUnit Writing Tests – TestCase – TestSuite Organizing The.
JUnit The framework. Goal of the presentation showing the design and construction of JUnit, a piece of software with proven value.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
Computer Science and Engineering College of Engineering The Ohio State University JUnit The credit for these slides goes to Professor Paul Sivilotti at.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each.
C# B 1 CSC 298 Writing a C# application. C# B 2 A first C# application // Display Hello, world on the screen public class HelloWorld { public static void.
JUnit test and Project 3 simulation. 2 JUnit The testing problems The framework of JUnit A case study Acknowledgement: using some materials from JUNIT.
First BlueJ Day Houston, 2006 Unit Testing with BlueJ Bruce Quig Deakin University.
(1) Unit Testing and Test Planning CS2110: SW Development Methods These slides design for use in lab. They supplement more complete slides used in lecture.
Introduction to JUnit 3.8 SEG 3203 Winter ‘07 Prepared By Samia Niamatullah.
CS4272 Hardware-Software Co-design Assignment 2 School of Computing National University of Singapore Guo Liang.
ESO - Garching 23 June – 02 July, 2003 ACS Course JUnit for Java Unit Testing H. Sommer.
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
1 CS1110 lecture 4 9 Sept. Customizing a class & testing Classes: fields; getter & setter methods. Secs (p. 45) & 3.1 (pp. 105–110 only) Constructors.
EMBEDDED REAL-TIME, INC. December 8, 2015 Java Unit Mark Mosher Rochester Java Users Group.
JUnit Don Braffitt Updated: 10-Jun-2011.
JUnit Eclipse, Java and introduction to Junit. Topics Covered  Using Eclipse IDE  Example Java Programs  Junit Introduction.
JUnit A framework which provides hooks for easy testing of your Java code, as it's built Note: The examples from these slides can be found in ~kschmidt/public_html/CS265/Labs/Java/Junit.
XmlBlackBox The presentation Alexander Crea June the 15st 2010 The presentation Alexander Crea June the 15st 2010
S Ramakrishnan1 Systems V & V, Quality and Standards Dr Sita Ramakrishnan School CSSE Monash University.
1 Unit Testing with JUnit CS 3331 JUnit website at Kent Beck and Eric Gamma. Test Infected: Programmers Love Writing Tests, Java Report,
JUnit A Unit Testing Framework for Java. The Objective Introduce JUnit as a tool for Unit Testing Provide information on how to: Install it Build a test.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.3 Write Your First Java Program Produced by Harvey.
Testing JUnit Testing. Testing Testing can mean many different things It certainly includes running a completed program with various inputs It also includes.
In CS Automated Program Grading Andy WildenbergChristelle Scharff Jackie BaldwinOlly Gotel David Baur Cornell CollegePace University Mount Vernon, IANew.
Creating Java Applications (Software Development Life Cycle) 1. specify the problem requirements - clarify 2. analyze the problem - Input? Processes? Output.
Introduction to Unit Testing and JUnit David Rabinowitz.
Getting Started with JUnit Getting Started with JUnit The benefits and ease of writing and running JUnit test cases and test suites. The benefits and ease.
SWE 434 SOFTWARE TESTING AND VALIDATION LAB2 – INTRODUCTION TO JUNIT 1 SWE 434 Lab.
CS210 Intermediate Computing with Data Structures (Java)
CSE 219 Final exam review.
Unit Testing.
Software Construction Lab 10 Unit Testing with JUnit
Don Braffitt Updated: 26-Mar-2013
Unit Testing with JUnit
Dept of Computer Science University of Maryland College Park
Introduction to JUnit CS 4501 / 6501 Software Testing
Computer Science 209 Testing With JUnit.
Test Case Structure Test Case Module(depend on framework) MocoServer
Software Engineering 1, CS 355 Unit Testing with JUnit
Test-first development
How to Run a Java Program
Unit Testing with JUnit
Credit to Eclipse Documentation
Introduction to JUnit CS 4501 / 6501 Software Testing
Java IO and Testing made simple
Unit Testing with JUnit
How to Run a Java Program
Introduction to JUnit IT323 – Software Engineering II
Testing 24-Feb-19.
Fall 2018 CISC124 2/24/2019 CISC124 Quiz 1 marking is complete. Quiz average was about 40/60 or 67%. TAs are still grading assn 1. Assn 2 due this Friday,
Constructors, GUI’s(Using Swing) and ActionListner
Java for Beginners University Greenwich Computing At School DASCO
Fundamental OOP Programming Structures in Java: Comments, Data Types, Variables, Assignments, Operators.
In this class, we will cover:
Joel Adams and Jeremy Frens Calvin College
CMPE212 – Reminders Assignment 2 due today, 7pm.
Presentation transcript:

WeBWorK Java Evaluator Nathan Baur

Summary Project Goals What is a Course Management System? How does the Java evaluator work? Framework JUnit testing Writing problems

Project Goals Gently introduce programming concepts Grade code fragments or entire programs Provide specific feedback to help students identify the problems with their code Provide professors with an easy, flexible system for writing questions Integrate the evaluator into an existing Course Management System

What it looks like

What is a Course Management System? Tracks grades and assignments automatically Some grade certain types assignments automatically, providing immediate feedback Popular CMS’s include Moodle, Blackboard and WeBWorK

Why choose WeBWorK? Open-source Flexible, modular design Well supported Already used by a number of institutions

How does the evaluator work? Students are provided with a simple WeBWorK interface to input code Student WeBWorK

How does the evaluator work? Student code is sent from WeBWorK to the Java Evaluator module, which inserts the code into a template file to create a complete Java class Student WeBWorK Evaluator

How does the evaluator work? The Java evaluator launches problem-specific JUnit tests to be run on the student code Student WeBWorK Evaluator JUnit

How does the evaluator work? JUnit returns the results to the Java evaluator module Student WeBWorK Evaluator JUnit

How does the evaluator work? The Java evaluator formats the results into a message for feedback which is sent to WeBWorK Student WeBWorK Evaluator JUnit

How does the evaluator work? WeBWorK gives the students feedback and gives them the opportunity to fix the code and try again. Student WeBWorK Evaluator JUnit

JUnit Unit testing framework Tests are written in Java using JUnit classes Code can be tested for any circumstance Custom failure messages can be provided based on how the test failed

Writing problems WeBWorK PG file in perl Template .java file Includes the problem description and specifies the .java files to be used by JUnit Template .java file Usually minimal Includes class definition and problem-specific setup so that students don’t have to deal with it JUnit test file Includes the tests and feedback messages

Sample PG file DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "javaAnswerEvaluators.pl" ); BEGIN_TEXT Hello World! $PAR Given a String object myString, assign it to "Hello World!“ $BR \{ANS_BOX(1,1,30);\} END_TEXT ANS(java_cmp("JavaSampleSet/HelloWorld/","HelloWorld")); ENDDOCUMENT(); # This should be the last executable line in the problem.

Sample .java template file public class HelloWorld { private String myString; public HelloWorld(){ doIt(); } public void doIt(){ replaceme public String getMyString(){ return myString;

Sample JUnit test file import junit.framework.*; public class HelloWorldJUnitTest extends TestCase{ private HelloWorld hw; private String ans = "Hello World!"; public void testDefined(){ Assert.assertTrue("Assigning the variable", hw.getMyString()!=null); } public void testCorrect(){ Assert.assertTrue("Making it say exactly \"Hello World!\"“ , hw.getMyString.equals(ans)); public static Test suite(){ return new TestSuite(HelloWorldJUnitTest.class);

Acknowledgements Andy Wildenberg Jacqueline Baldwin Christelle Scharff Cornell College PACE University Made possible by NSF grant #0511391