I am able to do using TestNG but i want to do using JUnit .....

On Thursday, 25 December 2014 10:18:51 UTC+5:30, Sudhansu Sekhar panda
wrote:
Hi Pranab,

It is showing error message as priority is not the recognized command for
Junit...Can you please tell me which thing i need to import to get the
error fixed?

Currently i am using import org.junit.Test;

Thanks,
Sudhansu
On Wednesday, 24 December 2014 20:02:17 UTC+5:30, pranab singh wrote:

Use the priority like
@Test(priority=0) like wise give the same according to ur order how u
want.n remember negative will alys take the highest priority.
On 24-Dec-2014 7:58 PM, "Sudhansu Sekhar panda" <sudhans...@gmail.com>
wrote:
Hi All,

How to prioritize Junit @Test methods...

Suppose i have five @Test methods i want to run them either from top to
botto or from bottom to top or in a given priority... Is there anyway i can
do it in Junit?

e.g

@FixMethodOrder(MethodSorters.NAME_ASCENDING)
//@FixMethodOrder(MethodSorters.JVM)

public class CheckingJavaTestAnnotation {
@Test
public void ab(){
System.out.println("Sequence one");
}
@Test
public void abc(){
System.out.println("Sequence Two");
}
@Test
public void d(){
System.out.println("Sequence Three");
}
@Test
public void ef(){
System.out.println("Sequence Four");
}
@Test
public void g(){
System.out.println("Sequence five");
}
@Test
public void as(){
System.out.println("Sequence six");
}

output:

Sequence one
Sequence Two
Sequence six
Sequence Three
Sequence Four
Sequence five

Thanks,

Sudhansu

--
You received this message because you are subscribed to the Google
Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/a7d69731-330e-4921-bf0a-bbd9815ed34e%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/a7d69731-330e-4921-bf0a-bbd9815ed34e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e298135e-00e3-4c7e-b476-f41c2119a20e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
groupselenium-users @
categoriesselenium
postedDec 24, '14 at 2:28p
activeDec 25, '14 at 7:14a
posts6
users3
websiteseleniumhq.org

People

Translate

site design / logo © 2021 Grokbase