I assume you are executing test cases under Testng framework. Would you please specify what matrices you are using to execute the same.
1. If the methods are depending upon each one individual method?
2.Setting priority to execute test cases sequentially ?
For 1st one you can use dependsOnMethods : eg.
@Test
public void method1(){
}
@Test(dependsOnMethods = {"method1"})
public void method2(){
fail("assume this one fails");
}
@Test(dependsOnMethods = {"method1"})
public void method3(){
}
@Test(dependsOnMethods = {"method2"})
public void method4(){
}
for the 2nd one you can set priority: eg.
@test(priority=0)
function1()
{}
@test(priority=1)
function2()
{}
@test(priority=5)
function3()
{}
@test(priority=3)
function4()
{}
@test(priority=2)
function5()
{}
In addition you have to set priority in Testng.XML for the same