Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying OpenJDK Cookbook
  • Table Of Contents Toc
OpenJDK Cookbook

OpenJDK Cookbook

By : Kobylyanskiy, Mironchenko
4 (2)
close
close
OpenJDK Cookbook

OpenJDK Cookbook

4 (2)
By: Kobylyanskiy, Mironchenko

Overview of this book

If you are an experienced Java developer using Java 7 platform and want to get your grips on OpenJDK for Java development, this is the book for you. JDK users who wish to migrate to OpenJDK will find this book very useful.
Table of Contents (15 chapters)
close
close
14
Index

Writing TestNG tests for jtreg


jtreg also provides support to run TestNG test cases, which might be a more familiar technique for many developers. There are some steps that need to be performed to make it happen and this recipe will go through them.

Getting ready

This recipe will require the OpenJDK source code and an installed version of jtreg. On a Windows machine, it is also required to have Cygwin installed.

How to do it...

The following procedure should be more familiar to Java developers than writing a native jtreg test, as TestNG is what most developers have heard of and used. Now, let's get to the practical part and create a test. The paths are relative to the OpenJDK source root.

  1. Relative to the OpenJDK root folder, create a folder with the name, jdk/test/testng/org/demo. This is the folder where we are going to create our tests.

  2. Create the file, jdk/test/testng/TEST.properties, relative to the OpenJDK source root. Add the following line there:

    TestNG.dirs=.
    

    It is not strictly required...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
OpenJDK Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon