I have more than 50 UI @Test (unit test using VS 2010) functions that execute using Appium. I have written the test-cases in a sequential way, starting from login and ending with logout. 
However, my problem is when I start to execute these test cases, they do not run in the coded sequence. For example, logout can start before login and so it will fail. Is there any way to solve this problem? 
 
     
     
    