When we execute testcases in codedUI if there are multiple methods like create, delete, update functionality there may be chances like it will not execute based on the order which we want them to execute.
Our requirement is like first we want to create a project then update the values of the project then we want to delete the project which we have created.
But while executing a test case then it is not executing in the order which we have selected.It will be executing like first the project is created then the project is deleted then there is no chances of updating the value of the project , as project is deleted then in this situation the test case may fail. Inorder to overcome the above problem we can execute the test case in order by using Orderedtest template which is provided by the microsoft for codedUI.
You can refer the above link to follow the process of creating the ordered test.
Hope this helps you.