CN106021100B - A kind of test assignment traffic control method for supporting concurrent testing - Google Patents

A kind of test assignment traffic control method for supporting concurrent testing Download PDF

Info

Publication number
CN106021100B
CN106021100B CN201610313106.6A CN201610313106A CN106021100B CN 106021100 B CN106021100 B CN 106021100B CN 201610313106 A CN201610313106 A CN 201610313106A CN 106021100 B CN106021100 B CN 106021100B
Authority
CN
China
Prior art keywords
test assignment
schedule
column index
tasks
test
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.)
Active
Application number
CN201610313106.6A
Other languages
Chinese (zh)
Other versions
CN106021100A (en
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.)
CETC 41 Institute
Original Assignee
CETC 41 Institute
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 CETC 41 Institute filed Critical CETC 41 Institute
Priority to CN201610313106.6A priority Critical patent/CN106021100B/en
Publication of CN106021100A publication Critical patent/CN106021100A/en
Application granted granted Critical
Publication of CN106021100B publication Critical patent/CN106021100B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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)
  • Monitoring And Testing Of Exchanges (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of test assignment traffic control methods for supporting concurrent testing, based on user interface, schedule of tasks, the schedule of tasks stores test assignment by column, and any behavior test assignment item in either rank, the method includes accessing schedule of tasks;It creates column index and setting column index initial value is starting column;It accesses and starts the corresponding test assignment of schedule of tasks column index, start the corresponding test assignment item of column index line by line;Communications intermediary object is created, communications intermediary object is transmitted to test assignment item by the test assignment item in a manner of asynchronous call in invocation step three;Test assignment item completes event;Column index adds one, return step three, until column index is equal to the total columns of schedule of tasks.The beneficial effects of the present invention are: by with the synchronous method of asynchronous call test assignment, while hiding many challenges intrinsic in multi-thread design, the advantages of offer multithread application has been provided, software development work is simplified.

Description

A kind of test assignment traffic control method for supporting concurrent testing
Technical field
The present invention relates to field of automatic testing, especially a kind of test assignment traffic control method for supporting concurrent testing.
Background technique
Currently, common parallel test system using multithreaded architecture, i.e., is performed simultaneously multiple in a process Thread is tested, concurrent testing task is completed by the switching of cross-thread.These test assignments in the process of implementation, often by In the limitation of test resource and priority restrictions etc., and there is the problems such as competition and deadlock, testing thread cannot completely simultaneously Row operation.This just needs to be scheduled the execution of these test assignments, so that they run in an orderly manner.The execution of test assignment Scheduling is the key problem of parallel test system, is directly related to the Performance And Reliability of parallel test system.
Existing parallel test system software frequently with mode be to start new test assignment thread in the user interface, Test assignment needs to carry out cross-thread processing with the interaction of user interface, and the exploitation of code is extremely complex, is easy error;User circle Face not only provides human-computer interaction, but also is managed to each test assignment, and display function and management function close-coupled are unfavorable for software Reuse.Meanwhile user interface provides synchronization object to each test assignment thread, mission thread realizes line by synchronization object Synchronization between journey.In view of the complicated multiplicity of measured parameter, test number of threads are numerous in concurrent testing software, the exploitation effect of software Rate and scalability will be very low.
Prior art is as shown in Figure 1, the technical solution realizes static scheduling strategy, use using task schedule planning Thread object starts test assignment thread, and the management by synchronization of test assignment thread is realized using event wait handle.Using this The shortcomings that technology, is as follows:
1) main thread and test thread interact extremely difficult and cumbersome: test thread, which is difficult to transmit to main thread, to be tested Progress msg and test intermediate data, main thread are also difficult the operational process of control test thread, have when realizing interactive function Many technical problems need to solve, and general developer is difficult to complete.
2) main thread should manage the operation control of test thread, realize the human-computer interaction of user interface again, will manage Function and display function mix, and do not meet the single responsibility principle in software design pattern, system readability and It is maintainable very low.
3) software reusability is poor: when a parallel test system newly developed, and the information for test assignment being needed to open Test assignment management function is sent out, can only accomplish that the code reuse of a part, software development efficiency are very low.
Summary of the invention
The purpose of the present invention is to overcome above-mentioned the deficiencies in the prior art, provide a kind of test assignment for supporting concurrent testing Traffic control method.
To achieve the above object, the present invention adopts the following technical solutions:
A kind of test assignment traffic control method for supporting concurrent testing, be based on user interface, schedule of tasks, described Business dispatch list stores test assignment, any behavior test assignment item in either rank by column, comprising the following steps:
Step 1: access schedule of tasks;
Step 2: creating column index and setting column index initial value is starting column;
Step 3: accessing and starts the corresponding all test assignments of schedule of tasks column index, is opened line by line by step 4 The dynamic corresponding all test assignment items of column index;
Step 4: creation communications intermediary object, the test assignment item in a manner of asynchronous call in invocation step three, and will lead to Letter intervening objects are transmitted to test assignment item;
Step 5: the completion event of test assignment item, when column index to should all test assignments complete when be transferred to step Six;
Step 6: column index adds one, return step three, until column index is equal to total columns of schedule of tasks.
Preferably, the step 2, creation column index further includes before judging task schedule table status, and specific steps are such as Under:
Step S201: user judges whether schedule of tasks is sky, if it is empty, shows that user interface passes over not yet Schedule of tasks, user interface report an error, out of service, and otherwise execution sequence executes step 2;
Step S202: user judges whether schedule of tasks columns is zero, if zero, shows not survey in schedule of tasks Mission bit stream is tried, user interface reports an error, and out of service, otherwise sequence executes step 2.
It is further preferred that in the step 2, creation column index concrete mode is setting column index and column index is clear Zero.
Preferably, in the step 3, accessing and starting the corresponding test assignment of schedule of tasks column index further includes sentencing The disconnected corresponding test assignment of column index, the specific steps are as follows:
Judge whether the corresponding test assignment of column index is sky, if it is empty, then tests completion, otherwise, sequence executes step Two.
Preferably, in the step 3, start the corresponding test assignment item of column index, specific steps line by line are as follows:
Step S301: creation task indexes and setting task indexes initial value as initial row;
Step S302:, which accessing, and starts task indexes corresponding test assignment item;
Step S303: task index plus one, return step S302, until task index is equal to the corresponding task of the column index Dispatch list line number.
Schedule of tasks includes several columns, and each column includes test assignment in varying numbers, when running test assignment, from the One column start to start all test assignments of first row, finish when test assignments all in first row are run, and restart secondary series survey Trial business, and so on, until the test assignment operation of last column finishes, then all test assignment operations finish.
It is further preferred that creation task index concrete mode is that setting task indexes and will appoint in the step S301 Business index is reset.
Preferably, further comprising the steps of after creation communications intermediary object in the step 4:
Communications intermediary object is saved to test assignment state dictionary, test assignment state dictionary is different for saving test assignment Walk mode of operation.
It is further preferred that after the step 5 test assignment item completion event, it is further comprising the steps of:
It discharges test assignment item and occupies resource, the asynchronous behaviour of test assignment of the test assignment state dictionary in amendment step four Make state.
The beneficial effects of the present invention are:
1. hiding many challenges intrinsic in multi-thread design by with the synchronous method of asynchronous call test assignment While, the advantages of having played offer multithread application, simplifies software development work.
2. present invention setting column index, realizes the traversal search to test assignment information, test assignment information is not in It omits, improves the integrality of test dispatching.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the parallel test system of the prior art;
Fig. 2 is the flow chart of the test assignment traffic control method provided by the invention for supporting concurrent testing;
Fig. 3 is the structural schematic diagram of the test assignment traffic control system provided by the invention for supporting concurrent testing;
Fig. 4 is the principle of the cross-thread communication of the test assignment traffic control system provided by the invention for supporting concurrent testing Figure;
Fig. 5 is the flow chart of the embodiment of the test assignment traffic control method provided by the invention for supporting concurrent testing.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples.
As shown in Figure 1, main thread is after parsing and loading test assignment thread, first in access scheduling planning first Column, start all test assignment threads of the column, an event wait handle are provided for each test assignment thread, by these things Part waits handle to be stored in array.After test assignment thread completes work, final state, main line are set by state-event It is all final state that journey, which waits all events in thread array, that is, shows that the test thread of starting all has been completed, at this moment Event wait handle array is removed convenient for operation next column, then starts all test assignments of next column, successively runs each column, etc. The task of all column, which shows entirely to test after the completion of all running, to be completed.
Embodiment is as follows:
The flow chart of task schedule is as shown in figure 4, include the following steps:
Step 101: when user, which starts, to be tested, needing to access schedule of tasks first;
Step 102: judge whether schedule of tasks is empty:
If schedule of tasks is sky, show that user interface passes over schedule of tasks not yet, system reports an error, and exits Operation;
Step 103: whether the columns for judging schedule of tasks is zero;
If schedule of tasks columns is zero, show the information for not having task test item in schedule of tasks, is one empty Scheduling planning table reports an error and out of service.
Step 104: schedule of tasks column index is reset, and starts the first row for accessing schedule of tasks.
The first row of schedule of tasks is the starting column of test, and all test assignments in the column open again after all running The dynamic corresponding test assignment of secondary series.
Step 105: judging column index whether to the end.
If schedule of tasks column index to the end, shows that all access finishes entire schedule of tasks, then tests It completes.
Step 106: column index judges whether the corresponding test assignment of column index is empty from adding one:
If the corresponding test assignment of column index is sky, show there is no test assignment in the column, i.e., subsequent column are not also surveyed Trial is engaged in, and test is completed, out of service;
If the corresponding test assignment of column index is not sky, initialization task index first is zero, starts to access column index pair The test assignment answered.
Step 107: by task index accesses schedule of tasks, obtaining test assignment item;
Step 108: judge whether task index is equal to the corresponding schedule of tasks line number of column index:
If task entry index is equal to the corresponding schedule of tasks line number of column index, show all test assignment items of the column All startings;
If task entry index is less than the corresponding schedule of tasks line number of column index, task index adds one certainly.
Step 109: one communications intermediary object of creation, and the communications intermediary object is saved in state dictionary, with different It walks method of calling and calls test assignment item, and communications intermediary object is transmitted in test assignment.
Step 110: if the corresponding all test assignment items of column index all start, test assignment being waited to complete thing Part.
Step 111: task to be tested completes event, and in event handling function, release test assignment occupies resource, repairs Change test assignment asynchronous operation state in state dictionary.
Step 112: it is complete whether judgement all test assignments in the forefront have run through, and step is transferred to if finishing 106 continue with.
When the test assignment for needing to stop being currently running, after step 5 test assignment item completion event, further include with Lower step:
User's access state dictionary obtains the test assignment being currently running, and the test assignment by being currently running is corresponding Communications intermediary object send order out of service, realize that test assignment stops operation.
The scheduling system of test assignment traffic control method based on above-mentioned support concurrent testing, including task schedule are drawn It holds up, test assignment dispatch list, user interface and test assignment.
Task scheduling engine, for managing test assignment thread.The task scheduling engine is main thread and test assignment The intermediary of cross-thread, main thread include user interface and schedule of tasks, and test assignment thread includes test assignment.Work as main thread When Command Task scheduling engine starts a test assignment, task scheduling engine calls the side of synchronization of test assignment in an asynchronous manner Method;When test assignment has event to need to issue to main thread, task scheduling engine is firstly received event, to the thing received Part is handled, then issues event to main thread, tells that main thread is that specific test assignment information is corresponding with the test assignment Event.
Schedule of tasks for indicating the test assignment item of synchronous operation first, follow-up operation, and test assignment item is adopted It is stored with XML file format, is indicated in a manner of the double-deck list in memory.
User interface, for editing the static information of all test assignments, loading schedule of tasks and being transmitted to task tune Engine is spent, shows operation progress, average information and the test result of each test assignment.
Test assignment is .net component, for realizing the test for being tested index to some, to the test equipment to be accessed It is that dynamic is applied, and is not fixed, so test assignment component reusable is into new testing system software.
The work for managing test assignment is independently marked off by the present invention, becomes a standalone module in architecture, That is task scheduling engine is responsible between various management works and user interface and test assignment thread to test thread Intermediary;
User interface only needs schedule of tasks being transmitted to task scheduling engine, it is not necessary to be concerned about the specific interior of schedule of tasks Hold, improves the efficiency of test run scheduling;
Task scheduling engine is hidden intrinsic many multiple in multi-thread design with the synchronous method of asynchronous call test assignment The advantages of multithread application is provided while miscellaneous problem simplifies software development work;
Column index is arranged in the present invention, realizes the traversal search to test assignment information, and test assignment information is not in lose Leakage, improves the integrality of test dispatching.
The present invention saves the asynchronous operation state of all test assignments by state dictionary, to realize the life of test assignment Deposit phase condition managing.Task scheduling engine to manage all test assignments must all test assignments of to master asynchronous operation Above- mentioned information are all saved in a state dictionary by the channel of state and each test assignment thread, the present invention.When thinking When stopping the test assignment being currently running, task scheduling engine finds all be currently running by access state dictionary Test assignment, and order out of service is sent by the channels of these test assignments, to realize the function of stopping test.
Above-mentioned, although the foregoing specific embodiments of the present invention is described with reference to the accompanying drawings, not protects model to the present invention The limitation enclosed, those skilled in the art should understand that, based on the technical solutions of the present invention, those skilled in the art are not Need to make the creative labor the various modifications or changes that can be made still within protection scope of the present invention.

