Skip to content

Instantly share code, notes, and snippets.

@mulderbaba
Created February 22, 2013 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mulderbaba/5014568 to your computer and use it in GitHub Desktop.
Save mulderbaba/5014568 to your computer and use it in GitHub Desktop.
Test Method Execution Order Demo
package org.ankarajug.testinfected.gist;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
/**
* User: mertcaliskan
* Date: 2/22/13
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestCasesExecutionOrder {
@Test
public void secondTest() {
System.out.println("Executing second test");
}
@Test
public void firstTest() {
System.out.println("Executing first test");
}
@Test
public void thirdTest() {
System.out.println("Executing third test");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment