Page 1

Course information

Test/Behaviour-Driven Development (TDD/BDD) in Java

JAVAEE-06.01

Duration: 2 days Course Description The main objective for this course is to provide you with all the necessary information to write unit and integration tests in Java

Course Objectives This comprehensive course leads you through the necessary skills and tools to follow Test-Driven Development in Java. The following aspects are covered: • Test/Behaviour-Driven Development (TDD/BDD) • Continues integration • Code coverage • Unit testing • JUnit 4.x (all aspects!) • Hamcrest API • Mocking (using EasyMock) • Integration test using DBUnit • Best practices, pitfalls etc • Spring TestContext framework (including integration testing) • Optional: web boundary testing using HttpUnit

Who can benefit? Java Developers Students should have a good understanding of the Java Platform Standard and Enterprise Edition.

1 | Test/Behaviour-Driven Development (TDD/BDD) in Java ©2010 IT Education


Course information

Test/Behaviour-Driven Development (TDD/BDD) in Java

JAVAEE-06.01

Workshop overview Introduction TestTest-Driven Development(rev:4988) Test-Driven Development • Appreciate the benefits of test-driven development • Understand the concept of "Write test before code" • Understand different types of tests • Understand the value of tests • Explain the value of continuous integration • Introduce Continuous Integration Unit Testing • Understand the scope of unit testing • Understand what needs to be tested • List basic Unit Testing best-practices • Discuss how Unit testing can also fulfill regression testing • Introduce the xUnit family of products • Understand how unit testing can help in resolving bugs that slip through

Java Unit testing techniques(rev:4991) JUnit 4 • Define the components of JUnit • Understand the concept of a TestCase • Understand the test life-cycle • Describe the assertion process • Use Maven and Ant to run tests • Understand Fixtures • Understand Test Suites • List different Runners • Understand Assumptions • Understand Parameterized tests • Understand Theories • Introduce the Hamcrest API • Discuss testing techniques • Pitfalls in Unit Testing • Explain and use a Code coverage tool

2 | Test/Behaviour-Driven Development (TDD/BDD) in Java ©2010 IT Education


Course information

Test/Behaviour-Driven Development (TDD/BDD) in Java

JAVAEE-06.01 Mock Objects • Understand the concept of Mock objects • List candidate object for mocking • Explain benefits of Mock Objects • Understand the difference between Stubs and Mock Objects • Understand where to use Mock objects • Understand what Mock frameworks can do for you • Explain EasyMock • Explain the mock life-cycle • Understand how to different mock objects • Understand how to set expectations • Understand how to mock behavior • Understand argument matchers) Integration test with DBUnit • Discuss different strategies in testing database applications • Explain DBUnit • Explain how to use DBUnit in JUnit 3.8 and JUnit 4 • Explain how to add the database state to a test fixture • Explain different ways of supplying seed data (XML, MS Excel etc) • Explain how to assert database state Spring TestContext framework • Introduce the Spring TestContext framework • Understand the design of this framework • Understand how to use spring's test framework with different test environments • Understand in particular use in JUnit 4.x • Understand how to use DI for your fixtures • Understand transactional tests • Understand how to perform unit and integration tests • List the TestContext annotations • Extend the TestContext framework • Integrate DBUnit in JUnit 4.x using Spring • Extend the framework (automatic support for DBUnit)

Java Unit testing techniques(rev:4991) Introduction to HttpUnit • Understand how HttpUnit automates the HTML parsing process • Understand the relation between JUnit and HttpUnit

3 | Test/Behaviour-Driven Development (TDD/BDD) in Java ©2010 IT Education


Course information

Test/Behaviour-Driven Development (TDD/BDD) in Java

JAVAEE-06.01 Hands-on lab exercises Exercise 1 - Test first development The objective of this exercise is to understand how to perform TDD and how to write test case class and appreciate the value of a code coverage tool. Exercise 2 - Mock Understand how to write mocks and mock behavior. Exercise 3 - Integration test Using DBUnit Understand how to use DBUnit to fix your database state. Exercise 4 - Using spring in integration testing Understand how to use spring in JUnit. Exercise 5 - Use HttpUnit for testing a web page The objective of this exercise is to understand how to test web pages.

P.O. Box 88 · 3750 GB Bunschoten · The Netherlands +31.33.44.80.160 · info@iteducation.nl · www.iteducation.nl Trade Register: 32147657 · VAT: NL0681.57.897.B01 · ING Bank: 4238201

4 | Test/Behaviour-Driven Development (TDD/BDD) in Java ©2010 IT Education


Test-Behaviour-Driven Development (TDD-BDD) in Java  

The main objective for this course is to provide you with all the necessary information to write unit and integration tests in Java

Advertisement
Read more
Read more
Similar to
Popular now
Just for you