Claims (7)

1. a kind of test assignment traffic control method for supporting concurrent testing, characterized in that be based on user interface, task schedule Table, the schedule of tasks store test assignment, any behavior test assignment item in either rank by column, comprising the following steps:
Step 1: access schedule of tasks;
Step 2: creating column index and setting column index initial value is starting column;
Step 3: accessing and starts the corresponding test assignment of schedule of tasks column index, starts the corresponding test of column index line by line Task items;
Step 4: creation communications intermediary object, and the communications intermediary object is saved in state dictionary, in a manner of asynchronous call Communications intermediary object is transmitted to test assignment item by the test assignment item in invocation step three;
Step 5: test assignment item complete event, when column index to should all test assignments complete when be transferred to step 6;
Step 6: column index adds one, return step three, until column index is equal to the total columns of schedule of tasks;
When the test assignment for needing to stop being currently running, user's access state dictionary obtains the test assignment being currently running, and Order out of service is sent by the corresponding communications intermediary object of the test assignment being currently running, realizes that test assignment stops behaviour Make;
The step 2, creation column index further includes before judging task schedule table status, the specific steps are as follows:
Step S201: user judges whether schedule of tasks is sky, if it is empty, shows that user interface passes over task not yet Dispatch list, user interface report an error, out of service, and otherwise execution sequence executes step 2;
Step S202: user judges whether schedule of tasks columns is zero, if zero, shows to appoint in schedule of tasks without test Business information, user interface reports an error, out of service, and otherwise sequence executes step 2.
2. supporting the test assignment traffic control method of concurrent testing as described in claim 1, characterized in that the step 2 In, creation column index concrete mode is setting column index and resets column index.
3. supporting the test assignment traffic control method of concurrent testing as claimed in claim 2, characterized in that the step 3 In, accessing and starting the corresponding test assignment of schedule of tasks column index further includes judging the corresponding test assignment of column index, tool Steps are as follows for body:
Judge whether the corresponding test assignment of column index is sky, if it is empty, then tests completion, otherwise, sequence executes step 3.
4. supporting the test assignment traffic control method of concurrent testing as claimed in claim 3, characterized in that the step 3 In, start the corresponding test assignment item of column index, specific steps line by line are as follows:
Step S301: creation task indexes and setting task indexes initial value as initial row;
Step S302:, which accessing, and starts task indexes corresponding test assignment item;
Step S303: task index plus one, return step S302, until task index is equal to the corresponding task schedule of the column index Table row number.
5. supporting the test assignment traffic control method of concurrent testing as claimed in claim 4, characterized in that the step In S301, creation task index concrete mode is that setting task indexes and resets task index.
6. supporting the test assignment traffic control method of concurrent testing as described in claim 1, characterized in that the step 4 In, it is further comprising the steps of after creation communications intermediary object:
Communications intermediary object is saved to test assignment state dictionary, test assignment state dictionary is for saving the asynchronous behaviour of test assignment Make state.
7. supporting the test assignment traffic control method of concurrent testing as described in claim 1, characterized in that the step 5 It is further comprising the steps of after test assignment item completion event:
It discharges test assignment item and occupies resource, the test assignment asynchronous operation shape of the test assignment state dictionary in amendment step four State.
CN201610313106.6A 2016-05-12 2016-05-12 A kind of test assignment traffic control method for supporting concurrent testing Active CN106021100B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610313106.6A CN106021100B (en) 2016-05-12 2016-05-12 A kind of test assignment traffic control method for supporting concurrent testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610313106.6A CN106021100B (en) 2016-05-12 2016-05-12 A kind of test assignment traffic control method for supporting concurrent testing

Publications (2)

Publication Number Publication Date
CN106021100A CN106021100A (en) 2016-10-12
CN106021100B true CN106021100B (en) 2018-12-04

Family

ID=57100311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610313106.6A Active CN106021100B (en) 2016-05-12 2016-05-12 A kind of test assignment traffic control method for supporting concurrent testing

Country Status (1)

Country Link
CN (1) CN106021100B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239331B (en) * 2017-05-23 2019-11-22 中国电子科技集团公司第四十一研究所 A kind of synchronous triggering execution method of concurrent testing task
CN109684067B (en) * 2018-12-29 2020-10-16 中电科仪器仪表有限公司 Automatic generation and operation system and method for task scheduling plan
CN111382065B (en) * 2018-12-29 2024-02-23 贵阳忆芯科技有限公司 Verification flow management system and method based on test template
CN110289043B (en) * 2019-06-26 2021-04-27 杭州宏杉科技股份有限公司 Storage device testing method and device and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227350A (en) * 2008-02-03 2008-07-23 中兴通讯股份有限公司 System for parallel executing automatization test based on priority level scheduling and method thereof
CN102012480A (en) * 2010-09-21 2011-04-13 上海大学 Method for testing dispatching of on-chip systematic embedded logical core by multistage order algorithm
CN103345384A (en) * 2013-07-18 2013-10-09 北京航空航天大学 Multi-target test task scheduling method and platform based on decomposed variable neighborhoods

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2965077B1 (en) * 2010-09-21 2016-12-09 Continental Automotive France METHOD FOR MANAGING TASKS IN A MICROPROCESSOR OR A SET OF MICROPROCESSORS

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227350A (en) * 2008-02-03 2008-07-23 中兴通讯股份有限公司 System for parallel executing automatization test based on priority level scheduling and method thereof
CN102012480A (en) * 2010-09-21 2011-04-13 上海大学 Method for testing dispatching of on-chip systematic embedded logical core by multistage order algorithm
CN103345384A (en) * 2013-07-18 2013-10-09 北京航空航天大学 Multi-target test task scheduling method and platform based on decomposed variable neighborhoods

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于遗传蚁群算法的并行测试任务调度与资源调配";方甲永等;《测试技术学报》;20090715;第23卷(第4期);第343页到第349页 *

Also Published As

Publication number Publication date
CN106021100A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN106021100B (en) A kind of test assignment traffic control method for supporting concurrent testing
CN104866374B (en) Discrete event parallel artificial and method for synchronizing time based on multitask
CN102214139B (en) Automatic test performance control and debugging method facing distributed system
US4636948A (en) Method for controlling execution of application programs written in high level program language
CN102520925B (en) AADL2TASM (Architecture Analysis and Design Language-to-Timed Abstract State Machine) model transformation method
CN103729480B (en) Method for rapidly finding and scheduling multiple ready tasks of multi-kernel real-time operating system
CN102708090B (en) Verification method for shared storage multicore multithreading processor hardware lock
CN104281906A (en) Process engine achieving method and system in service process
CN112363913B (en) Parallel test task scheduling optimizing method, device and computing equipment
CN105607904B (en) The Quick Development Framework and its application method of communication software based on Linux platform
CN109831520A (en) A kind of timed task dispatching method and relevant apparatus
CN110471647A (en) Embedded partitions operating system and its design method based on microkernel architecture
CN101221504A (en) Test script processing method and its scheduling and executing system
CN103077135A (en) Test resource management method capable of supporting parallel tests
CN107463357A (en) Task scheduling system, dispatching method, Simulation of Brake system and emulation mode
CN109117203A (en) A kind of Android APP starting velocity optimization method and system
CN109634672A (en) A kind of multi-core processor loading method based on intercore communication
CN115907683A (en) Realization system and method of workflow engine based on financial product management
CN102013993A (en) Physical topology use management method and system
CN102508720B (en) Method for improving efficiency of preprocessing module and efficiency of post-processing module and system
CN108647134B (en) A kind of task monitoring, tracking and recognition methods towards multicore architecture
CN115599714A (en) Multithreading synchronous vehicle-end data acquisition method and device
CN105700913A (en) Method for creation and parallel operation of lightweight bare chip codes
CN113723931B (en) Workflow modeling method suitable for multi-scale high-flux material calculation
CN105843735B (en) A kind of consumption method and device of terminal memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant