Chapter 9. Testing OpenJDK

In this chapter, we will cover the following topics:

  • Running tests using the downloaded or the built version of jtreg
  • Building jtreg from the source
  • Running the standard set of OpenJDK tests
  • Writing your own test for jtreg
  • Using jtreg in GUI mode
  • Writing TestNG tests for jtreg
  • Compiling JT Harness from the source code
  • Building and running jcstress
  • Writing tests for jcstress
  • Creating a benchmark project using JMH
  • Downloading the source and compiling JMH

Introduction

Back in 1997, when JDK 1.1 was completed and JDK 1.2 had just started, there was an obvious problem—JDK had to be tested somehow and there had to be a tool for it. This is the moment when jtreg appeared as the regression test harness. At that time, there were not many ...

Get OpenJDK Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.