Java Unit Testing

Course

In Carshalton

£ 780 + VAT

Description

  • Type

    Course

  • Location

    Carshalton

  • Duration

    2 Days

At the end of the course student will know. about JUnit's role in Java testing. how to setup, integrate and work with JUnit. the differences between JUnit3 and JUnit4. how to design, implement and carry out JUnit tests using either JUnit3 or JUnit4 syntax. follow best practices in testing and software development. improve their effectiveness in software testing and. Suitable for: The course is aimed at Java developers, quality-assurance engineers, and project managers. Students are expected to have a good understanding of Java technology, as well as some familiarity with testing concepts (e.g. unit, integration, functional, and load testing)

Facilities

Location

Start date

Carshalton (Surrey)
See map
1-3 Fairlands House, North Street, SM5 2HW

Start date

On request

Questions & Answers

Add your question

Our advisors and other users will be able to reply to you

Who would you like to address this question to?

Fill in your details to get a reply

We will only publish your name and question

Reviews

Course programme

Overview
The course provides a thorough introduction to the JUnit testing framework. It covers the concepts underlying unit testing, and the way these concepts are realised in the JUnit framework. The procedures for setting up JUnit and using it in Java development projects are covered in detail. The hands on exercises will familiarise students with test-driven development as a methodology for implementing highly reliable Java code.

Course Benefits
At the end of the course student will know
  • about JUnit's role in Java testing
  • how to setup, integrate and work with JUnit
  • the differences between JUnit3 and JUnit4
  • how to design, implement and carry out JUnit tests using either JUnit3 or JUnit4 syntax
  • follow best practices in testing and software development
  • improve their effectiveness in software testing and the quality of the code they are developing

Key Delivery
Instructor led in-house training with a great deal of hands-on practice.

Course Contents
Overview of JUnit
  • Basic concepts
  • JUnit 3 vs. JUnit 4 vs. TestNG
  • Starting with JUnit
  • Using JUnit within Eclipse
  • Structuring Unit Tests
  • Using JUnit Asserts
  • JUnit Test Composition
  • Custom Asserts in JUnit
  • JUnit Exceptions and exception testing
  • Naming
  • The JUnit Test Skeleton
What to test for - Right BICEP
  • Right results
  • Boundary Conditions - CORRECT
    • Conformance
    • Ordering
    • Range
    • Reference
    • Existence
    • Cardinality
    • Time
  • Inverse Relationships - checking for
  • Cross checking
  • Error conditions - forcing of
  • Preformance characteristics - met
Structuring tests, automating tests, reporting results
  • Composing Test Cases into Test Suites
  • Combining Test Suites
  • Organizing Tests and Test Suites
  • Executing Tests
  • Showing Test Results
  • Integration with Ant
  • Reporting (XML and HTML)
JUnit Extensions
  • Overview of JUnit Extensions: dbUnit, sqlUnit, httpUnit, htmlUnit, EasyMock, xmlUnit, etc.
  • Testing with Stubs
  • Mock Objects
  • Testing a Servlet
  • Testing with Mocks using EasyMock
Test-Driven Development (TDD)
  • Best Practices with JUnit and TDD
  • Designing Java code with testing in mind
  • Integration and functional testing using JUnit
Characteristics of Good Tests
  • Automatic
  • Thorough
  • Repeatable
  • Independent
  • Professional
  • Quality controlling tests
Testing and Design
  • Designing for testability
  • Refactoring for Testing
  • Defining and verifying Class Invariants
  • Test Driven Design Strategies
  • Testing for Invalid Parameters
Testing and Project Planning and Management
  • Where to place the test code
  • Testing etiquette
  • Frequency of testing
  • Testing when working with legacy code
  • Testing and Code Reviews

Java Unit Testing

£ 780 + VAT