Acceptance Test-Driven Development, Behavior-Driven Development, and Test-Driven Development Training


Course Number: JAV-303
Duration: 3 days (19.5 hours)
Format: Live, hands-on

Test-Driven Development Training Overview

This TDD training course covers Test-Driven Development and Behavior-Driven Development (BDD) concepts of “write your tests first” and “fail first.” Attendees learn how to drive their development process through “test-implement-test pass-refactor” cycles. Students discover the link between Agile Stories and Acceptance Test-Driven Development (ATDD) through the definition of acceptance criteria that can then be implemented via Cucumber-JVM together with JUnit.

Attendees translate scenarios into runnable acceptance tests using Cucumber-JVM. Various testing patterns and approaches will be explored, including utilization of isolated testing via Stubs, Fakes, and Mock objects. Students leverage the evolution of User Stories and Business Flows into code to test web applications via the Selenium API.

Location and Pricing

Accelebrate offers instructor-led enterprise training for groups of 3 or more online or at your site. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for private corporate training on-site or online, please contact us.

In addition, some courses are available as live, instructor-led training from one of our partners.

Objectives

  • Capture the core JUnit syntax
  • Use BDD and the test-fail-first approach
  • Translate business requirements into user stories with acceptance tests
  • Refactor to clean up your code
  • Make your code testable
  • Use Fakes and Mocks for isolated Unit Tests
  • Use Cucumber-JVM to turn User Stores into code
  • Leverage the Selenium API

Prerequisites

All students must have Java experience.

Outline

Expand All | Collapse All

Introduction
How Stories Fit into the Agile Process
  • What is Agile?
  • The Role of the Product Owner
  • Criteria for evaluating stories
  • Requirement analysis
  • The different types of stories
JUnit Overview/ Primer
  • What is Unit Testing?
  • JUnit, the test lifecycle - @Before, @After, @BeforeClass, @AfterClass, @Test
  • Writing assert methods – assertEquals, assertSame, assertTrue, assertFalse, assertNull
  • Hamcrest Matchers and using assertThat
  • PIT mutation testing
  • Code coverage
Test-Driven Development (TDD)
  • Principals and techniques
  • TDD Metaphors
  • Benefits, challenges, and limitations
  • Handling requirements change
  • Characteristics of good tests
  • Revisit anti-patterns
Testable Designs (Mocks, Fakes and Stubs)
  • Creating testable code - if you cannot test it what use is it?
  • Strategies for testable code
  • Test unfriendly features
  • Stubs, Fakes, and Mocks
  • Mocks as Collaborators
  • Mocks and return values, void methods, frequency calls, and ordering
  • Using the EasyMock and Mockito testing frameworks
Behavior-Driven Development (BDD) with Cucumber
  • Writing User Stories
  • Acceptance criteria
  • Acceptance Test-Driven Development (ATDD), specification by example
    • Creating software based on realistic examples,
    • Bridging the communication gap between business stakeholders 
  • Introduction to Cucumber
  • Writing scenarios with Gherkin
    • Gherkin syntax
    • Using given, when, then
    • Java, Ruby or Groovy Fixtures generated from scenarios
  • Using JUnit to run your Cucumber stories and scenarios
  • Writing set-up and tear down code using hooks (@Before and @After)
  • Using Data Tables, Scenario Outlines
  • Automate Cucumber steps to drive your application through and below the user interface
  • Refactor Cucumber step definitions to make them more readable and maintainable
  • Cucumber Reports
Testing Websites with Selenium with Cucumber
  • Using a WebDriver to test web applications and the Selenium API
  • Interrogating a response page
  • Simulating links and form submissions
  • Simulate multiple page navigation
  • Continuous Integration
Conclusion

Training Materials

All attendees receive comprehensive courseware covering all topics in the course.

Software Requirements

  • Windows, macOS, or Linux with at least 8 GB RAM
  • A recent JDK version installed
  • Related software that Accelebrate will specify in a detailed setup sheet following the purchase of this class


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan