CN112540928A - Test case layout method and device based on to-be-tested line intersection information - Google Patents

Test case layout method and device based on to-be-tested line intersection information Download PDF

Info

Publication number
CN112540928A
CN112540928A CN202011515651.6A CN202011515651A CN112540928A CN 112540928 A CN112540928 A CN 112540928A CN 202011515651 A CN202011515651 A CN 202011515651A CN 112540928 A CN112540928 A CN 112540928A
Authority
CN
China
Prior art keywords
scene
tested
test
test case
line
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
CN202011515651.6A
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.)
Traffic Control Technology TCT Co Ltd
Original Assignee
Traffic Control Technology TCT Co Ltd
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 Traffic Control Technology TCT Co Ltd filed Critical Traffic Control Technology TCT Co Ltd
Priority to CN202011515651.6A priority Critical patent/CN112540928A/en
Publication of CN112540928A publication Critical patent/CN112540928A/en
Pending legal-status Critical Current

Links

Images

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
    • 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/3684Test management for test design, e.g. generating new test cases

Abstract

The invention provides a test case layout method and a test case layout device based on cross-road information of a line to be tested, which comprise the following steps: extracting actual scene elements and position attributes in the intersection information of the line to be detected; inquiring a traffic scene database based on actual scene elements to determine a template position scene corresponding to a traffic scene to which the line to be detected belongs; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to the intersection scene of the line to be tested; processing the test cases contained in each actual position scene based on a preset duplication elimination rule, and determining the test cases to be tested in each actual position scene, wherein the traffic scene database comprises pre-stored template traffic scenes, and the corresponding relation between the template position scenes and the test cases. The method and the device provided by the invention can improve the completion efficiency of the test task, reduce the time consumption of the task, and avoid the waste of manpower and material resources caused by repeated tests of the same test case in the same traffic scene.

Description

