Font Size: a A A

Research On Automatic Generation Of Test Case Based On Component Contract Solving Step-by-step

Posted on:2021-04-18Degree:MasterType:Thesis
Country:ChinaCandidate:Y CaoFull Text:PDF
GTID:2392330602488821Subject:Computer technology
Abstract/Summary:PDF Full Text Request
The rapid growth of the nuclear power industry has brought opportunities for citizens to improve their economic level,reduce the possibility of environmental pollution,and ensure national security and stability.However,while making profits,there are many risks.Some of these risks can cause incalculable losses.The safety of the nuclear power industry has attracted a lot of attention.To improve safety,software testing of related software systems in the nuclear power industry is required.Digital instrument and control system(DCS)is widely used in nuclear power.The DCS system is developed via the Safety-Critical Application Development Environment(SCADE)platform.SCADE expresses the characteristics of software systems by building component models.The nuclear power plant DCS system introduces the concept of a contract to the process of automatically generating test cases based on a component model.The contract defines the interaction rules of the components in the software system and uses this as a means to verify the correctness of component execution and generate test cases.The existing methods include manual testing and testing of solving systemcontracts.The former has the problems of low efficiency,large workload,poor reusability,and the difficulty of ensuring test sufficiency due to the influence of individual differences.When the latter deals with large and complex systems,there is a NP-complete problem,which is difficult to solve and takes a long time to solve.Based on this,in order to improve test efficiency,and reduce the difficulty of generating test cases,this article sorts the component execution order based on the component contract model.Combined with the contract,a method of automatic test case generation based on component contract step-by-step solution is proposed.The research work is as follows:(1)A component execution order algorithm is proposed.By analyzing the dependencies between components,a component dependency graph is constructed,and the component execution order algorithm is used to sort the component execution order.(2)Component contracts are mapped according to contractualization theory,and coverage standards are defined.The constraints contained in the DCS system are re-divided according to the elements of contract design.Divided into pre-conditions,post-conditions,invariant conditions.The contract and method coverage are defined as the coverage standards,and the methods include valid methods and invalid methods.(3)A step-by-step component solving technique is proposed.According to the Pre-initial input data contract,call PICT to generate initial input data.Combine the initial input data,component execution order,and component contract,process components sequentially,traverse different component methods,and reduce test cases that do not meet the component contract,and finally get a test suite that meets all contract conditions.The experiment proves that the method of automatic test case generation based on component contract step-by-step solution is feasible and has high coverage.(4)In this way,a test tool was developed for the method of automatic test case generation based on component contract step-by-step solution.
Keywords/Search Tags:DCS in nuclear power plant, Component contract model, Test case
PDF Full Text Request
Related items