| With OpenStack as the representative of the rapid development of cloud computing technology,more and more enterprises to join the OpenStack families.As a UI service component of the OpenStack cloud platform,Horizon takes a lot of time to test its functionality in the platform development process.In order to save time and improve test efficiency,it is necessary to study Horizon’s automated testing.Based on the requirement of functional automation testing,analyzed the advantages and disadvantages of common automated testing tools,and finally selects the most popular open source tool,Selenium,and then studies the basic principle and application of Selenium automated testing tools.In determining the use of Python language to achieve the system at the same time,to determine all the test cases are based on PyUnit test framework for the preparation.And then through the introduction of git version control tools and Jenkins continuous integration tools to achieve automatic detection of code updates and automatically execute the test,the test is completed automatically send test report e-mail,making Horizon test a higher degree of automation,the test process becomes more simple,convenient and efficient.The advantages of the automated test platform presented in this thesis can be summarized as follows:(1)By separating the test data from the code,all of the test data is placed in the configuration file to implement the data-driven test.When you need to test a different environment or select a part of the use case for testing,simply modify the configuration file in the relevant data,making the use of the system more flexible.(2)All the elements of the positioning method were saved in a separate file,when the test page layout changes,simply modify the positioning file without having to modify all the involved use case code to improve the test code can be maintainability.(3)The HTMLTest Runner module was introduced to generate test reports in html format for easy visualization and analysis of test results.Through the application of this test system to the actual test work,the basic test canbe performed normally and the problem of the tested system can be found in time,which indicates that the system can replace the manual test to a certain extent.And can use the idle time to perform tests at night,saving a lot of time,reflects the practicality of the automated test system. |