• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. OpenJFX
  4. OpenJFX unit tests

Page History

Versions Compared

Old Version 1

changes.mady.by.user David Hill

Saved on Mar 17, 2016

compared with

New Version 2

changes.mady.by.user David Hill

Saved on Mar 17, 2016

  • Next Change: Difference between versions 2 and 3
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Understanding OpenJFX Unit tests.

OpenJFX contains many JUnit based unit tests that can be run using 'gradle test' as part of a build. These are JUnit based tests.

Locations

There are two primary locations to find the unit tests in the repository:

...

A shim is a java class that provides a backdoor into the core classes for testing purposes.They are special in a number of ways:

  • they use the same extension classloader as the core classes
  • they provide test entry points that circumvent restrictions on API visibility for unit testing. 
  • they usually must live in the same package as the API they are exposing.
  • they cannot use classes on the Application class loader - like the JUnit API (no import org.junit.* for example)
  • with modules - they must live in a package referenced in the module-info for the class.

It is best to keep these classes as simple as possible, retaining as much of the test logic in the Unit test classes as possible. Sometimes, it makes sense to add more than just an accessor method, adding utility routines that may be easier to write from within the protected package.

In the OpenJFX repository, the shims are any test class that does not reside in the test package.

...

The following is an example command line that can run a junit test from within a built Linux OpenJFX modular tree:

(coming soon)

 

 

 

 

 

 

 

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 283, "requestCorrelationId": "95e39a52d452a650"}