[go: up one dir, main page]

CN107748713A - A kind of software verification method based on emulation testing use-case - Google Patents

A kind of software verification method based on emulation testing use-case Download PDF

Info

Publication number
CN107748713A
CN107748713A CN201710785876.5A CN201710785876A CN107748713A CN 107748713 A CN107748713 A CN 107748713A CN 201710785876 A CN201710785876 A CN 201710785876A CN 107748713 A CN107748713 A CN 107748713A
Authority
CN
China
Prior art keywords
test
script
case
scene
software verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710785876.5A
Other languages
Chinese (zh)
Inventor
刘赛遥
曹睿婷
常华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Flight Automatic Control Research Institute of AVIC
Original Assignee
Xian Flight Automatic Control Research Institute of AVIC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Flight Automatic Control Research Institute of AVIC filed Critical Xian Flight Automatic Control Research Institute of AVIC
Priority to CN201710785876.5A priority Critical patent/CN107748713A/en
Publication of CN107748713A publication Critical patent/CN107748713A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention belongs to confirm with the software verification in verification process modelling technique, propose a kind of software verification method based on emulation testing use-case, including:Step 1, test scene is created in Excel forms, test scene, which creates, includes two parts content:Pass through/failure criterion and switch condition;Step 2, running tool script automatically generate the test scene in Excel forms, and the corresponding test case of each test scene, test script includes all test cases;Step 3, testing results script, tested model is called, the simulation run of all test cases is completed according to different switch conditions and by/failure criterion, test report is automatically generated and is reported with coverage rate.The emulation testing use-case method automatically generated using test scene carries out software verification test, can simplify test process, reduces tester's workload and difficulty, while improves testing tool durability, improves the readability of test script and result.

Description

A kind of software verification method based on emulation testing use-case
Technical field
The invention belongs to confirm and the software verification in verification process modelling technique, and in particular to one kind is directed to state The emulation testing use-case method that the scene of machine model automatically generates.
Background technology
Software verification be confirm with the part of verification process modelling technique, be that software is accomplished that no to abide by completely The checking of demand is followed, and ensures that verifies is completely covered degree.At present aircraft maintenance functional software exploitation and checking be logical Cross C language to write script to realize, each function that software is realized is verified one by one by writing script by hand.This side Method requires that tester possesses higher program capability, and size of code is big, and script readability is weaker, and durability is poor.Meanwhile survey Examination personnel are difficult to reach a hundred per cent covering to software test.
The content of the invention
The purpose of the present invention is:
A kind of software verification method based on emulation testing use-case is proposed, with normative testing flow, simplifies test process, drop Low difficulty of test, readable and durability is improved, while complete test report and automatically generated with what coverage rate was reported.
Technical scheme:
A kind of software verification method based on emulation testing use-case, including:
Step 1, test scene is created in Excel forms, test scene, which creates, includes two parts content:Pass through/failure Criterion and switch condition;
Step 2, running tool script automatically generate the test scene in Excel forms, each test scene corresponding one Individual test case, test script include all test cases;
Step 3, testing results script, tested model is called, it is according to different switch conditions and complete by/failure criterion Into the simulation run of all test cases, automatically generate test report and reported with coverage rate.
Also include:
Step 4, the coverage rate report of analysis generation include entirely tested model and wherein the Test coverage journey of modules Degree, 100% module is not reached for coverage rate, change or increase switch condition, return to step 1 optimize iteration.
Also include:
Step 5, analysis generation test report, obtain each failure test sample failure the reason for.
Instrument script realizes that function includes:Extraction is converted into by/failure criterion and switch condition from Excel forms Test scene;Tested model is called, extracts the information of tested model;Test case is extracted, is assessed by/failure criterion;To imitative The result really run carries out coverage rate analysis and produces report;Chart based on the data generation input obtained in emulation and output is simultaneously Preserve generation test report.
Beneficial effects of the present invention:
The emulation testing use-case method automatically generated using test scene carries out software verification test, can simplify and test Journey, reduce tester's workload and difficulty, while improve testing tool durability, improve the readable of test script and result Property.
Brief description of the drawings
Fig. 1 is the process schematic of simulation run test script of the present invention.
Embodiment
The present invention is described in further details below.
A kind of software verification method based on emulation testing use-case, including:
Step 1, test scene is created in Excel forms, test scene, which creates, includes two parts content:Pass through/failure Criterion and switch condition.
Step 2, running tool script automatically generate the test scene in Excel forms, each test scene corresponding one Individual test case, test script include all test cases.
Validation test is carried out using the method for emulation testing use-case.One test will include all possible test and use Example.Each test case need to be verified by a scene.One scene will capture the change or conversion of each state. Test scene is created using the method automatically generated, test scene in Excel forms, and scene creation includes two parts content: Pass/Fail (by/failure) criterions and switch condition.Wherein Pass/Fail criterions refer to that some specifies the output valve at moment; Switch condition refers to change set input value between two states.
What scene automatically generated is achieved in that:A set of general instrument script is developed in Matlab environment, including:
Open the instrument script of some model;
The instrument script of top input/output information and model running speed is extracted from some model;
Extraction test sample, the instrument script for checking and being preserved in Pass/Fail criterions from test;
Assess the instrument script of Pass/Fail criterions;
For scene generation instrument script, its function is converted from Excel forms, in Matlab generate scene and State Pass/Fail criterions;
Chart based on the data generation input obtained in emulation and output and the instrument script preserved;
Implementation coverage is analyzed and generates the instrument script of report;
Generate the instrument script of test report.
The function of realization includes the extraction from Excel forms and, by/failure criterion and switch condition, is converted into checkout area Scape;Tested model is called, extracts the information of tested model;Test case is extracted, is assessed by/failure criterion;To simulation run Result carry out coverage rate analysis produce report;Chart based on the data generation input obtained in emulation and output simultaneously preserves life Into test report.
Step 3, testing results script, tested model is called, it is according to different switch conditions and complete by/failure criterion Into the simulation run of all test cases, automatically generate test report and reported with coverage rate.
The process of simulation run test script is as shown in figure 1, tested model includes state A, B, C and D, and jump condition 1st, 2 and 3.Test script can generate two kinds of test scenes:
Scene 1:State A arrives state B by jump condition 1, then arrives state C by jump condition 2.
Scene 2:State A arrives state B by jump condition 1, then arrives state D by jump condition 3.
Two kinds of test scenes correspond to test case 1 and 2 respectively, after judging that condition that test case 1 passes through is simulation run In state A, B and C by/failure criterion be by, judge condition that test case 2 passes through be state A after simulation run, In B and D by/failure criterion be to pass through.
Step 4, the coverage rate report of analysis generation include entirely tested model and wherein the Test coverage journey of modules Degree, 100% module is not reached for coverage rate, change or increase switch condition, return to step 1 optimize iteration.So Test coverage can be improved.
Step 5, analysis generation test report, obtain each failure test sample failure the reason for.
Tester only needs the strict demand according in software requirement document, and Pass/Fail is filled in Excel forms (by/failure) criterion and switch condition, i.e., the desired conversion stripes exported between different conditions of each state since test Part.When demand is completely covered in table content, need to only scene be called to automatically generate script, so that it may to complete Excel forms to script Conversion, comprising all test cases, run the script, you can complete to by the checking of brake, and generate test report Reported with coverage rate.
Embodiment
A kind of emulation testing sample method automatically generated based on test scene, for carrying out software verification test, utilize A set of general instrument script, realizes that test scene automatically generates, calling model and testing results, at the same generate test report with Coverage rate is reported, it is as follows to perform the step of software verification is tested:
Step 1:The Pass/Fail criterions of each state in identification software demand, and A row are corresponding in Excel forms Fill in position, it is desirable to guarantee to be identified by instrument script according to certain format, such as:Output (ttt)=[value], wherein Output is denoted as the output signal title of criterion, and at the time of ttt represents that criterion checks, value represents that criterion should when checking The current value of signal.
Step 2:Switch condition in identification software demand between each state, and E2, F3 etc. are corresponding in Excel forms Position is filled in, and switch condition of the content representation from 2 row corresponding states to E row corresponding states, fill request fix according to one in E2 Formula guarantees to be identified by instrument script, such as:Input=[value1value2] time=[0n*r], wherein input is expressed as The input signal title that condition conversion is set, value1 is the value set when being 0 constantly, and remains to the n-th bat (letter of acquiescence Several classes of types are maintenance), value2 is the value set when n-th claps.
Step 3:Running tool script, the conversion to Excel forms to test script is completed, realize that test scene is given birth to automatically Into the corresponding test case of each test scene, test script includes all test cases.
Step 4:Testing results script, tested model is called, complete the simulation run of all test cases, and selected automatic Test report is generated to report with coverage rate.
Step 5:The coverage rate report of analysis generation includes whole model and wherein the Test coverage degree of modules, right Do not reach 100% module in coverage rate, its coverage rate leak is analyzed, a part of coverage rate leak can pass through change Or increase switch condition is covered, then needs return to step 1 to optimize iteration.
Step 6:Analyze the defeated of Pass/Fail results and each sample of the test report of generation including all test samples Enter signal output waveform.By the analysis to each unsanctioned test sample, value and criterion which sample clapped at are observed It is not consistent, then contrasts corresponding demand and model, you can obtains the unsanctioned reason of sample.