Test case layout method and device based on to-be-tested line intersection information
Technical Field
The invention relates to the technical field of subway operation scene automatic testing, in particular to a test case layout method and device based on to-be-tested line traffic information.
Background
At present, when a test case of a CBTC (Communication Based Train Control) system is compiled, test coverage can be carried out according to system requirements. The test case is divided into several modules according to the functional requirements, such as a CBTC-CM (Code Train operating mode) function, a CBTC-AM (Automatic Train operating mode) function, an ITC (Intermediate Train Control level) -CM function, an ITC-AM, a special test, and the like. The tester needs to test the cases one by one in the test case library of the project according to the sequence of the case library.
The tester completes the test task manually, and frequently executes repetitive commands of putting cars, transacting routes, pushing train handles, observing output display, pulling switches, manually opening routes and the like. These operations are undoubtedly tedious and time-consuming for the testing personnel, and these tests undoubtedly have the serious consequences of incorrect test results due to personal fatigue and the like, as well as inefficient work of the testing task.
In order to liberate the repetitive work manner of the tester and realize high-speed and high-efficiency completion of the test task, the realization of an automatic test system based on an operation scene becomes a current urgent need. The core of the realization of the automatic test system is how to arrange a proper test case layout method for any given actual line to be tested according to the traffic information of the actual line to be tested, so that the tester can reduce repeated work and avoid repeated tests of the same test case in the same traffic scene.
Therefore, how to avoid the problems that the existing use case test has low completion efficiency and long time consumption due to the fact that the use cases are tested one by one in the test use case library of the project, and the same test use cases are repeatedly tested in the same traffic scene to waste manpower and material resources is still a problem to be solved by technical personnel in the field.
Disclosure of Invention
The invention provides a test case layout method and device based on to-be-tested line traffic information, which are used for solving the defects that in the existing subway operation scene case test technology, due to the fact that cases are tested one by one in a test case library of a project, time consumption is low, and human and material resources are wasted due to the fact that the same test cases in the same traffic scene are tested repeatedly.
The invention provides a test case layout method based on to-be-tested line traffic information, which comprises the following steps of:
extracting actual scene elements and position attributes in the intersection information of the line to be detected;
inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements;
determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2;
and processing the test cases contained in each actual position scene based on a preset duplication elimination rule, and determining the test cases to be tested in each actual position scene.
The invention provides a test case layout method based on to-be-tested line traffic information, which is characterized in that test cases contained in each actual position scene are processed based on a preset deduplication rule, and the test cases needing to be tested in each actual position scene are determined, and the method specifically comprises the following steps:
determining a union set of test cases contained in each actual position scene;
and randomly selecting one of the actual position scenes corresponding to any test case element in the union set, and determining the position scene where any test case element is positioned when testing.
The invention provides a test case layout method based on to-be-tested line traffic information, wherein the preset deduplication rule is as follows: and when the union set of the test cases contained in each actual position scene is tested, centralizing the test cases in the position scene containing the test cases.
The invention provides a test case layout method based on to-be-tested line traffic information, which is characterized in that test cases contained in each actual position scene are processed based on a preset deduplication rule, and the test cases needing to be tested in each actual position scene are determined, and the method specifically comprises the following steps:
determining a union set of test cases contained in each actual position scene;
determining the actual position scene containing the most test case elements in the union set as a first position scene;
determining the first position scene as the position scene where all test cases contained in the first position scene are tested;
for the determination of the ith location scenario and the location scenario where the ith location scenario includes the test case for testing, i is 0,1,2, …, N, where the zeroth residual set is the union set, and specifically includes:
determining the ith residual set and the residual sets of all test cases contained in the (i +1) th position scene as the (i +1) th residual set;
determining the actual position scene containing the most (i +1) th residual set test case elements as an (i + 2) th position scene;
determining that the intersection of all test cases contained in the (i + 2) th position scene and all test cases contained in the (i +1) th position scene is an (i +1) th sub-intersection, and determining that the remaining set of the intersection of all test cases contained in the (i + 2) th position scene and the (i +1) th sub-remaining set is an (i +1) th sub-remaining set;
determining the (i + 2) th position scene as a position scene where the (i +1) th sub-remainder set comprises all test cases for testing;
and N is the value of i when the number of elements in the residual set of the ith residual set and the ith sub-residual set is 0.
According to the test case layout method based on the cross-road information of the line to be tested, the preset deduplication rule aims to minimize the number of the actual position scenes required by the test cases when the union set of the test cases contained in the actual position scenes is tested.
The invention provides a test case layout method based on to-be-tested line traffic information, and the construction of a traffic scene database specifically comprises the following steps:
determining a corresponding relation between the test cases and the template position scene based on the test case classification based on the operation position on the test case library;
and searching the corresponding relation between the test cases in the test case library and the template cross-road scene to determine the corresponding relation between the template position scene and the template cross-road scene.
The invention provides a test case layout method based on traffic information of a line to be tested, wherein the traffic scene database is inquired based on the actual scene elements to determine the traffic scene to which the line to be tested belongs, and the method specifically comprises the following steps:
and if the actual scene element is judged to be consistent with the scene element in any template cross-road scene in the cross-road scene database, determining the cross-road scene to which the line to be tested belongs as any template cross-road scene.
The invention also provides a test case layout device based on the traffic information of the line to be tested, which comprises the following components:
the extraction unit is used for extracting actual scene elements and position attributes in the intersection information of the line to be detected;
the query unit is used for querying a traffic scene database based on the actual scene elements and determining a template position scene corresponding to a traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements;
the position unit is used for determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to the intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2;
and the duplication eliminating unit is used for processing the test cases contained in the actual position scenes based on a preset duplication eliminating rule and determining the test cases to be tested in the actual position scenes.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the test case layout method based on the to-be-tested line traffic information when executing the program.
The present invention also provides a non-transitory computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the test case layout method based on the traffic information of the line to be tested are implemented as described in any one of the above.
The test case layout method and device based on the traffic information of the line to be tested, provided by the invention, extract the actual scene elements and the position attributes in the traffic information of the line to be tested; then inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2; and finally, processing the test cases contained in the actual position scenes based on a preset duplication elimination rule, and determining the test cases to be tested in the actual position scenes. The method comprises the steps of determining a cross road scene of a line to be tested in a cross road scene database based on actual scene elements, matching a template position scene corresponding to the cross road scene of the line to be tested with position attributes of the line to be tested to determine an actual position scene contained in the line to be tested, and processing a test case contained in each actual position scene according to a preset deduplication rule to obtain the layout of a proper test case in each actual position scene, so that the situation that the same test case is repeatedly laid in different position scenes in the same cross road scene is avoided. Therefore, the method and the device provided by the invention can improve the efficiency of completing the test task, reduce the time consumption of the task, and avoid the waste of manpower and material resources caused by repeated tests of the same test case in the same intersection scene.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a test case layout method based on traffic information of a line to be tested according to the present invention;
fig. 2 is a structural diagram of a corresponding relationship between data stored in the traffic scene database according to the present invention;
FIG. 3 is a schematic diagram of a test case library scenario provided by the present invention;
fig. 4 is a schematic structural diagram of a test case layout device based on traffic information of a line to be tested according to the present invention;
FIG. 5 is a flow chart of a test case layout method for a line to be tested according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The existing subway operation scene case testing method generally has the problems of low test task completion efficiency and long time consumption caused by the fact that cases are tested one by one in a test case library of a project and waste of manpower and material resources caused by the fact that the same test case is tested repeatedly in the same traffic scene. The following describes the test case layout method based on the intersection information of the line to be tested according to the present invention with reference to fig. 1 to 3. Fig. 1 is a schematic flow chart of a test case layout method based on traffic information of a line to be tested, as shown in fig. 1, the method includes:
and step 110, extracting actual scene elements and position attributes in the intersection information of the line to be detected.
Optionally, the line to be tested is an actual line to be tested, which includes test cases corresponding to all the position scenes, and is also a main body to be laid with the test cases, that is, the test cases are laid in each position scene of the line to be tested. The premise of arranging the layout is to acquire which position scenes the line to be tested contains and which test cases each position scene can be tested in, and the information acquisition needs to be obtained from a pre-constructed traffic scene database. And the query condition for acquiring the information of the line to be tested from the intersection scene database is an actual scene element in the intersection information of the line to be tested. Scene elements refer to different operational sections included in the intersection information of lines in the subway operational scene, for example: a straight double track section between two stations, a station section, a single track turnout section, a crossing turnout section, and the like. For a line to be tested comprising three stations, two straight double-track sections and a single-track switch, the scene elements in the line to be tested are: the system comprises a platform, a straight double-track section and a single-track switch, wherein scene elements in the line to be detected are the same as scene elements of another line to be detected comprising seven platforms, six straight double-track sections and four single-track switches, the intersection scenes of the two lines can be judged to be the same only by confirming the consistency of the scene elements in the two lines, and the number of the scene elements in the two lines can be different. And the position attribute in the line to be detected is used for matching the position attribute with the template position scene in the template cross road scene after a template cross road scene corresponding to the line to be detected in the cross road scene database is searched subsequently, and determining the actual position scene in the line to be detected.
And 120, inquiring an intersection scene database based on the actual scene elements, and determining a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the intersection scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template intersection scene, and a corresponding relation between the template intersection scene and the scene elements.
Optionally, the traffic scene database is a database which is constructed in advance and stores a correspondence between the test case and the template position scene, a correspondence between the template position scene and the template traffic scene, and a correspondence between the template traffic scene and the scene element. And by taking the actual scene elements of the line to be detected as query conditions, finding out a template intersection scene of which the intersection scene database is consistent with the scene elements of the line to be detected, taking the template intersection scene as an intersection scene to which the line to be detected belongs, and extracting a template position scene contained in the template intersection scene from the scene database.
Step 130, determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to the intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2.
Optionally, since the intersection scene to which the line to be tested belongs is the template intersection scene obtained by querying the intersection scene database in step 120, and the intersection scene database further includes the corresponding relationship between each template position scene and the template intersection scene, and the corresponding relationship between the test case and each template position scene, since the actual position scene included in the line to be tested does not exceed the range of the template position scene corresponding to the corresponding template intersection scene queried in the intersection scene database, the actual position scene in the line to be tested can also be obtained by traversing all the template position scenes in the template intersection scene and sequentially performing matching with the position attribute in the line to be tested. For example, there are four template position scenes corresponding to the template intersection scene: crossing ZC demarcation point, interval, rail and website of turning back, and through crossing four stencil position scenes of ZC demarcation point, interval, rail and website of turning back in the stencil intersection scene carry out the matching with the position attribute in the circuit that awaits measuring in proper order, obtain the actual position scene in the circuit that awaits measuring and have three kinds: crossing ZC demarcation points, intervals and retrace tracks. The number of the actual position scenes is limited to be not less than 2, because when the number of the actual position scenes is only one, the mutually matched layout of the test cases among the position scenes is not needed, and in this case, the test of all the test cases in the only actual position scene is only needed to be completed when the test task of the line to be tested is executed.
And 140, processing the test cases contained in the actual position scenes based on a preset duplication elimination rule, and determining the test cases to be tested in the actual position scenes.
Optionally, for the same intersection scene, the same test cases on different position scenes can be merged, that is, only one test is selected in one position scene, and repeated tests are not needed, so that resource waste of manpower and material resources can be avoided, the efficiency of completing the test task is improved, and time consumption is reduced. The preset deduplication rule may be various rules, for example, the simplest test case of the same kind that repeatedly appears in different location scenes, one of the different location scenes is randomly selected as the location scene when the test that is laid out is performed, the test cases may be centralized in deduplication processing that includes the location scenes thereof, the deduplication processing may be performed with the minimum number of actual location scenes required by the test cases as a target when a union set of the test cases included in each actual location scene is tested, and the like, the preset deduplication rule is not specifically limited, different de-duplication processes can be carried out according to different test scene requirements to obtain different test case layouts, and compared with the prior art, the de-duplication test method has higher test task completion efficiency and less test task time consumption, the waste of manpower and material resources caused by repeated testing of the same test case in the same traffic scene can be avoided; different deduplication rules only have advantages for different application scenarios, such as small calculation amount, centralized utilization of manpower in the same location scenario, or reduction of the number of location scenarios participating in the test task to avoid mobilization of test personnel between different location scenarios.
The test case layout method based on the to-be-tested line traffic information provided by the invention extracts the actual scene elements and the position attributes in the to-be-tested line traffic information; then inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2; and finally, processing the test cases contained in the actual position scenes based on a preset duplication elimination rule, and determining the test cases to be tested in the actual position scenes. The method comprises the steps of determining a cross road scene of a line to be tested in a cross road scene database based on actual scene elements, matching a template position scene corresponding to the cross road scene of the line to be tested with position attributes of the line to be tested to determine an actual position scene contained in the line to be tested, and processing a test case contained in each actual position scene according to a preset deduplication rule to obtain the layout of a proper test case in each actual position scene, so that the situation that the same test case is repeatedly laid in different position scenes in the same cross road scene is avoided. Therefore, the method provided by the invention improves the efficiency of completing the test task, reduces the time consumption of the task, and can avoid the waste of manpower and material resources caused by repeated testing of the same test case in the same traffic scene.
On the basis of the above embodiment, the processing, based on the preset deduplication rule, the test cases included in each actual location scene, and determining the test cases that need to be tested in each actual location scene specifically include:
determining a union set of test cases contained in each actual position scene;
and randomly selecting one of the actual position scenes corresponding to any test case element in the union set, and determining the position scene where any test case element is positioned when testing.
Optionally, the duplication removal is performed on the test cases included in each actual position scene, namely, a union set of the test cases included in each actual position scene is determined, the union set is determined, that is, all the test cases which need to be tested when a test task is performed are checked, and the checked test cases are subsequently distributed to the corresponding position scene to ensure that each test case is tested only once, that is, the repeated testing of the same test case is avoided. The subsequent layout method provided by this embodiment randomly selects one of the actual position scenes corresponding to any test case element and collects the selected actual position scene, and determines the position scene where the test case element is located when testing. For example, the line to be tested has four actual position scenes, namely an actual position scene 1, an actual position scene 2, an actual position scene 3 and an actual position scene 4, and the traffic scene database can know that the actual position scene 1 corresponds to the template position scene 1 of the traffic scene to which the actual position scene belongs and the template traffic scene in the traffic scene database, and the traffic scene database also stores the corresponding relationship between the test cases and the template position scenes, so that the test cases included in the template position scene 1 can be inquired, that is, the test cases of the actual position scene 1 can be obtained, and the test cases included in the actual position scene 2, the actual position scene 3 and the actual position scene 4 can also be obtained respectively by the method. Assuming that the obtained actual location scene 1 includes test case 001, test case 003, test case 004, and test case 007, the actual location scene 2 includes test case 003, test case 004, test case 007, and test case 008, the actual location scene 3 includes test case 003, test case 007, test case 009, and test case 010, and the actual location scene 4 includes test case 001, test case 002, test case 005, and test case 006, then for test case 003, it can be determined and collected as { test case 001, test case 002, test case 003, test case 004, test case 005, test case 006, test case 007, test case 008, test case 009, test case 010}, for example, for test case 003 therein, one position scene laid during testing can be randomly selected from the actual position scene 1, the actual position scene 2 and the actual position scene 3 as a test case. The layout of the position scenes when the test cases appearing in different position scenes are tested by using the random determination mode can reduce the calculated amount of the preset deduplication rule processing and reduce the processing complexity, and is suitable for the condition that the execution main body, namely the corresponding device, of the test case layout method based on the to-be-tested line traffic information, which is provided by the invention, is low in hardware performance.
On the basis of the above embodiment, the preset deduplication rule is: and when the union set of the test cases contained in each actual position scene is tested, centralizing the test cases in the position scene containing the test cases.
Optionally, the duplication removal is performed on the test cases included in each actual position scene, namely, a union set of the test cases included in each actual position scene is determined, the union set is determined, that is, all the test cases which need to be tested when a test task is performed are checked, and the checked test cases are subsequently distributed to the corresponding position scene to ensure that each test case is tested only once, that is, the repeated testing of the same test case is avoided. The subsequent layout method provided by this embodiment sequentially and preferentially selects the location scene containing the most test cases to provide and concentrates the location scenes when the test cases need to be tested. For example: the line to be tested has six actual position scenes, namely an actual position scene 1, an actual position scene 2, an actual position scene 3, an actual position scene 4, an actual position scene 5 and an actual position scene 6, and the traffic scene database can know that the actual position scene 1 corresponds to the template position scene 1 of the traffic scene to which the actual position scene corresponds to the template traffic scene in the traffic scene database, because the corresponding relation between the test case and the template position scene is also stored in the cross road scene database, the test case contained in the template position scene 1 can be inquired, that is, the test cases of the actual position scene 1 can be obtained, and the test cases included in the actual position scene 2, the actual position scene 3, the actual position scene 4, the actual position scene 5, and the actual position scene 6 can be obtained by the above method. Assuming that the obtained actual position scene 1 includes test case 001, test case 002, test case 003, test case 004, test case 005, test case 006 and test case 007, the actual position scene 2 includes test case 008, the actual position scene 3 includes test case 007, the actual position scene 4 includes test case 010, the actual position scene 5 includes test case 001, test case 002, test case 005, test case 007 and test case 009, the actual position scene 6 includes test case 003, test case 004, test case 006, test case 008 and test case 010, then the position scenes including the most test cases can be selected in turn to provide and concentrate the position fields when the test cases need to be tested, wherein the position scenes including the most test cases are selected in turn to provide and concentrate the position fields when the test cases need to be tested Firstly, determining that the actual position scene 1 is the position scene containing the most test cases, then testing in the actual position scene 1 when the test cases 001, 002, 003, 004, 005, 006 and 007 are laid for testing tasks, for the remaining { test case 008, test case 009, test case 010}, since the actual position scene 6 contains more test cases 008 and 010 than other actual position scenes contain the rest test cases, therefore, when the test cases 008 and 010 are laid out to perform the test task, the test is performed in the actual position scene 6, for the last remaining test case 009, the actual position scene 5 that only contains the test case 009 is selected as the position scene where the test case 009 was subjected to the test task. Therefore, the duplication elimination processing mode of intensively arranging a large number of test cases in the same actual position scene is used, so that the human resources in the same position scene can be fully utilized, the repeated calling of the test cases for multiple times in the same actual position scene can also reduce the time for repeated setting of the same setting among the test cases, the consumed time is reduced, and the duplication elimination processing mode is suitable for the condition that the test task of the line to be tested is executed and has strict time limitation.
On the basis of the above embodiment, the processing, based on the preset deduplication rule, the test cases included in each actual location scene, and determining the test cases that need to be tested in each actual location scene specifically include:
determining a union set of test cases contained in each actual position scene;
determining the actual position scene containing the most test case elements in the union set as a first position scene;
determining the first position scene as the position scene where all test cases contained in the first position scene are tested;
for the determination of the ith location scenario and the location scenario where the ith location scenario includes the test case for testing, i is 0,1,2, …, N, where the zeroth residual set is the union set, and specifically includes:
determining the ith residual set and the residual sets of all test cases contained in the (i +1) th position scene as the (i +1) th residual set;
determining the actual position scene containing the most (i +1) th residual set test case elements as an (i + 2) th position scene;
determining that the intersection of all test cases contained in the (i + 2) th position scene and all test cases contained in the (i +1) th position scene is an (i +1) th sub-intersection, and determining that the remaining set of the intersection of all test cases contained in the (i + 2) th position scene and the (i +1) th sub-remaining set is an (i +1) th sub-remaining set;
determining the (i + 2) th position scene as a position scene where the (i +1) th sub-remainder set comprises all test cases for testing;
and N is the value of i when the number of elements in the residual set of the ith residual set and the ith sub-residual set is 0.
Optionally, in this embodiment, the position scenes that include the most test cases and are provided in sequence and preferentially selected and the test cases are concentrated when the test cases need to be tested are described by using a specific mathematical formula, so that how to perform the position scenes that include the most test cases and are provided in sequence and preferentially selected and the test cases need to be tested can be more clearly indicated. Firstly, finding out an actual position scene containing the most test case elements in the union set as a first position scene, then determining all test cases contained in the first position scene as the position scene where the test is carried out, then removing all test cases contained in the first position scene from the union set to obtain a first remainder set, wherein in order to ensure that the description for determining the i-th remainder set and the i + 1-th remainder set of all test cases contained in the i + 1-th position scene are the i + 1-th remainder set is common to the determination of the first remainder set, the condition that i is 0 is separately defined, namely the zero-th remainder set is the union set, and then determining the actual position scene containing the most test case elements in the i + 1-th remainder set as the i + 2-th position scene; continuing to remove the test cases which can be laid in the currently selected position scene from the current remainder set to obtain a remainder set selected in the next round of position scenes containing the most test cases, namely determining that the intersection of all the test cases contained in the (i + 2) th position scene and all the test cases contained in the (i +1) th position scene is the (i +1) th sub-intersection, and determining that the remainder set of the intersection of all the test cases contained in the (i + 2) th position scene and the (i +1) th sub-remainder set; and determining the (i + 2) th position scene as a position scene where the (i +1) th sub-remainder set comprises all test cases for testing. The end flag of this loop is to stop the iteration if the elements of the ith residual set and the ith sub-residual set are equal, i.e. N is the value of i when the number of elements in the ith residual set and the ith sub-residual set is 0.
On the basis of the above embodiment, when the preset deduplication rule tests the union set of the test cases included in each actual position scene, the minimum number of the actual position scenes required by the test cases is taken as a target.
Optionally, the duplication removal is performed on the test cases included in each actual position scene, namely, a union set of the test cases included in each actual position scene is determined, the union set is determined, that is, all the test cases which need to be tested when a test task is performed are checked, and the checked test cases are subsequently distributed to the corresponding position scene to ensure that each test case is tested only once, that is, the repeated testing of the same test case is avoided. The subsequent layout method provided by this embodiment aims to minimize the number of actual position scenes required by the test case during testing. For example: the actual position scene 1 includes a test case 001, a test case 002, a test case 003, a test case 004, a test case 005, a test case 006, and a test case 007, the actual position scene 2 includes the test case 008, the actual position scene 3 includes the test case 007, the actual position scene 4 includes the test case 010, the actual position scene 5 includes the test case 001, the test case 002, the test case 005, the test case 007, and the test case 009, the actual position scene 6 includes the test case 003, the test case 004, the test case 006, the test case 008, and the test case 010, and then { the test case 001, the test case 002, the test case 003, the test case 004, the test case 005, the test case 006, the test case 007, the test case 008, the test case 009, and the test case 010} can be determined and collected, and selected to be distributed in the actual position scene 5 for the test case 001, the test case 002, the test, The test cases 002, 005, 007, 009 perform tests on the test tasks, and the test cases 003, 004, 006, 008, 010 perform tests on the test tasks in the actual position scene 6. Therefore, the number of actual position scenes participating in the test task is reduced, and the movement of the tester among different position scenes can be avoided.
On the basis of the above embodiment, the construction of the traffic scene database specifically includes:
determining a corresponding relation between the test cases and the template position scene based on the test case classification based on the operation position on the test case library;
and searching the corresponding relation between the test cases in the test case library and the template cross-road scene to determine the corresponding relation between the template position scene and the template cross-road scene.
Optionally, to construct the traffic scene database, data in the traffic scene database needs to be integrated on the basis of an existing test case library, and a corresponding relationship between a test case and a position scene is extracted, and a corresponding relationship between the position scene and a traffic scene and a corresponding relationship between the traffic scene and a scene element are extracted, so that a large amount of disordered data without obvious association can be sorted into different corresponding tables through different corresponding relationships between the data so as to be extracted regularly during subsequent data extraction. Furthermore, the corresponding relation between the test case and the position scene is described by using the corresponding relation matrix, and the corresponding relation between the position scene and the traffic scene is also described by using the corresponding relation matrix.
Fig. 2 is a structural diagram of a corresponding relationship between data stored in the traffic scene database provided by the present invention, as shown in fig. 2: firstly, a test case library is obtained, test cases in the test case library are classified, and each test case corresponds to one or more test case scenes. Each test case scene corresponds to an actual operation position in a line, and each type of test case scene contains all test cases to be executed at the operation position in the line, so the test case scene is also called as a position scene because the test case scene corresponds to the actual operation position in the line. The operation scenes are composed of different test case scenes, and at least one test operation scene is determined by determining train operation cross roads according to the actual operation line of the train, so the test operation scene is also called as a cross road scene. And (3) with train operation cross roads as a carrier, embedding the test cases in the test case library into a test operation scene to generate a test operation scene library, namely a cross road scene database.
The test scenes are generated by combining test cases to analyze the route scenes which the train may pass under the CBTC system level and the input and output of the basic functions of the train under the route scenes on the basis of the existing subway line conditions. And analyzing and classifying all cases in the test case library, and making the test case library into a scene. Fig. 3 is a schematic diagram of test case library scenario provided by the present invention, as shown in fig. 3:
the test case library scene concrete implementation steps are as follows:
1. generating a test case scene class (namely the corresponding relation between the position scene and the test case):
the production of the test case library is to analyze the specific conditions and scenes of the existing line, classify the test cases by combining the characteristics of the test cases, divide the test cases into a plurality of classes, wherein each class corresponds to a specific position scene in the line, and the class contains all cases which can be executed in the position scene in the line. Thus, all test cases in the complete test case library are divided into a plurality of case scenarios. Table 1 is a relational matrix table of the correspondence between the test cases and the location scenes, and as shown in table 1, it represents the generated corresponding matrix between the test cases and the case scenes (i.e., the location scenes), and the test case scene class covers the sum of all the test cases in the test case library.
Table 1 relationship matrix of correspondence between test cases and position scenes
Figure BDA0002847781420000171
And finishing the classification of the test cases. The above table shows that all the test cases are classified, and the sum of all the cases in the test case library is covered in the case scene class.
2. Generating a test operation scene library (namely a traffic scene database):
the train operation cross road scene is used as a carrier, the test cases are used as nodes, the operation cross road scene is abstracted into a description form of an image, a common search algorithm is used for searching according to the characteristics of the cases to be tested in the position scene, and a complete test operation scene library, namely a corresponding relation matrix of the position scene (Case) and the cross road scene, is generated through multiple iterations.
Table 2 is a relational matrix table of the corresponding relationship between the position scene and the traffic scene, as shown in table 1, which is a relational matrix of the relationship between the test case and the test operation scene generated according to the above method:
table 2 relationship matrix of the corresponding relationship between the position scene and the traffic scene
Figure BDA0002847781420000181
In table 2, the label "1" indicates that the test case included in the location scenario is executed when the corresponding traffic scenario performs test operation, and the label "0" indicates that the test case included in the location scenario is not executed when the corresponding traffic scenario performs test operation, which can be seen from table 2.
To describe the implementation manner of the corresponding relationship between the location scene and the test case more intuitively, the following examples are given:
the following test cases are selected from the existing test case library as a sample case library:
case 001: handling one route to run at the CBTC-CM level;
case 002: handling one route down operation (ZC demarcation point) at the CBTC-CM level;
case 003: CBTC-CM foldback;
case 004: ITC-CM is converted into CBTC-CM;
case 005: CBTC train stop guarantee;
case 006: and detecting whether the CBTC train can normally move across a ZC boundary point or not in the process of entering a ZC (N +1) jurisdiction from a ZC (N) jurisdiction.
The test cases in the sample case library can be divided into three types of test case scenes, namely
Case C1: crossing ZC demarcation points;
case C2: an interval;
case C3: and turning back the rail.
Table 3 is a relational matrix table of the corresponding relationship between the test case and the case scenario class (i.e. location scenario), and table 3 is as follows:
TABLE 3 relationship matrix of the corresponding relationship between test cases and case scene classes
Figure BDA0002847781420000191
On the basis of the foregoing embodiment, the querying a traffic scene database based on the actual scene element to determine a traffic scene to which the line to be detected belongs specifically includes:
and if the actual scene element is judged to be consistent with the scene element in any template cross-road scene in the cross-road scene database, determining the cross-road scene to which the line to be tested belongs as any template cross-road scene.
Optionally, the present invention further defines a query condition for determining the intersection scene to which the line to be tested belongs to be queried from the intersection database as an actual scene element. Scene elements refer to different operational sections included in the intersection information of lines in the subway operational scene, for example: a straight double track section between two stations, a station section, a single track turnout section, a crossing turnout section, and the like. For a line to be tested comprising three stations, two straight double-track sections and a single-track switch, the scene elements in the line to be tested are: the system comprises a platform, a straight double-track section and a single-track switch, wherein scene elements in the line to be detected are the same as scene elements of another line to be detected comprising seven platforms, six straight double-track sections and four single-track switches, the intersection scenes of the two lines can be judged to be the same only by confirming the consistency of the scene elements in the two lines, and the number of the scene elements in the two lines can be different.
The following describes the network data-based service invocation relation path detection apparatus provided by the present invention, and the network data-based service invocation relation path detection apparatus described below and the network data-based service invocation relation path detection method described above may be referred to each other correspondingly.
Fig. 4 is a schematic structural diagram of the test case layout apparatus based on the cross-road information of the line to be tested according to the present invention, as shown in fig. 4, the apparatus includes an extraction unit 410, a query unit 420, a position scene unit 430, and a deduplication unit 440, wherein,
the extracting unit 410 is configured to extract an actual scene element and a position attribute in the intersection information of the line to be detected;
the query unit 420 is configured to query an intersection scene database based on the actual scene element, and determine a template position scene corresponding to an intersection scene to which the line to be tested belongs, where the intersection scene database includes a pre-stored correspondence between a test case and the template position scene, a correspondence between the template position scene and the template intersection scene, and a correspondence between the template intersection scene and the scene element;
the position scene unit 430 is configured to determine an actual position scene included in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, where the number of the actual position scenes is not less than 2;
the duplicate removal unit 440 is configured to process the test cases included in each actual location scene based on a preset duplicate removal rule, and determine the test case that needs to be tested in each actual location scene.
The test case layout device based on the to-be-tested line traffic information provided by the invention extracts the actual scene elements and the position attributes in the to-be-tested line traffic information; then inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2; and finally, processing the test cases contained in the actual position scenes based on a preset duplication elimination rule, and determining the test cases to be tested in the actual position scenes. The method comprises the steps of determining a cross road scene of a line to be tested in a cross road scene database based on actual scene elements, matching a template position scene corresponding to the cross road scene of the line to be tested with position attributes of the line to be tested to determine an actual position scene contained in the line to be tested, and processing a test case contained in each actual position scene according to a preset deduplication rule to obtain the layout of a proper test case in each actual position scene, so that the situation that the same test case is repeatedly laid in different position scenes in the same cross road scene is avoided. Therefore, the device provided by the invention improves the efficiency of completing the test task, reduces the time consumption of the task, and can avoid the waste of manpower and material resources caused by repeated testing of the same test case in the same traffic scene.
On the basis of the foregoing embodiment, in the apparatus, the deduplication unit is specifically configured to:
determining a union set of test cases contained in each actual position scene;
and randomly selecting one of the actual position scenes corresponding to any test case element in the union set, and determining the position scene where any test case element is positioned when testing.
The duplication eliminating unit provided by the invention can reduce the calculated amount of preset duplication eliminating rule processing and reduce the processing complexity due to the layout of the position scene when the test cases appearing in different position scenes are tested by using a random determining mode, and is suitable for the condition that the execution main body, namely the hardware performance of the corresponding device, for executing the test case layout method based on the to-be-tested line traffic information provided by the invention is low.
On the basis of the above embodiment, in the apparatus, the preset deduplication rule is: and when the union set of the test cases contained in each actual position scene is tested, centralizing the test cases in the position scene containing the test cases.
According to the preset duplication elimination rule provided by the invention, because a duplication elimination processing mode of intensively arranging a large number of test cases in the same actual position scene is used, the human resources in the same position scene can be fully utilized, the time for setting the duplicate setting in the same way among the test cases can be reduced by repeatedly calling the test cases for multiple times in the same actual position scene, the time consumption is reduced, and the rule is suitable for the condition that the test task execution of the line to be tested has strict time limitation.
On the basis of the foregoing embodiment, in the apparatus, the deduplication unit is specifically configured to:
determining a union set of test cases contained in each actual position scene;
determining the actual position scene containing the most test case elements in the union set as a first position scene;
determining the first position scene as the position scene where all test cases contained in the first position scene are tested;
for the determination of the ith location scenario and the location scenario where the ith location scenario includes the test case for testing, i is 0,1,2, …, N, where the zeroth residual set is the union set, and specifically includes:
determining the ith residual set and the residual sets of all test cases contained in the (i +1) th position scene as the (i +1) th residual set;
determining the actual position scene containing the most (i +1) th residual set test case elements as an (i + 2) th position scene;
determining that the intersection of all test cases contained in the (i + 2) th position scene and all test cases contained in the (i +1) th position scene is an (i +1) th sub-intersection, and determining that the remaining set of the intersection of all test cases contained in the (i + 2) th position scene and the (i +1) th sub-remaining set is an (i +1) th sub-remaining set;
determining the (i + 2) th position scene as a position scene where the (i +1) th sub-remainder set comprises all test cases for testing;
and N is the value of i when the number of elements in the residual set of the ith residual set and the ith sub-residual set is 0.
On the basis of the above embodiment, in the device, when the preset deduplication rule tests a union set of test cases included in each actual position scene, the minimum number of actual position scenes required by the test cases is taken as a target.
The preset duplication elimination rule provided by the invention can avoid the movement of testers among different position scenes due to the reduction of the number of the actual position scenes when the testers participate in the test task.
On the basis of the above embodiment, in the apparatus, the construction of the intersection scene database specifically includes:
determining a corresponding relation between the test cases and the template position scene based on the test case classification based on the operation position on the test case library;
and searching the corresponding relation between the test cases in the test case library and the template cross-road scene to determine the corresponding relation between the template position scene and the template cross-road scene.
On the basis of the foregoing embodiment, in the apparatus, the determining, by querying a traffic scene database based on the actual scene element, a traffic scene to which a line to be detected belongs specifically includes:
and if the actual scene element is judged to be consistent with the scene element in any template cross-road scene in the cross-road scene database, determining the cross-road scene to which the line to be tested belongs as any template cross-road scene.
On the basis of the above embodiments, the present invention provides a test case layout method for a circuit to be tested, and fig. 5 is a flow frame diagram of the test case layout method for the circuit to be tested provided by the present invention. As shown in fig. 5, the test case layout method is implemented by the following steps: inputting intersection scene information in an actual route (namely, a route to be tested), and then matching the intersection scene information in a database (namely, an intersection scene database) with an intersection scene contained in the database based on the intersection scene information (optionally, extracting an actual scene element of the intersection scene information) serving as a search condition, wherein the flow chart shown in fig. 5 is a flow chart combining 2 examples, one example is that an intersection scene in the actual route is matched with an intersection scene 2 in the database, and then only a test case layout in a right dotted frame is needed; another example is that the intersection scene in the actual route traverses all the intersection scenes in the database, and the intersection scenes from the intersection scene 1 to the intersection scene n are not matched, so that the intersection scene of the actual route is added into the database as a new intersection scene to supplement and update the original database. The layout method of the test cases described in the right dotted line box comprises the following steps: traversing the position scenes (location1, location2, …, and location n) corresponding to the intersection scene 2 in the database, finding out the location1, location2, and location n that are just matched in the intersection scene in the actual line, then finding out the test cases contained in each position scene, laying the test cases by using a combination algorithm (i.e., the preset deduplication rule described above), generating a test operation scene family, and automatically numbering the test operation scene family.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a test case placement method based on routing information of the line under test, the method comprising: extracting actual scene elements and position attributes in the intersection information of the line to be detected; inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2; and processing the test cases contained in each actual position scene based on a preset duplication elimination rule, and determining the test cases to be tested in each actual position scene.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the test case layout method based on the route crossing information of the line to be tested provided by the above methods, where the method includes: extracting actual scene elements and position attributes in the intersection information of the line to be detected; inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2; and processing the test cases contained in each actual position scene based on a preset duplication elimination rule, and determining the test cases to be tested in each actual position scene.
In another aspect, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to execute the test case layout method based on the route information of the line to be tested, where the method includes: extracting actual scene elements and position attributes in the intersection information of the line to be detected; inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements; determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2; and processing the test cases contained in each actual position scene based on a preset duplication elimination rule, and determining the test cases to be tested in each actual position scene.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A test case layout method based on to-be-tested line traffic information is characterized by comprising the following steps:
extracting actual scene elements and position attributes in the intersection information of the line to be detected;
inquiring a traffic scene database based on the actual scene elements, and determining a template position scene corresponding to the traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements;
determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to an intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2;
and processing the test cases contained in each actual position scene based on a preset duplication elimination rule, and determining the test cases to be tested in each actual position scene.
2. The method for laying out test cases based on traffic information of lines to be tested according to claim 1, wherein the step of processing the test cases included in each actual position scene based on a preset deduplication rule to determine the test cases to be tested in each actual position scene comprises the steps of:
determining a union set of test cases contained in each actual position scene;
and randomly selecting one of the actual position scenes corresponding to any test case element in the union set, and determining the position scene where any test case element is positioned when testing.
3. The method as claimed in claim 1, wherein the preset deduplication rule is to centralize the test cases in the location scenes including the test cases when testing the union set of the test cases included in each of the actual location scenes.
4. The method according to claim 3, wherein the step of processing the test cases included in the actual position scenes based on the preset deduplication rule to determine the test cases to be tested in the actual position scenes comprises:
determining a union set of test cases contained in each actual position scene;
determining the actual position scene containing the most test case elements in the union set as a first position scene;
determining the first position scene as the position scene where all test cases contained in the first position scene are tested;
for the determination of the ith location scenario and the location scenario where the ith location scenario includes the test case for testing, i is 0,1,2, …, N, where the zeroth residual set is the union set, and specifically includes:
determining the ith residual set and the residual sets of all test cases contained in the (i +1) th position scene as the (i +1) th residual set;
determining the actual position scene containing the most (i +1) th residual set test case elements as an (i + 2) th position scene;
determining that the intersection of all test cases contained in the (i + 2) th position scene and all test cases contained in the (i +1) th position scene is an (i +1) th sub-intersection, and determining that the remaining set of the intersection of all test cases contained in the (i + 2) th position scene and the (i +1) th sub-remaining set is an (i +1) th sub-remaining set;
determining the (i + 2) th position scene as a position scene where the (i +1) th sub-remainder set comprises all test cases for testing;
and N is the value of i when the number of elements in the residual set of the ith residual set and the ith sub-residual set is 0.
5. The method as claimed in claim 1, wherein the preset deduplication rule is used to test a union set of test cases included in each actual position scene, and the minimum number of actual position scenes required by the test cases is used as a target.
6. The test case layout method based on to-be-tested line intersection information as claimed in any one of claims 1 to 5, wherein the construction of the intersection scene database comprises:
determining a corresponding relation between the test cases and the template position scene based on the test case classification based on the operation position on the test case library;
and searching the corresponding relation between the test cases in the test case library and the template cross-road scene to determine the corresponding relation between the template position scene and the template cross-road scene.
7. The method for laying test cases based on traffic information of lines to be tested according to any one of claims 1 to 5, wherein the step of querying a traffic scene database based on the actual scene elements to determine the traffic scene to which the lines to be tested belong comprises the steps of:
and if the actual scene element is judged to be consistent with the scene element in any template cross-road scene in the cross-road scene database, determining the cross-road scene to which the line to be tested belongs as any template cross-road scene.
8. The utility model provides a device is laid to test case based on circuit traffic information that awaits measuring which characterized in that includes:
the extraction unit is used for extracting actual scene elements and position attributes in the intersection information of the line to be detected;
the query unit is used for querying a traffic scene database based on the actual scene elements and determining a template position scene corresponding to a traffic scene to which the line to be tested belongs, wherein the traffic scene database comprises a pre-stored corresponding relation between a test case and the template position scene, a corresponding relation between the template position scene and the template traffic scene, and a corresponding relation between the template traffic scene and the scene elements;
the position unit is used for determining an actual position scene contained in the line to be tested based on the position attribute of the line to be tested and a template position scene corresponding to the intersection scene to which the line to be tested belongs, wherein the number of the actual position scenes is not less than 2;
and the duplication eliminating unit is used for processing the test cases contained in the actual position scenes based on a preset duplication eliminating rule and determining the test cases to be tested in the actual position scenes.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the test case layout method according to any one of claims 1 to 7 based on the routing information of the line to be tested when executing the program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the test case layout method based on the routing information of the line under test according to any one of claims 1 to 7.
CN202011515651.6A 2020-12-21 2020-12-21 Test case layout method and device based on to-be-tested line intersection information Pending CN112540928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011515651.6A CN112540928A (en) 2020-12-21 2020-12-21 Test case layout method and device based on to-be-tested line intersection information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011515651.6A CN112540928A (en) 2020-12-21 2020-12-21 Test case layout method and device based on to-be-tested line intersection information

