Font Size: a A A

Research And Implementation Of CLI Automated Testing Method Based On Python

Posted on:2018-01-04Degree:MasterType:Thesis
Country:ChinaCandidate:C X XuFull Text:PDF
GTID:2348330533955386Subject:Electronics and Communications Engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of software testing technology,the theory and tools of automated testing have become quite mature.However,there are still no stable automated testing tools for the command line interface(CLI)testing associated with hardware devices on the market.CLI is an iterative development product,and each CLI version that newly developed must be verified by regression testing.Hence,the accomplishment of automated testing task for CLI function can not only shorten the testing cycle,but also save the cost effectively.This paper is a sub project that evolved from the research and development project of Lenovo server's integrated management module(IMM).Based on the analysis of the mainstream automated testing framework in the field of software testing,this paper proposes a CLI automated testing method on the basis of data-driven script framework.Meanwhile,this paper designs a hierarchical architecture of one-way invocation to concretely implement the method,which consists of the upper system framework layer,the lower communication transport layer and the lower test execution layer.Furthermore,the upper layer can call the lower layer,but not the opposite.And the same layer can not call each other.The system framework layer is used to provide the user interface,configure the operating environment and call the lower module,which is characterized by the effective management of the entire testing process.In addition,it provides a complete automated testing function together with the lower layer structure.The communication transport layer is responsible for the remote communication between the tester and the machine tested,whose feature is the use of modular idea.Furthermore,it is composed of SSH and Telnet two remote login modules.The test execution layer is used to execute the entire test task.Its characteristic is that use the idea of data-driven script to separate the test data from the test script,so that it can improve the tight coupling relationship between data and script.Besides,it mainly uses the method that script references data variables to drive the normal execution of the tests.Simultaneously,the graphical user interface of this method is built with Py Qt toolkit.And the script program of the communication transport layer and the test execution layer is written in Python language.Compared with the existing technology,the test method that implemented in this paper has the following positive effects.The system applies the hierarchical structure that using one-way call form to ensure its orderly and coordinated operation.The graphical user interface provided by the upper structure guarantees the convenience and simplicity of user operation,and reduces the error rate of CLI testing.The lower communication transport layer uses modular idea to combine SSH with Telnet two remote login modules,which can not only ensure the security of information,but also meet the needs of different operating systems' users.The lower testing execution layer adopts the form of data-driven script to solve the tight coupling relationship between data and script,and improve the reusability of the script.The test script can not only output real-time results,but also print different log files.Therefore,it optimizes the test results and contributes to the later inspection and debugging.
Keywords/Search Tags:CLI automated testing, data-driven script, telecommunication, Python, PyQt
PDF Full Text Request
Related items