Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How to Execute Test Cases Declared with JUnit5 @Suite

 
Marshal
Posts: 3727
534
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to use the Test Suite capability recently introduced into JUnit5, but I can't figure-out how to get Junit to discover the test cases declared in the test suite and execute them when using the Console Launcher or Maven.  It is probably due to missing/incorrect command line options and/or parameters, but I can't seem to find any references or examples of how to launch a suite of tests from the command line (I can however execute the tests from the VSCode IDE).

Test Suite
Test Case
Using VSCode (launched clicking on ES9PlusSuite |> icon)



Attempt using the Console Launcher
Attempt using Maven
Project POM
 
Ron McLeod
Marshal
Posts: 3727
534
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found that adding configuration for surefire for my test suite class name pattern allowed it to get discovered, and then declarations were used to run the test cases.  I also included configuration to show the DisplayName for the test cases.
 
Ron McLeod
Marshal
Posts: 3727
534
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got a bit further with the console launcher so that the Platform Suite Engine is being used now, but my test suite class is still not being discovered.
 
Saloon Keeper
Posts: 13427
303
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll see if I can set up a suite later, and if I get it to run with Maven I will tell you how I did it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic