Testing & Testing Tools

Slides:



Advertisements
Similar presentations
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
Advertisements

WISTPC-09 : Session A Tariq M. King PhD Candidate Florida International University Workshop on Integrating Software Testing into Programming.
Testing and Debugging CS221 – 2/13/09. Airline Program.
1 “White box” or “glass box” tests “White Box” (or “Glass Box”) Tests.
DAIMI(c) Henrik Bærbak Christensen1 JUnit A tool for test case management.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Chapter 3 Planning Your Solution
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
28/08/2015SJF L31 F21SF Software Engineering Foundations ASSUMPTIONS AND TESTING Monica Farrow EM G30 Material available on Vision.
Software Systems Verification and Validation Laboratory Assignment 3
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Simple Java Unit Testing with JUnit 4 and Netbeans 6.1 Kiki Ahmadi JUG-Bonek.
End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
Defensive Programming. Good programming practices that protect you from your own programming mistakes, as well as those of others – Assertions – Parameter.
Chapter 6 Controlling Program Flow with Looping Structures.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Testing and Debugging UCT Department of Computer Science Computer Science 1015F Hussein Suleman March 2009.
Foundations of Programming: Java
Testing Data Structures
Linux Standard Base Основной современный стандарт Linux, стандарт ISO/IEC с 2005 года Определяет состав и поведение основных системных библиотек.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
CHAPTER 10 JAVA SCRIPT.
Regression Testing with its types
Testing Tutorial 7.
Chapter 8 – Software Testing
Why should we test? How should we test?
Deadlock Freedom by Construction
Computer Programming I
Verification and Validation
Structural testing, Path Testing
SwE 455 Program Slicing.
John D. McGregor Session 9 Testing Vocabulary
Algorithm and Ambiguity
2008/09/24: Lecture 6b CMSC 104, Section 0101 John Y. Park
Microsoft Visual Basic 2005 BASICS
Cracking the Coding Interview
John D. McGregor Session 9 Testing Vocabulary
(Test Driven) Software Development
Decisions, repetition, Code Snippets, Comments, and Intellisense
Topics Introduction to File Input and Output
Conditions and Ifs BIS1523 – Lecture 8.
Use proper case (ie Caps for the beginnings of words)
“White box” or “glass box” tests
Testing and Test-Driven Development CSC 4700 Software Engineering
Welcome back to Software Development!
CS240: Advanced Programming Concepts
Text / Serial / Sequential Files
Algorithm and Ambiguity
Automation of Testing in the Distributed Common Ground System (Army)
Automation of Testing in the Distributed Common Ground System (Army)
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Python Basics with Jupyter Notebook
Automated test.
Chapter 4: Repetition Structures: Looping
Impossible problems.
Java Code Coverage Tools - EclEmma and JaCoCo
Selection Statements Chapter 3.
CSE 1020:Software Development
White Box testing & Inspections
Topics Introduction to File Input and Output
WJEC GCSE Computer Science
UNIT TESTING TOOLS Workshop on Integrating Software
Intro to Programming (in JavaScript)
Jamie Cool Program Manager Microsoft
Testing Slides adopted from John Jannotti, Brown University
Presentation transcript:

Testing & Testing Tools Emphasis on JUnit & ECLEmma

Why Testing Finding obvious bugs Finding non-obvious bugs (?) Increasing confidence for the system

What is a Test? Consists of three parts Input(s) Test program Oracle (i.e., expected output) Run test program on input(s) to generate an output Assert output == oracle

Testing Frameworks JUnit for Java PHPUnit for PHP Comes default with Eclipse PHPUnit for PHP Comes with PEAR Easily runs your tests Contains commonly used assertions Contains constructs to setup and clean common test code

Coverage Criterion Function Line (Statement) Decision (Edge) Condition Decision & Condition Path Loop Does 100% <X> coverage imply correctness? After this slide, I will demo my example where 100% path coverage does not guarantee correctness of a very simple program. I will use Eclipse, JUnit and ECLEmma After the example is over, I will show the students also some advanced structures of JUnit such as @After and @Before for setting up global variables and tearing them down after the execution.

Testing for User Interaction How? You don’t really (with minor subtlety) Build your system so that logic is in the backend (do NOT do computation in the UI) UI transmits data (input) from the user to your backend Backend does the computation and transmits data (output) back to UI for visualization)

Testing for User Interaction II Shouldn’t we test user interaction at all, then? No, but most of UI test will be mostly manual Try to have as few as these possible Validate user input with UI tests Make sure that user cannot enter input that would crash the system e.g., can user enter string to a text box that should only get integers? Test UI transitions and different visualizations important for your system

Reminders ZFR due today @11 pm ZFR demos due tomorrow during class I have to skip class tomorrow, so my teams should set up meeting with me so that I can see their UI Beta release due on May 15th Any questions on ZFR?