Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Hamcrest Quick Start: Enhanced JUnit syntax and capabilities
Rating: 4.5 out of 5(27 ratings)
2,131 students

Hamcrest Quick Start: Enhanced JUnit syntax and capabilities

Learn how to use Hamcrest to make your JUnit tests easier to read and write.
Created byCraig Hawkins
Last updated 9/2020
English

What you'll learn

  • How to use Hamcrest to make unit tests more expressive
  • How to use Hamcrest to increase unit testing capability
  • How to use Hamcrest to ease unit testing development
  • How to write and run custom Hamcrest matchers

Course content

5 sections18 lectures44m total length
  • Hamcrest source code.0:03

    You will need to download and install Hamcrest for Java:

    https://github.com/hamcrest/JavaHamcrest

  • Introduction0:49

    After watching this video, students will understand the advantages of using Hamcrest, and the requirements for the course.

  • assertThat(), equalTo() methods2:07
  • String methods2:33
  • Number methods2:50
  • Expressive syntax1:33
  • Matcher practice 12:49
  • Matcher practice 21:58
  • Quiz 1

Requirements

  • Basic abilities with Java and Junit.
  • Basic abilities with an IDE.

Description

JUnit is one of Java's most popular unit testing frameworks.  Hamcrest is an additional layer that sits on top of JUnit, and it allows you to write expressive and developer-friendly unit tests.  In this course, you will learn which imports to use, how to write and run Hamcrest tests, how to use Hamcrest's fundamental methods, and how to write your own custom Hamcrest matchers.  No prior knowledge of Hamcrest is necessary. The course is example-driven instruction and includes guided practice and quizzes to strengthen your understanding. Basic knowledge of Java programming and JUnit is required.

Who this course is for:

  • Developers looking to add Hamcrest into their unit testing
  • Students wishing to learn Hamcrest
  • Academics wishing to learn development tools used in industry
  • Software team leaders looking to evaluate Hamcrest as a development tool