Abstract:Based on the purpose of improving the test efficiency of the basic functions of OpenStack Horizon and saving the cost of testing, some of the APIs of WebDriver components are encapsulated on the basis of studying the principle and method of Web automation test by Selenium testing tools. The PyUnit framework prepares the test case and integrates it into test case suites, separating the code from the data through a separate configuration file, placing the element in a separate file, and finally introducing the HTMLTestRunner module to generate the html format test report, resulting in a complete Automated test system. By applying this system to Horizon's automated testing, it is possible to complete the expected test tasks faster and get the corresponding test reports, enabling automated testing of OpenStack and improved test efficiency by more than 50%.