Claims (4)

  1. A kind of 1. software verification method based on emulation testing use-case, it is characterised in that including:
    Step 1, test scene is created in Excel forms, test scene, which creates, includes two parts content:Pass through/failure criterion And switch condition;
    Step 2, running tool script automatically generate the test scene in Excel forms, the corresponding survey of each test scene Example on probation, test script include all test cases;
    Step 3, testing results script, tested model is called, according to different switch conditions and pass through/failure criterion completion institute There is the simulation run of test case, automatically generate test report and reported with coverage rate.
  2. 2. a kind of software verification method based on emulation testing use-case as claimed in claim 1, it is characterised in that also include:
    Step 4, the coverage rate report of analysis generation include entirely tested model and wherein the Test coverage degree of modules, right Do not reach 100% module in coverage rate, change or increase switch condition, return to step 1 optimize iteration.
  3. 3. a kind of software verification method based on emulation testing use-case as claimed in claim 1 or 2, it is characterised in that also wrap Include:
    Step 5, analysis generation test report, obtain each failure test sample failure the reason for.
  4. A kind of 4. software verification method based on emulation testing use-case as claimed in claim 1, it is characterised in that
    Instrument script realizes that function includes:Extraction is converted into test by/failure criterion and switch condition from Excel forms Scene;Tested model is called, extracts the information of tested model;Test case is extracted, is assessed by/failure criterion;Emulation is transported Capable result carries out coverage rate analysis and produces report;Chart and preservation based on the data generation input obtained in emulation and output Generate test report.
CN201710785876.5A 2017-09-04 2017-09-04 A kind of software verification method based on emulation testing use-case Pending CN107748713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710785876.5A CN107748713A (en) 2017-09-04 2017-09-04 A kind of software verification method based on emulation testing use-case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710785876.5A CN107748713A (en) 2017-09-04 2017-09-04 A kind of software verification method based on emulation testing use-case

Publications (1)

Publication Number Publication Date
CN107748713A true CN107748713A (en) 2018-03-02

Family

ID=61255632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710785876.5A Pending CN107748713A (en) 2017-09-04 2017-09-04 A kind of software verification method based on emulation testing use-case

Country Status (1)