Publications (1)

Publication Number Publication Date
CN112540928A true CN112540928A (en) 2021-03-23

Family

ID=75019269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011515651.6A Pending CN112540928A (en) 2020-12-21 2020-12-21 Test case layout method and device based on to-be-tested line intersection information

Country Status (1)

Country Link
CN (1) CN112540928A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326211A (en) * 2021-08-04 2021-08-31 卡斯柯信号(北京)有限公司 Test case generation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326211A (en) * 2021-08-04 2021-08-31 卡斯柯信号(北京)有限公司 Test case generation method and device

Similar Documents

Publication Publication Date Title
US9798310B2 (en) Method for searching cross-regional power supply area based on CIM model and system thereof
CN103294594B (en) A kind of wrong report of the static analysis based on test removing method
CN109800156B (en) Subway signal system automatic test method based on configuration file command
CN112000557B (en) Automatic testing device for rail transit signal system
CN102567565B (en) Cable parameter processing method and system utilizing same
CN109446689A (en) DC converter station electrical secondary system drawing recognition methods and system
CN110765639A (en) Electrical simulation modeling method and device and readable storage medium
CN109582943B (en) Method for automatically generating engineering data table
CN112765020A (en) Automatic testing method of computer interlocking system
CN106951963B (en) Knowledge refining method and device
CN105786898B (en) A kind of construction method and device of domain body
CN112540928A (en) Test case layout method and device based on to-be-tested line intersection information
US20110289086A1 (en) System, method and apparatus for data analysis
CN108629124B (en) Method for automatically generating simulation parameter data based on active graph path
CN113111659A (en) Power inspection work ticket generation method, system, equipment and storage medium
CN111858331A (en) Method, device and equipment for detecting coverage of front-end control
CN112966947B (en) Intelligent tourist attraction management method and system based on Internet of things
CN115098362A (en) Page testing method and device, electronic equipment and storage medium
CN108286972A (en) The intelligent error-checking method and device and hybrid navigation system of data in navigation electronic map
CN112183963A (en) Power grid real-time risk identification method based on provincial and local grid frame splicing
CN112346898A (en) Test method and system for rail transit system
CN109685453A (en) The method of intelligent recognition workflow active path
CN109754159A (en) A kind of information extracting method and system of operation of power networks log
CN103605673B (en) A kind of method and apparatus for analyzing multiple network resource points
CN110866156B (en) Method, device, equipment and medium for identifying functional park based on social data

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