Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

 1 Answer(s)

  • As per my understanding from your question, you have 3 testcases and you want to execute the any 1 or 2 or 3 from them. First you put each testcase in different file and then create a testsuite and put only those files in the suite that you want to execute. Suppose we have 3 testcases each in 3 different file ie first.java, second.java and third.java. If you want to execute only second and third file then specify only second and third file inside the suite in the following manner:

    @RunWith(Suite.class)

    @SuiteClasses({second.class,third.class})

    public class RunTestSuite { }

    Feel free to mail me if you face any issue in future.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: