28-Jun-15 Test Suites Recommendations for current assignment.

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

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.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
T ESTING WITH J UNIT IN E CLIPSE Farzana Rahman. I NTRODUCTION The class that you will want to test is created first so that Eclipse will be able to find.
Ch. 2 Exploring core JUnit. This chapter covers ■ Using the core JUnit classes ■ Understanding JUnit mechanisms ■ Understanding the JUnit lifecycle.
Developing CAS in Eclipse
BlueJ: a very quick introduction. BlueJ BlueJ is an IDE (Interactive Development Environment). It includes –an editor, which you use to write your programs.
20-Jun-15 More About JUnit. Test suites A test suite is a group of JUnit tests You can create a test suite in Eclipse as follows: File  New  Other...
Writing a Unit test Using JUnit At the top of the file include: import junit.framework.TestCase; The main class of the file must be: public Must extend.
CS 2511 Fall  Windows:  Start->Specialized Academic Software- >Programming Languages->NetBeans->NetBeans IDE x.y.z  where x.y.z is a version.
1 CSC/ECE 517 Fall 2010 Lec. 2 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Debugging 5.Testing.
13-Jul-15 Test Suites. Test classes A unit test is a test of an individual class By convention, we name test classes after the class that is being tested.
Unit Testing Discussion C. Unit Test ● public Method is smallest unit of code ● Input/output transformation ● Test if the method does what it claims ●
George Blank University Lecturer. JUnit for Test Driven Development By Vivek Bhagat, George Blank.
Buttons and Hyperlinks in PowerPoint To add a button: 1.Open a PowerPoint Project and select the slide on which you wish to place a button. 2.Click on.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Lesson 7 Unit Testing /JUnit/ AUBG ICoSCIS Team Assoc. Prof. Stoyan Bonev March, , 2013 SWU, Blagoevgrad.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
A Safety-Critical Java Technology Compatibility Kit Hans Søndergaard Stephan Korsholm VIA University College, Horsens, Denmark & Anders P. Ravn Aalborg.
Using the Netbeans GUI Builder. The Netbeans IDE provides a utility called the GUI Builder that assists you with creating Windows applications. The Netbeans.
Unit testing Unit testing TDD with JUnit. Unit Testing Unit testing with JUnit 2 Testing concepts Unit testing Testing tools JUnit Practical use of tools.
Copyright © Curt Hill Turtles The beginning of media computation.
JUnit test and Project 3 simulation. 2 JUnit The testing problems The framework of JUnit A case study Acknowledgement: using some materials from JUNIT.
JUnit Dwight Deugo Nesa Matic
ESO - Garching 23 June – 02 July, 2003 ACS Course JUnit for Java Unit Testing H. Sommer.
JUnit Dwight Deugo Nesa Matic
A tool for test-driven development
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
EMBEDDED REAL-TIME, INC. December 8, 2015 Java Unit Mark Mosher Rochester Java Users Group.
How to Install Eclipse Click hereClick here to download Eclipse.
Enterprise Java v090125Dev Env Overview1 Enterprise Java ( ) Development Environment Overview.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial.
JUnit, Bugzilla James Atlas July 24, 2008 *part of today’s slides courtesy of Dwight Deugo and Nesa Matic under the EPL.
Skyward and Epsilen Online Assessments/Assignments Use Skyward or Epsilen to post assessments or assignments that can then be completed by the student.
How to assign a task Project Name:How to assign a task Description:This tutorial contains step-by-step instructions on how to assign a task such as homework.
Software Design– Unit Testing SIMPLE PRIMER ON Junit Junit is a free simple library that is added to Eclipse to all automated unit tests. The first step,
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
CS/ENGRD 2110 FALL 2013 Lecture 3: Fields, getters and setters, constructors, testing 1.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Programming in Java Transitioning from Alice. Becomes not myFirstMethod but …. public static void main (String[] arg) { // code for testing classes goes.
Java IDE Dwight Deugo Nesa Matic
JUnit Tatiana Totskaya. Main parts of the presentation  Unit Testing  JUnit – Main Concepts  JUnit Primer  Unit Testing in Eclipse Using JUnit.
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.
Continuous Testing in Eclipse
The eclipse IDE IDE = “Integrated Development Environment”
Writing simple Java Web Services using Eclipse
Automating GUI testing with Selenium WebDriver, Java and Eclipse
Document Generation QRG
A3 Redux.
Holdings Management Overview
Executing Runtime Checks (For Comp401 and Comp410)
Installing and running the local check projects in Eclipse
Computer Science 209 Testing With JUnit.
Graphical User Interfaces -- Introduction
Overview of Eclipse Lectures
Credit to Eclipse Documentation
Interfaces.
Introduction to JUnit IT323 – Software Engineering II
BlueJ: a very quick introduction
How to Submit Google Docs to the Homework Drop Box
Constructors, GUI’s(Using Swing) and ActionListner
Engrade Discussions.
YOUR text YOUR text YOUR text YOUR text
Working with Libraries
CMPE212 – Reminders Assignment 2 due today, 7pm.
Assignment 8 : logistic regression
JUnit Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from the Eclipse 3.0 and.
Click to edit subtitle Click to edit title.
Presentation transcript:

28-Jun-15 Test Suites Recommendations for current assignment

Test classes A unit test is a test of an individual class By convention, we name test classes after the class that is being tested For example, if we have a CodeMachine class, we would have a CodeMachineTest class for testing it Interfaces have no actual methods to be tested Abstract classes may have non-abstract methods that can be tested (and abstract ones that can’t) If a project has multiple classes, it makes sense to have a test class for each

Test classes for the current assignment Here are the classes you need: SecretCode2 (GUI class—not readily testable) CodeMachine (abstract) SimpleCodeMachine ArrayCodeMachine PigLatinMachine Here are the test classes I recommend: CodeMachineTest SimpleCodeMachineTest ArrayCodeMachineTest PigLatinMachineTest

Test suites A test suite is a class that contains calls to unit test classes (and sometimes other test suites) This is sometimes more convenient than running your unit tests one at a time Naturally, Eclipse will help you create a test suite Create your unit test classes File  New…  Other…  Java  JUnit  JUnit Test Suite Click the Next button to choose which unit tests to include in the suite If you add test classes later, you can hand-edit this suite Like the JUnit test classes, it’s just ordinary java

Example test suite (slightly edited) import junit.framework.Test; import junit.framework.TestSuite; public class AllTests { public static Test suite() { TestSuite suite = new TestSuite("Test for default package"); suite.addTestSuite(CodeMachineTest.class); suite.addTestSuite(ArrayCodeMachineTest.class); suite.addTestSuite(SimpleCodeMachineTest.class); suite.addTestSuite(PigLatinMachineTest.class); return suite; }

Running the test suite Run the test suite just like any other unit test: Run  Run As  JUnit Test Results are very similar to those for a simple JUnit test

The End