Skip to content

@Suite example usage #2749

@praveenreddynarala

Description

@praveenreddynarala

Hi Team,

I recently upgraded the Junit5 version with 5.8.1. Also, I have added junit-platform-suite v1.8.1 to create test suites.

Please find the sample example I created...

package com.ABC.audit;

import org.junit.jupiter.api.DisplayName;
import org.junit.platform.suite.api.IncludeClassNamePatterns;
import org.junit.platform.suite.api.SelectPackages;
import org.junit.platform.suite.api.Suite;

@Suite
@DisplayName("Junit first test suite")
@SelectPackages("com.ABC.XYZ")
@IncludeClassNamePatterns(".*Tests")
public class AuditTestSuite {
}

However, when I try to run the test suite, it says no tests were found from IntelliJ. I have been using the below property to run tests... I am able to trigger.
junit.jupiter.testinstance.lifecycle.default = per_class

Can someone please assist me in running the suites? Is there any specific configuration that am I missing?!

Also, please assist me in running Test Suites in Parallel.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions