Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7176257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:28:14+00:00 2026-05-28T16:28:14+00:00

org.junit.Assert. has deprecated junit.framework.Assert My question is how do I create a Test Suite

  • 0

org.junit.Assert. has deprecated junit.framework.Assert

My question is how do I create a Test Suite in Eclipse if my JUnit classes do not extend a TestCase?

When I try to create new Test Suite in Eclipse my classes do not appear in the select box and I imagine this is because they don’t extend a TestCase.

I thought that with the new org.junit I can just use annotation and not extend TestCase

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:28:14+00:00Added an answer on May 28, 2026 at 4:28 pm

    The following code will create a test suite with Junit4. You can then just run this in Eclipse as a Junit test case. Obviously the TestClasses need to contain methods annotated with @Test otherwise no tests will actually run for the suite.

    import org.junit.runners.Suite;
    
    @RunWith(Suite.class)
    @Suite.SuiteClasses({TestClass1.class, TestClass2.class})
    public class TestSuite {
      //nothing
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Junit4 test case which statically imports the org.junit.Assert.assertEquals method(s). import static
The JUnit framework contains 2 Assert classes (in different packages, obviously) and the methods
I am having issues with the following code in Scala import org.junit.Test import org.junit.Assert._
Example ( <Expected Exception> for assert 1 & assert 2 is same) : @junit.framework.Test
This is my Java 1.5 code (complete example): import org.junit.Test; import static org.junit.Assert.*; import
package com.fitaxis.test; import java.sql.SQLException; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer;
I am using OpenOffice.org for most of my not so very frequent Office Suite
This is my first JUnit test and I don't understand why is not throwing
This is my code ( Jersey 1.4 + Mockito 1.8.5 ): import org.junit.Test; import
I'm trying to build a sample test class using junit framework. I've downloaded junit4.9b3.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.