Unit Testing: Advanced Annotations in JUnit

Junit 5.7    |    Intermediate
  • 9 videos | 1h 11m 10s
  • Includes Assessment
  • Earns a Badge
Rating 4.6 of 38 users Rating 4.6 of 38 users (38)
Using annotations in JUnit allows you to add a special form of syntactic meta-data to Java source code for better code readability and structure. The aim of this course is to give you hands-on experience with JUnit annotations which allow you to set when and how test-cases should be run. Kick things off with a basic annotation to set the name of a test case that appears in execution summaries. Move on to using annotations that simplify the setting of conditions in which test cases should run - based on the current operating system, JRE version, and even environment variables. Explore the definition of a custom annotation composed of a combination of pre-built annotations. Then, apply annotations that control the order of test case executions and enable parallel runs of tests. When you're done, you'll be able to use JUnit annotations for several useful tasks.

WHAT YOU WILL LEARN

  • Discover the key concepts covered in this course
    Use the displayname annotation to set a descriptive name for a test case
    Apply junit annotations to set test cases to only run on specific operating systems
    Apply junit annotations to set test cases to only execute on specific java runtime environments
    Enable or disable a test case based on system properties or environment variables
  • Create a customized junit annotation composed of several built-in annotations
    Specify an order for test case executions within a test class
    Set junit test cases to execute concurrently
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 13s
  • 10m 20s
  • Locked
    3.  Running Tests in JUnit Based on the Operating System
    10m 52s
  • Locked
    4.  Turning Tests on or off Based on JRE Version
    8m 58s
  • Locked
    5.  Checking for System and Environment Properties
    11m 22s
  • Locked
    6.  Composed Annotations in JUnit
    10m 33s
  • Locked
    7.  Ordering Test Case Executions Using JUnit
    6m 47s
  • Locked
    8.  Working with Concurrent Tests and Timeouts in JUnit
    8m 33s
  • Locked
    9.  Course Summary
    1m 32s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.8 of 42 users Rating 4.8 of 42 users (42)
Rating 4.8 of 80 users Rating 4.8 of 80 users (80)
Rating 4.6 of 182 users Rating 4.6 of 182 users (182)