Country Link
CN (1) CN107748713A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096445A (en) * 2019-05-06 2019-08-06 北京长城华冠汽车科技股份有限公司 A kind of model is in ring test method and device
CN112560290A (en) * 2020-12-29 2021-03-26 中国航空工业集团公司沈阳飞机设计研究所 Automatic testing method and system based on countermeasure simulation platform
CN112732550A (en) * 2020-10-21 2021-04-30 中国商用飞机有限责任公司北京民用飞机技术研究中心 Model-based automatic testing method and system
CN119179649A (en) * 2024-11-20 2024-12-24 博越微电子(江苏)有限公司 Method for executing simulation test based on excel table

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530228A (en) * 2013-09-27 2014-01-22 西安电子科技大学 Software testing method based on model
CN104991863A (en) * 2015-07-14 2015-10-21 株洲南车时代电气股份有限公司 Method for automatically generating testing case on basis of function block diagram testing module
CN105701005A (en) * 2014-11-28 2016-06-22 阿里巴巴集团控股有限公司 OSGI (Open Service Gateway Initiative) based application frame test method and system
US9411710B2 (en) * 2014-08-01 2016-08-09 Unisys Corporation Automated regression test case selector and black box test coverage tool for product testing
CN106528407A (en) * 2016-10-19 2017-03-22 中国航空综合技术研究所 Embedded software security automation verification system and verification method thereof
CN106874177A (en) * 2015-12-14 2017-06-20 中国航空工业第六八研究所 A kind of latch method of testing based on scene

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530228A (en) * 2013-09-27 2014-01-22 西安电子科技大学 Software testing method based on model
US9411710B2 (en) * 2014-08-01 2016-08-09 Unisys Corporation Automated regression test case selector and black box test coverage tool for product testing
CN105701005A (en) * 2014-11-28 2016-06-22 阿里巴巴集团控股有限公司 OSGI (Open Service Gateway Initiative) based application frame test method and system
CN104991863A (en) * 2015-07-14 2015-10-21 株洲南车时代电气股份有限公司 Method for automatically generating testing case on basis of function block diagram testing module
CN106874177A (en) * 2015-12-14 2017-06-20 中国航空工业第六八研究所 A kind of latch method of testing based on scene
CN106528407A (en) * 2016-10-19 2017-03-22 中国航空综合技术研究所 Embedded software security automation verification system and verification method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096445A (en) * 2019-05-06 2019-08-06 北京长城华冠汽车科技股份有限公司 A kind of model is in ring test method and device
CN112732550A (en) * 2020-10-21 2021-04-30 中国商用飞机有限责任公司北京民用飞机技术研究中心 Model-based automatic testing method and system
CN112560290A (en) * 2020-12-29 2021-03-26 中国航空工业集团公司沈阳飞机设计研究所 Automatic testing method and system based on countermeasure simulation platform
CN119179649A (en) * 2024-11-20 2024-12-24 博越微电子(江苏)有限公司 Method for executing simulation test based on excel table
CN119179649B (en) * 2024-11-20 2025-05-09 博越微电子(江苏)有限公司 Method for executing simulation test based on excel table

Similar Documents

Publication Publication Date Title
CN107748713A (en) A kind of software verification method based on emulation testing use-case
CN112000557B (en) Automatic testing device for rail transit signal system
CN106776339B (en) Automated testing method and device
CN102541707B (en) FPGA on-chip logic analyzer system and method for multiplexing JTAG interface
US20180039865A1 (en) Analog circuit fault mode classification method
CN104063321B (en) A kind of test checking system and test verification method for the soft core programs of MicroBlaze
CN102096410B (en) Dynamic function test method of high-speed train operation control system
CN103530209B (en) A kind of code keypad automated testing method
CN110221983A (en) Test method, device, computer readable storage medium and computer equipment
CN101499937A (en) Software and hardware collaborative simulation verification system and method based on FPGA
CN103885341B (en) Performance analysis system based on automotive performance simulator and method
CN112035345A (en) Mixed depth defect prediction method based on code segment analysis
CN106125573A (en) Aircraft nose wheel Servo Control box method for designing based on graphical model
CN103744415A (en) Subway-CBTC testing method and device
CN106777529A (en) Integrated circuit fault-resistant injection attacks capability assessment method based on FPGA
CN111104309A (en) Method for quickly realizing comprehensive test flow
CN106445803A (en) Security-critical embedded software target code coverage analysis method
CN104699617A (en) Automated testing method for games
CN113849419A (en) Method, system, equipment and storage medium for generating test vector of chip
CN108267683A (en) The method and device that a kind of FPGA tests oneself
CN109684615B (en) Pedestrian collision test report generation method and device
Wahba et al. Expediting design bug discovery in regressions of x86 processors using machine learning
CN105022864A (en) System test point selecting method based on extended dependence matrix
CN105808839A (en) Test coverage rate analysis method of circuit path
CN115600529A (en) Functional coverage rate verification method and system based on algorithm model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180302

RJ01 Rejection of invention patent application after publication