BIT 142:Programming & Data Structures in C#. How To Use NUnit-based Starter Projects.

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

Introduction to HT-IDE3000 Micro-C development System Department.
BIT 142: Intermediate Programming
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
E.1 Eclipse. e.2 Installing Eclipse Download the eclipse.installation.exe from the course web site to your computer and execute it. Keep the destination.
Android Application Development Stephen Diniz Computer/Electrical Engineer Lecture 01 Introduction.
© I-Logix Rhapsody C++ V /01/2004 E1-1 Exercise 3 : Dishwasher.
2ex.1 Lists and Arrays. 2ex.2 Comments on exercises Always run your script with “ perl -w ” and take care of all warnings  submitted scripts should not.
Get Started in 4 Easy Steps!
Google Chrome Your Customized Google Buddy April 2012 John Riley and Denise Tate-Kuhler.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
BIT 143:Programming & Data Structures in C# Instructor: Mike Panitz
by Chris Brown under Prof. Susan Rodger Duke University June 2012
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
Introduction to Matlab & Data Analysis
Intro to MFC. Open VS and create new project 1)Open MS Visual Studio 2008 Professional (It must be the Professional Edition, the Express Edition will.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Creating a Project with C++ Builder
Playing Back Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
CPSC1301 Computer Science 1 Overview of Dr. Java.
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
FIRST GADGETEER PROJECT. Where are you? Making a VS project Parts of a C# program Basics of C# syntax Debugging in VS Questions? 2.
Go to your school’s web locker site school name.schoolweblockers.com) Your user name is the first letter of your first name, the first 4.
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
Active-HDL Interfaces Debugging C Code Course 10.
BIT 142:Programming & Data Structures in C#. What is Unit Testing? 2.
1.  “To write test cases for every non-trivial function or method in the module so that each test case is [as] separate from the others [as] possible.”
1.  Writing snippets of code that try to use methods (functions) from your program.  Each snippet should test one (and only one) function......by calling.
Google Analytics Debugging Tools By: Errett Cord
WS-Freefluo-VLAM Tutorial Spiros Koulouzis. Outline Get the WS-Freefluo-VLAM (GUI) Start the WS-Freefluo-VLAM (GUI) Generate modules from WSDL Compose.
Reports and Learning Resources Module 5 1. SLMS Primary Administrator Training Module 5: Reports and Learning Resources 2.
CSE 232: C++ Programming in Visual Studio Graphical Development Environments for C++ Eclipse –Widely available open-source debugging environment Available.
1.NET Web Forms Visual Studio © 2002 by Jerry Post.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
CS320n –Visual Programming More LabVIEW Foundations.
”Java and JMLfor Dummies” The Java source code is written in a text file using your favourite editor (Notepad) and is saved with extension.java. Be careful.
MA471 Fall 2003 Lecture 2. On With The Games Today we are going to watch each group play a couple of rounds of cards. We will go through the game slowly.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
NETBEANS DEBUGGER.  To create a breakpoint place the cursor at the desired location.  Go to the Run -> toogle line Breakpoint or Ctrl +F8. It creates.
Testing External Survey Automatic Credit Granting Shepherd University Department of Psychology.
Lecture 7 Conditional Scripting and Importing/Exporting.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Using the Eclipse Debugger Extra Help Session (Christina Aiello)
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
1 Using an Integrated Development Environment. Integrated Development Environments An Integrated Development Environment, or IDE, permits you to edit,
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Test-driven development
BIT116: Scripting Lecture 06
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Getting Started with R.
CS 2340: Programming in VB Instructor: Dr. Qi Yang Office: 213 Ullrich
Debugging Taken from notes by Dr. Neil Moore
Due Next Monday Assignment 1 Start early
Whatcha doin'? Aims: Begin to create GUI applications. Objectives:
Our Environment We will exercise on Microsoft Visual C++ v.6
Debugging Taken from notes by Dr. Neil Moore
IDE’s and Debugging.
Blackboard Tutorial (Student)
Min Heap Update E.g. remove smallest item 1. Pop off top (smallest) 3
Don’t hack / crack the system!
Running a Java Program using Blue Jay.
Fast-Track UiPath Developer Module 2: Getting to Know UiPath Studio
Workshop for Programming And Systems Management Teachers
Selenium IDE Installation and Use.
Presentation transcript:

BIT 142:Programming & Data Structures in C#

How To Use NUnit-based Starter Projects

BIT 142: Intermediate Programming3 NUnit / Unit Testing Unit test: –“To write test cases for every non-trivial function or method in the module so that each test case is [as] separate from the others [as] possible.” rity/glossary.html rity/glossary.html

BIT 142: Intermediate Programming4 NUnit / Unit Testing public bool isPrime( int num) { /*implementation omitted*/ }

BIT 142: Intermediate Programming5 Demo: Quick walkthrough of how to use this –(Normal console, GUI, grade gen) Things you’ll need / find useful: –To select which project will be run: Right-click on a PROJECT, then select "Set Startup Project" –Edit  Find And Replace  Find In Files This will let you search ALL files for a particular string

BIT 142: Intermediate Programming6 Details: Normal Console Program Select “PCE_StudentCode” as startup project & run like normal The 'split file' thing: –Program.cs contains Main() –PCE_09.cs contains the code you’ll implement Because the test code is in another project, you MUST make your classes PUBLIC in the StudentCode project

BIT 142: Intermediate Programming7 Located in the PCE_ForTests project, inside the PCE_Test.cs file You should never need to change or modify these –We’ll go through them now, briefly, in order to make sure you’ve gotten a quick overview of how the NUnit tests work. –If you need to disable a test, you can just comment the whole method out, and the rest of the system *should* just work Details: NUnit tests

BIT 142: Intermediate Programming8 Note about the 'EqualsFuzzy' method: –These numbers should be good, but contact me if you think they’re off for your implementation Details: NUnit tests

BIT 142: Intermediate Programming9 Select “PCE_Test_Runner” as startup project –Make sure that in RunTests.cs, the line int doThis = RUN_TEST_IN_GUI; is uncommented –Run in VS, then click the ‘Run’ button in Nunit –NUnit should auto-reload the code when you recompile Details: GUI Test Runner

BIT 142: Intermediate Programming10 Be careful about which test(s) you’ve selected Note the ‘Text Output' tab –Especially for the BubbleSort exercise –Since the BubbleSort uses randomly generated arrays, you may not get the same array twice Details: GUI Test Runner

BIT 142: Intermediate Programming11 Select “PCE_Test_Runner” as startup project –Make sure that in RunTests.cs, the line int doThis = RUN_TESTS_UNDER_DEBUGGER; is uncommented –Put a breakpoint in the test (or your code) –Run in VS you MUST choose Debug  Start Debugging –Useful features: Step, Step Into, Step Out Watch windows Details: Using The Debugger

BIT 142: Intermediate Programming12 Select “PCE_Test_Runner” as startup project –Make sure that in RunTests.cs, the line int doThis = PRODUCE_GRADESHEET; is uncommented –Run in VS –Everything should run, and the gradesheet should pop up in a web browser Details: Generating A Gradesheet

BIT 142: Intermediate Programming13 Note about grading output: –Not all tests that you can see in the GUI are graded –Failed tests are big, but passed tests are kinda small & on the bottom Details: Using The Debugger

BIT 142: Intermediate Programming14 Note that compromising the system in any way will get you a zero –Hacking/changing/disabling tests –WRITING CODE TO PASS A TEST, DESPITE NOT ACCOMPLISHING IT’S REAL GOAL Ex: A ‘FindInArray’ method that just asks “Did I get asked to find the value 8? If so, return true”, so that it passes the test which asks “Is 8 in the array?” Details: Generating A Gradesheet

BIT 142: Intermediate Programming15 Note about grading output: –Not all tests that you can see in the GUI are graded –Failed tests are big, but passed tests are kinda small & on the bottom Details: Generating A Gradesheet

BIT 142: Intermediate Programming16 Submitting Your Work Delete the directory named DELETE_THIS_and_bin_and_obj_folders DELETE bin AND obj directories!!!

BIT 142: Intermediate Programming17 Workflow Student Workflow: –Download starter project –Examine first exercise, in Word.DOC Figure out which tests are used in the exercise Run tests, figure out which ones have failed Write code to make one+ pass –Repeat until all tests pass Repeat until all exercises done –DELETE DIRECTORIES!!! –Hand in PCEs

BIT 142: Intermediate Programming18 Workflow Instructor workflow: –Run tests to get basic grade –Double-check code –Grade for feedback/ stuff that’s not auto- graded –Finalize grade & gradesheets