Creating a JUnit Test Suite Class

0 votes
How to create a Junit test suite class
Jan 17, 2019 in Java by Neha
• 6,300 points
1,088 views

1 answer to this question.

0 votes

To create a test suite we will use the annotation @RunWith and @Suite.SuiteClasses. We will create a TestSuite class and annotate it with these two annotations. 

package junits;
 
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
 
@RunWith(Suite.class)
@Suite.SuiteClasses({
      JunitMathProvider_1.class,
      JunitMathProvider_2.class
         })
 
public class TestSuite {
 }
Hope this helps you:)
answered Jan 17, 2019 by Frankie
• 9,830 points

Related Questions In Java

0 votes
2 answers

How to test that an array contains a certain value?

public static final String[] VALUES = new ...READ MORE

answered Jul 17, 2018 in Java by Sushmita
• 6,920 points
1,103 views
0 votes
1 answer

Can Abstract Class have a Constructor?

Yes, an abstract class can have a ...READ MORE

answered May 11, 2018 in Java by sharth
• 3,370 points
1,165 views
0 votes
1 answer

Use of Static Keyword in a Class

It means that there is only one ...READ MORE

answered May 29, 2018 in Java by Rishabh
• 3,620 points
655 views
0 votes
1 answer

get a class instance of generics type T

The short answer is, that there is ...READ MORE

answered May 29, 2018 in Java by Parth
• 4,640 points
5,266 views
0 votes
1 answer
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,223 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
8,359 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points
17,433 views
0 votes
1 answer
+1 vote
4 answers

What is a simple way to repeat a string in java?

There is already answer wriiten using StringBuilder ...READ MORE

answered Dec 16, 2020 in Java by Rajiv
• 8,870 points
29,256 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP