Software Development Tools

Slides:



Advertisements
Similar presentations
Acceptance Testing.
Advertisements

Unit and Functional Testing with JUnit and Related Tools Greg Barnes University of Washington
Abirami Poonkundran 2/22/10.  Goal  Introduction  Testing Methods  Testing Scope  My Focus  Current Progress  Explanation of Tools  Things to.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Semester 1, 2003 Week 7 CSE9020 / 1 Software Testing and Quality Assurance With thanks to Shonali Krishnaswamy and Sylvia Tucker.
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.
TVAC Electronic Call Sheet System Team HeatWave Summer 2007.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
JUnit Don Braffitt Updated: 10-Jun-2011.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
HTTPUNIT. What is HTTPUNIT HttpUnit is an open source software testing framework used to perform testing of web sites without the need for a web browser.
Extreme Programming. Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
Automated Testing in Sakai Testing applications and services in isolation and in context Josh Holtzman, UC Berkeley David Haines, University of Michigan.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Testing Unit Testing In Evergreen Kevin Beswick Laurentian University / Project Conifer.
Testing under the Agile Method CSCI 521 Software Project Management based on the book Testing Extreme Programming by Lisa Crispin and Tip House.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Chapter 3 Agile software development 1 Chapter 3 – Agile Software Development.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
CS223: Software Engineering
Software Development.
Real Testing Scenario Strategy: A Real-life TestOps Environment
Progress Apama Fundamentals
WebSphere Diego Leone.
Open-O Integration Project Introduction
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Introduction and Principles
SOFTWARE TESTING OVERVIEW
Test Automation CS 4501 / 6501 Software Testing
Chapter 18 Maintaining Information Systems
Software testing
Test Driven Development 1 November Agenda  What is TDD ?  Steps to start  Refactoring  TDD terminology  Benefits  JUnit  Mocktio  Continuous.
Chapter 8 – Software Testing
Software Development Tools
Chapter 3 – Agile Software Development
LCGAA nightlies infrastructure
Quality Control in the dCache team.
Haritha Dasari Josue Balandrano Coronel -
Applied Software Implementation & Testing
X in [Integration, Delivery, Deployment]
History, Characteristics and Frameworks
Real Testing Scenario Strategy: Bringing this all together – Success!
Introduction to Software Testing
Verification and Validation Unit Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
Lecture 1: Multi-tier Architecture Overview
CS240: Advanced Programming Concepts
Objectives In this lesson you will learn about: Need for servlets
Chapter 3 – Agile Software Development
CSE 303 Concepts and Tools for Software Development
CS310 Software Engineering Dr.Doaa Sami Khafaga
Bringing more value out of automation testing
CS 240 – Advanced Programming Concepts
An Introduction to JavaScript
Extreme Programming.
Test Cases, Test Suites and Test Case management systems
Continuous Integration
Lecture 34: Testing II April 24, 2017 Selenium testing script 7/7/2019
Web Application Development Using PHP
Presentation transcript:

Software Development Tools COMP220/COMP285 Sebastian Coope More on Automated Testing and Continuous Integration

Automated Testing Testing software continuously validates that the software works and meets the customer’s requirements Automating the tests ensures that - testing will in fact be continuous Without testing, a team is just guessing that its software meets those requirements.

Need for automation Humans make mistakes Humans sometimes don’t care! Manual testing is slow, hard to gather statistics Automated testing can be done at all hours Automated testing is fast, 10,000 tests/second Regression testing builds up with the project size

