Abstract-Software testing plays a vital role in developing software that is freedom from bugs and defects. Manual test is a cost and time consuming process although it may find many defects in a software application. If the testing process could be automated, the cost of developing software could be reduced obviously. The most critical part of the testing process is generation of test cases. Model based test path generation approaches identify faults in the implementation at early design phase, reduce the software development time, and inspire developer to improve design quality. The proposed approach focuses on Model Based testing for automatic best test path generation. In this approach, the proposed system generates all possible test paths and optimizes a test path from these paths. The proposed system will reduce the processing time by using XMI based activity diagram, validate the generated test paths with Cyclomatic Complexity and choose the best test path without dependence on others.Index Terms-Model-based testing, test path, test path generation, UML activity diagram.