Automated testing reality check Some non-functional requirements hard to test for Usability (how can be determine if application hard/easy to use) Code quality (some tools can help e.g findbugs (http://findbugs.sourceforge.net/) Security Non-functional requirements that can tested Performance and perhaps scalability Some security (port scanning)

Tests and refactoring Refactoring is changing existing code for simplicity, clarity and/or feature addition. - cannot be accomplished without tests. Even the most stable or difficult-to-change projects require occasional modification. That is where automated testing comes in.

Tests and refactoring Comprehensive tests (running frequently) verify how the system should work, allow the underlying behaviour to change freely. Any problems introduced during a change are - automatically caught by the tests. With testing, programmers refactor with confidence, the code works, and the tests prove it

Types of Automated Testing 1. Unit Testing testing of a unit of a code - everything that could possibly break usually exercises all the methods in public interface of a class verifies that - the unit of code behaves as expected with this verification - the public interface gains meaning

What is a unit? No strict definition, but could be Method in class working in isolation (not calling another method) Flow of control when calling a method which covers a given set of paths So need Cyclomatic count of unit tests for each method Class For OO focus of unit test should be at least 1 class in isolation

Types of Automated Testing Unit Testing part of the cycle of everyday coding writing tests before coding test as a guide to assist in implementation

Types of Automated Testing Unit Testing tests grouped into test suites run multiple times per day all tests should always pass results in high quality system leads to clean architecture

Types of Automated Testing Unit Tests: JUnit tool is lightweight unit testing framework for testing Java code implemented itself also in Java by - Erich Gamma and Kent Beck

Types of Automated Testing 2. Integration Tests Unit tests are deliberately supposed to be isolated and as independent as possible, Integration testing ensures that all the code cooperates, and differences between expectation and reality are precisely localized.

Types of Automated Testing Integration Tests: Cactus tool Testing of Web applications with multiple tiers becomes significantly more difficult. More (and more complex) testing tools are needed. Cactus is such a tool extending JUnit - to support testing server-side code (specific classes and methods).

Junit Despite its name is not just a unit tester If you are testing more than 1 class working together You are doing integration testing To isolate tests you often need to provide dummy test data called fixtures

Types of Automated Testing 3. Acceptance/Functional Tests Functional testing ensures that the whole system behaves as expected called also acceptance testing to verify for the customer that the system is complete For example, an e-commerce web site is not done until it can log in users, display products, and allow online ordering

Types of Automated Testing Acceptance/Functional Tests: HttpUnit There exists no universal acceptance testing tool to be used for arbitrary applications Acceptance test is often part of non-functional testing (e.g. performance testing) But we have HttpUnit as a specialised Acceptance/Functional testing tool for programmatic calls to Web resources and inspection of the responses Acceptance tests are less dependent upon specific implementation

Testing summary Call Due to Integration Test 1 Class 1 Unit tests Acceptance tests Class 3 Web interface class Integration test 1

Types of Automated Testing Acceptance/Functional Tests: Cactus vs. HttpUnit Both these tools test Web application components Cactus is more unit-oriented – to exercise the behaviour of specific classes and methods HttpUnit is designed to exercise requests to specific resources on a server

Cactus Works with Java servlets Cactus will Create JVM for client (prepares the request) Create JVM for server (handles request) Run test across both server and client Essentially tests across a Java servlet interface Limitation… Servlets only… very coupled with Java technology

HttpUnit Makes requests to external website Relies on Java to make requests External website can be written using anything you like PHP, ASP.NET, Perl, Ruby on rails

HttpUnit example… WebConversation wc = new WebConversation(); WebResponse resp = wc.getResponse("http://www.google.com/"); WebLink link = resp.getLinkWith("About Google"); link.click(); WebResponse resp2 = wc.getCurrentPage();

Web testing frameworks HttpUnit Low level simplistic web API Poor Javascript support HtmlUnit A lot better Javascript support Better support at the document level JWebUnit Essentially a wrapper for Selenium (Browser based test frame-work)

Limits of HTTP unit for acceptance testing Cannot check if web page actually works for user (can the fields be really clicked) Limit on Javascript testing E.g. how to test if canvas display works properly Does not test browser compatability

Types of Automated Testing 4. Performance Tests: JUnitPerf and JMeter the most functional system in the world won’t be useful if end users give up on the software because of poor performance

Types of Automated Testing Performance Tests: JUnitPerf and JMeter JUnitPerf does unit performance testing it decorates existing JUnit tests so that they fail if running times exceed expectations Is for Java testing, not web testing supports refactoring by verifying that performance-critical code remains within expected boundaries

Types of Automated Testing Performance Tests: JUnitPerf and JMeter JMeter provides functional performance testing—times to requests sent to a remote server like: “the Web server will maintain a three-second response time to requests with a 150 users simultaneous load” Jmeter is Site agnostic … (code can be PHP etc.) Does NOT run Javascript

Continuous Integration building a complete copy of the system so far (and running its full test suite) several times per day to be sure that the current version of the system is ready to walk out the door at any moment should be relatively automatic, or no one will ever do it

Continuous Integration allows the customer and team to see the progress, integration bugs are reduced, and the tests run frequently reduces integration pain: makes sure the incompatible “dance partners” meet within hours or minutes How to make it automatic ?

Continuous Integration & Ant Ant will help! Unlike many other practices of XP, continuous integration is mainly a technical problem These lectures will cover Ant, the emerging standard for build automation in Java Ant allows to invoke tests Ant is cross-platform and easy to extend and modify

Continuous Integration & Ant Ant performs all the basic tasks of a build tool: compilation, archiving, classpath management, supports testing FTP, etc. All of this in an automatic way!

Continuous Integration & Ant With a single Ant command, a Java application can be built, customized to its intended environment, tested, and deployed to a remote server

Testing and Continuous Integration: Software Tools Amongst all these testing and integration tools, we will devote the most part of our lectures to Ant, which can also invoke JUnit. We will also consider Eclipse – Integrated Development Environment (IDE) mainly for Java programs which can also invoke both JUnit and Ant.