CN113501034B - Test log generation method and device for railway signal system - Google Patents

Test log generation method and device for railway signal system Download PDF

Info

Publication number
CN113501034B
CN113501034B CN202111052640.3A CN202111052640A CN113501034B CN 113501034 B CN113501034 B CN 113501034B CN 202111052640 A CN202111052640 A CN 202111052640A CN 113501034 B CN113501034 B CN 113501034B
Authority
CN
China
Prior art keywords
test
case
target
simulation tool
step number
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
CN202111052640.3A
Other languages
Chinese (zh)
Other versions
CN113501034A (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.)
Casco Signal Beijing Ltd
Original Assignee
Casco Signal Beijing 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 Casco Signal Beijing Ltd filed Critical Casco Signal Beijing Ltd
Priority to CN202111052640.3A priority Critical patent/CN113501034B/en
Publication of CN113501034A publication Critical patent/CN113501034A/en
Application granted granted Critical
Publication of CN113501034B publication Critical patent/CN113501034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The invention discloses a test log generation method and a test log generation device for a railway signal system, relates to the technical field of railway signal system testing, and mainly aims to improve the sorting efficiency of test logs; the main technical scheme comprises: determining a case label and a step number corresponding to a test case of a railway signal system, wherein the step number is a number corresponding to a step in the railway signal system related to the test case; executing the test case by using a target simulation tool; recording target time involved when the target simulation tool executes the test case, wherein the test log is a test log related to the target time; naming a test log of the target simulation tool for executing the test case based on the case label, the step number and the name of the target simulation tool; and archiving the named test log into a target folder under a specified archiving path.

Description

Test log generation method and device for railway signal system
Technical Field
The invention relates to the technical field of railway signal system testing, in particular to a method and a device for generating a test log aiming at a railway signal system.
Background
The railway signal system is a system for displaying, changing and controlling railway signals, is a signal safety control product for finishing train operation control, and is a system for train signal safety control. Once the railway signal system is abnormal, the problem of the train signal can be caused, and the running safety of the train is threatened. Therefore, in order to ensure train operation safety, the railway signal system needs to be tested before it is put into use. When a railway signal system is tested, a test case written by a service person is needed to be used for test execution, then the correctness of a test result is analyzed through a test log after the test execution of the test case, and meanwhile, the test log also needs to be stored as an evidence of a test conclusion so as to facilitate subsequent tracking and reference. Therefore, the test log corresponding to the test case is a main component of the test activity of the railway signal system.
At present, after a test case is tested, most of formed test logs are named by simulation tool names and dates and then are stored. When problem analysis and problem replication are carried out, the test logs and the test cases are difficult to associate, and the corresponding relation between the test logs and the test cases is often required to be combed again through manual work. The workload of the finishing work is large, so that not only is the time spent, but also the artificial errors are easily caused.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for generating a test log for a railway signal system, and mainly aims to improve the efficiency of sorting the test log.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in a first aspect, the present invention provides a method for generating a test log for a railway signal system, the method comprising:
determining a case label and a step number corresponding to a test case of a railway signal system, wherein the step number is a number corresponding to a step in the railway signal system related to the test case;
executing the test case by using a target simulation tool;
recording target time involved when the target simulation tool executes the test case, wherein the test log is a test log related to the target time;
naming a test log of the test case executed by the target simulation tool based on the case label, the step number and the name of the target simulation tool;
and archiving the named test log into a target folder under a specified archiving path.
In a second aspect, the present invention provides a test log generating apparatus for a railway signal system, the apparatus comprising:
the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a case label and a step number corresponding to a test case of the railway signal system, and the step number is a number corresponding to a step in the railway signal system related to the test case;
the execution unit is used for executing the test case by using a target simulation tool;
the recording unit is used for recording the target time involved when the target simulation tool executes the test case;
the naming unit is used for naming the test log of the test case executed by the target simulation tool based on the case label, the step number and the name of the target simulation tool, wherein the test log is related to the target time;
and the filing unit is used for filing the named test logs into a target folder under the appointed filing path.
In a third aspect, the present invention provides a computer-readable storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the test log generation method for a railway signal system according to the first aspect.
In a fourth aspect, the present invention provides a storage management apparatus, including:
a memory for storing a program;
a processor, coupled to the memory, for executing the program to perform the test log generation method for a railway signal system of the first aspect.
By means of the technical scheme, when the test case of the railway signal system needs to be tested, the case label and the step number corresponding to the test case are determined, and the test case is executed by using the target simulation tool. And recording the target time involved when the target simulation tool executes the test case. And naming a test log which is formed when the target simulation tool executes the test case and is related to the target time based on the case label, the step number and the name of the target simulation tool. And finally, filing the named test log into a target folder under a specified filing path. Therefore, the scheme provided by the invention names the test logs through the simulation tool name, the case label and the step number, so that the test content corresponding to each test log is more definite. And the test log is filed in a target folder under the appointed filing path, so that the log storage is more organized. Therefore, the efficiency of arranging the test logs can be improved, in addition, the correctness of the test result is analyzed through the test logs subsequently, and when the test logs are used as the evidence of the test conclusion to be tracked and consulted, the required test logs can be found quickly.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 shows a flow chart of a test log generation method for a railway signal system according to an embodiment of the present invention;
FIG. 2 illustrates a flow chart of a method of test log generation for a railway signal system according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a test log generation apparatus for a railway signal system according to an embodiment of the present invention;
fig. 4 shows a schematic structural diagram of a test log generation apparatus for a railway signal system according to another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The railway signal system is a system for displaying, changing and controlling railway signals, is a signal safety control product for finishing train operation control, and is a system for train signal safety control. Once the railway signal system is abnormal, the problem of the train signal can be caused, and the running safety of the train is threatened. Therefore, in order to ensure train operation safety, the railway signal system needs to be tested before it is put into use. When a railway signal system is tested, a test case written by a service person is needed to be used for test execution, then the correctness of a test result is analyzed through a test log after the test execution of the test case, and meanwhile, the test log also needs to be stored as an evidence of a test conclusion so as to facilitate subsequent tracking and reference. Therefore, the test log corresponding to the test case is a main component of the test activity of the railway signal system.
At present, after a test case is tested, when problem analysis and problem recovery are carried out, a test log and the test case are difficult to associate, the corresponding relation between the test log and the test case is often required to be combed again through manpower, the test log is arranged according to the requirement of the test log, the workload of arrangement work is large, time is spent, and human errors are easily caused. Therefore, in order to improve the efficiency of sorting the test logs, embodiments of the present invention provide a method and an apparatus for generating a test log for a railway signal system, so that when the test log is generated, an association between the test log and a test case is established through naming of the test log. The method and apparatus for generating the test log for the railway signal system will be described in detail below.
As shown in fig. 1, an embodiment of the present invention provides a method for generating a test log for a railway signal system, where the method mainly includes:
101. determining a case label and a step number corresponding to a test case of the railway signal system, wherein the step number is a number corresponding to a step in the railway signal system related to the test case.
The railway signal system is a system for displaying, changing and controlling railway signals, and is a signal safety control product for completing train operation control. The specific type of the railway signal system is not specifically limited in this embodiment, and may include, but is not limited to, a station signal control system, a marshalling station shunting control system, an interval signal control system, a train operation command control system, and a train operation control system.
In order to test the performance of the railway signal system, a large number of test cases need to be written, and the test cases can comprehensively test the performance of the railway signal system. The railway signal system comprises a plurality of functions, each function involves a plurality of steps, and therefore each test case is a set of test inputs, execution conditions and expected results compiled for all or part of the steps of a certain function in the railway signal system.
When any one test case of the railway signal system needs to be used for executing a test, a case label and a step number of the test case need to be determined, wherein the case label is used for identifying the test case, and the step number is a number corresponding to a step in the railway signal system related to the test case.
The following describes a process for determining a case label and a step number corresponding to a test case of a railway signal system, where the process includes the following steps:
step one, copying the test case to form a copy of the test case.
In order to avoid the modification of the test case, the original test case is not directly used when the test case is executed, but the original test case is copied, and the copy formed by copying the test case is used for executing the test.
When the test case is copied, firstly, the path of the test case needs to be acquired. When the path is verified to be legal, the test case is directly copied according to the path. And when the verification path is illegal, prompting the tester to input the path aiming at the test case again until the legal path is received.
And step two, removing the copy.
The content of the copy is identical to that of the test case, so the copy may have the following two problems: one is that the format of the document in the copy may not meet the requirements of performing the test; secondly, the tester may set some revision records during the test case maintenance, and the existence of the revision records may affect the execution of the test.
In order to successfully execute the test, it needs to perform a clearing process on the copy, and the process may include the following three processes: firstly, clearing the document format in the copy; secondly, clearing the revision record in the copy; thirdly, the two are used in combination.
And step three, extracting the use case label from the removed copy based on a preset use case label format, and extracting the step number from the removed copy.
And when the use case tags are extracted, extracting the use case tags from the copy based on a preset use case tag format. The preset use case label format is set by a tester based on a service requirement, and the specific setting requirement of the use case label format is determined according to a specific requirement, which is not specifically limited in this embodiment. Exemplary, use case tag formats are: and testing the functional module name-testing level-case number corresponding to the test case.
When the step number is extracted, the number corresponding to the step related to the test case may be extracted.
Further, when the step number or the case label is extracted, if the extraction is not successful, a prompt of extraction failure needs to be sent out, so that the tester can perform exception handling based on the prompt.
And step four, determining the extracted step numbers and the extracted case labels as case labels and step numbers corresponding to the test cases.
And after the step numbers and the case labels are extracted, displaying the extracted case labels and the step numbers by taking the test cases as units for a tester to select. And determining the selected case label and the step number as the case label and the step number corresponding to the test case. When the test case is used as a unit to display the extracted case label and the step number, the case label and the step number can be displayed in an interactive interface mode, and when a tester selects the case label and the step number on the interactive interface, the selected case label and the step number are determined as the selected case label and the step number.
102. And executing the test case by using a target simulation tool.
The specific process for executing the test case by using the target simulation tool comprises the following steps of:
step one, copying the test case to form a copy of the test case.
And step two, removing the copy.
The above steps one and two are the same as the processes of forming the copy and performing the removal processing on the copy in step 101, and therefore will not be described herein again. In addition, if step one and step two have already been executed in step 101, then step 102 may be omitted.
And step three, executing the copy by using the target simulation tool.
The simulation tool for executing the test on the test case may be selected based on the requirement, and the selected simulation tool for executing the test on the test case is the target simulation tool. The following is a description of the determination of the target simulation tool, which is the process: and displaying the names of the plurality of simulation tools, and determining the simulation tool corresponding to the selected name as a target simulation tool. The method for displaying the name of the simulation tool comprises the following two modes: one is that the names of a plurality of simulation tools are displayed in the form of an interactive interface; alternatively, the names of the plurality of simulation tools are presented in the form of voice. Correspondingly, the selected names include the following two types: one is that when the name on the interactive interface is selected, the selected name is determined as the selected name; alternatively, when the tester inputs a voice, the name in the voice input is determined as the selected name.
After the target simulation tool is determined, the test case is executed using the target simulation tool. It should be noted that the number of target simulation tools is not specifically limited in this embodiment, and may be determined based on business requirements.
For example, different simulators have different test effects, and in order to obtain different test effects, one test case may simultaneously use multiple simulators to perform a test. At this time, a plurality of target simulation tools may be determined, each of which executes the test case and forms a test log corresponding thereto.
For example, when one simulation tool executes a test on a test case, the simulation tool may be associated with other simulation tools, and in this case, not only the simulation tool executing the test needs to be determined as a target simulation tool, but also the simulation tool associated with the simulation tool needs to be determined as a target simulation tool. For example, when the simulation tool 1 executes a test case, it uses the output of the simulation tool 2 for executing the test, and the simulation tool 1 also outputs the test to the simulation tool 3, so that the simulation tool 1, the simulation tool 2, and the simulation tool 3 are all determined as target simulation tools.
103. And recording the target time involved when the target simulation tool executes the test case.
In order to clearly understand the time when the test case is tested, the target time involved in the test case execution by the target simulation tool needs to be recorded.
The following describes a specific process for recording the target time involved when the target simulation tool executes the test case, where the process is as follows: displaying a plurality of target time items, wherein one target time item corresponds to one target time involved when the simulation tool executes the test case; and recording the target time corresponding to the selected target time item when the target simulation tool executes the test case.
The target time item can be set based on the service requirement, for example, the target time item can include a test start time item, a test end time item, and any time in the test process. The test start time item corresponds to test start time involved when the simulation tool executes the test case, the test end time item corresponds to test end time involved when the simulation tool executes the test case, any time in the test process can be time after a period of test execution, and the period of time can be determined based on service requirements, for example, the test is executed for a corresponding time ten minutes later. The purpose of showing a plurality of target time items is to enable a tester to flexibly select the time required to be recorded according to the time recording requirement. It should be noted that, the target time item may be displayed in the interactive interface when displayed.
When one or more target time items are selected, the fact that the requirement for recording the target time corresponding to the selected target time items exists for the testing personnel is indicated. And recording target time records corresponding to the selected target time items when the target simulation tool executes the test case.
104. Naming the test log of the test case executed by the target simulation tool based on the case label, the step number and the name of the target simulation tool, wherein the test log is the test log related to the target time.
After the target simulation tool completes the execution of the test case, a test log corresponding to the test case under the target simulation tool is formed. The test logs related to the target time in the test logs can be extracted and named. For example, when the target time is the test start time and the test end time, all test logs of the test case are extracted and named. For example, if the target time is the test start time and the time ten minutes after the test starts to be executed, the test logs formed between the test start time and the time ten minutes after the test starts to be executed in the test logs of the test cases are extracted and named.
In order to analyze the correctness of the test result by using the test log after the test case test is executed and to take the test log as the evidence of the test conclusion so as to facilitate the subsequent tracking and reference, the test log needs to be named by using the case label, the step number and the name of the target simulation tool, so that the test log can be quickly found according to the name of the test log when the test log is required subsequently. The test log is named by using the case label, the step number and the name of the target simulation tool, so that the test log can be clearly marked which simulation tool tests which test case and which steps in the railway signal system the test log relates to.
The following describes a specific process for naming a test log of a target simulation tool for executing a test case, where the process includes: naming the test log according to a preset naming format by using the use case label, the step number and the name of the target simulation tool, wherein the naming format defines the position of the use case label, the step number and the name of the target simulation tool in the name of the test log.
The naming format defines the positions of the use case labels, the step numbers and the names of the target simulation tools in the names of the test logs, and the specific positions of the contents can be flexibly set by the testers according to the requirements. Illustratively, the naming format is: name of target simulation tool-use case label-step number.
105. And archiving the named test log into a target folder under a specified archiving path.
The setting principle of the designated archive path can be two types as follows: first, an appointed filing path is a path for a target test case, and test logs of the target test case are filed under the appointed filing path, that is, each test case has an appointed filing path corresponding to the test case, and the appointed filing paths of different test cases are different. And secondly, designating an archiving path as a path aiming at time, and archiving the test logs of the test cases executed in the target time period under one target archiving path. And thirdly, designating the archive path as a path aiming at the simulation tool, and archiving the test logs of the test cases executed by the same simulation tool under one target archive path.
The specified archival path may be set by the tester through the interactive interface before the test begins.
In order to uniformly manage the test logs, when the named test logs are filed to a specified filing path, a target folder is automatically created, the target folder is named by one or more of a case label, a step number, the name of a target simulation tool and target time, and then the named test logs are stored in the target folder. Of course, if the target folder already exists in the designated filing path when the test log is filed, the test log can be directly placed under the target folder without creating a new file.
The naming of the target folder may be determined based on business requirements, for example, in order to place the test logs of the same test case under one folder to facilitate management of the test logs of the same test case, the target folder is named using a case tag. Because different simulators have different test effects, in order to obtain different test effects, one test case can simultaneously use a plurality of simulation tools to execute the test, so that test logs under a plurality of simulation tools may exist for the same test case, the logs are convenient to use and manage, and the test logs are filed under one folder.
According to the test log generation method for the railway signal system, when a test case of the railway signal system needs to be tested, a case label and a step number corresponding to the test case are determined, and the test case is executed by using a target simulation tool. And recording the target time involved when the target simulation tool executes the test case. And naming a test log which is formed when the target simulation tool executes the test case and is related to the target time based on the case label, the step number and the name of the target simulation tool. And finally, filing the named test log into a target folder under a specified filing path. Therefore, the scheme provided by the embodiment of the invention names the test logs through the simulation tool name, the case label and the step number, so that the test content corresponding to each test log is more definite. And the test log is filed in a target folder under the appointed filing path, so that the log storage is more organized. Therefore, the efficiency of arranging the test logs can be improved, in addition, the correctness of the test result is analyzed through the test logs subsequently, and when the test logs are used as the evidence of the test conclusion to be tracked and consulted, the required test logs can be found quickly.
Further, according to the method shown in fig. 1, another embodiment of the present invention further provides a method for generating a test log for a railway signal system, as shown in fig. 2, the method mainly includes:
201. and acquiring a preset case label format and a document path of the test case.
And setting an interactive interface, and reminding a tester of inputting a case label format and a document path of a test case when the tester needs to test. When a tester inputs a case label format and a document path of a test case on the interactive interface, the case label format and the document path of the test case are obtained.
The preset use case label format is used for defining the format of the use case label, and the use case label format may be determined based on the service requirement, which is not specifically defined in this embodiment. Illustratively, the use case tag format is: function module name-test level-case number.
The document path of the test case is the path of the test case storage. An 'extraction' button can be arranged in the interactive interface, and when the 'extraction' button is triggered, in order to accurately acquire the test case, the legality of a document path of the test case needs to be verified. And if the document path of the test case is verified to be legal, directly acquiring the test case according to the path. And if the document path of the test case is verified to be illegal, indicating that the tester possibly inputs the path error, sending an error prompt so that the tester inputs a correct document path according to the prompt.
202. And copying the test case to form a copy of the test case.
And copying the test case according to the path of the test case storage to form a copy of the test case.
203. And clearing the copy.
In order to successfully execute the test, it needs to perform a clearing process on the copy, and the process may include the following three processes: firstly, clearing the document format in the copy; secondly, clearing the revision record in the copy; thirdly, the two are used in combination.
204. And extracting the use case label from the copy after the clearing processing based on a preset use case label format, and extracting the step number from the copy after the clearing processing.
If the step number and the use case tag can be extracted from the copy, the step number and the use case tag can be directly extracted. And if the step numbers and/or the case labels cannot be extracted from the copy, sending a prompt to enable the tester to perform exception handling.
Illustratively, the steps in the railway signal system involved in the replica are numbered step1,2,3, and the extracted step is numbered step1,2, 3. The use case tag extracted from the copy based on the use case tag format is RMU-SyRTC-0262, wherein RMU represents the name of the functional module, SyRTC represents the test level, and 0262 represents the number of the use case.
205. And displaying the extracted case label and the step number by taking the test case as a unit.
And if the case label and the step number are extracted from the copy, displaying the extracted case label and the step number by taking the test case as a unit. The display mode can be presented in a checking mode in the interactive interface for the tester to select.
206. And determining the selected case label and the step number as the case label and the step number corresponding to the test case.
207. Names of a plurality of simulation tools are presented.
The purpose of showing the names of a plurality of simulation tools is to enable a tester to flexibly select the simulation tools according to test requirements. The following explains a name setting method of a simulation tool, which includes the following two types:
firstly, a simulation tool input box is arranged on an interactive interface, and a tester inputs all simulation tool names which are possibly used in a test process and a log path corresponding to each simulation tool in the simulation tool input box. The simulation tool name and the log path input by the tester are read, and then the name of each simulation tool is displayed for the tester to select, wherein the display mode can be determined based on business requirements, the embodiment is not particularly limited, and optionally, the display mode is displayed in a drop-down box mode. And determining the simulation tool corresponding to the selected name as a target simulation tool used for testing, and storing a test log generated by the target simulation tool executing the test case in a corresponding log path.
And secondly, reading a preset configuration file, wherein the configuration file can be used for configuring the names of all simulation tools possibly used in the whole product testing process and corresponding test log storage paths. And then, displaying the names of all simulation tools on the interactive interface according to the read configuration file for the tester to select. The display mode may be determined based on a business requirement, and this embodiment is not particularly limited, and optionally, the display mode is a selectable mode. And determining the simulation tool corresponding to the selected name as a target simulation tool used for testing, and storing a test log generated by the target simulation tool executing the test case in a corresponding log path.
For example, simulation tool names may include, but are not limited to: OMAP, TrainSim, TSRS, OC, Wireshark, SecureCRT, CTC, autonomous machine.
208. And determining the simulation tool corresponding to the selected name as the target simulation tool.
The tester may choose that the test execution involves critical simulation tools, and non-critical simulation tools may not. And determining the simulation tool corresponding to the selected name as a target simulation tool for testing.
209. And displaying a plurality of target time items, wherein one target time item corresponds to one target time involved when the simulation tool executes the test case.
The target time item may be set based on the service requirement, for example, the target time item includes a test start time item and/or a test end time item, where the test start time item corresponds to a test start time involved when the simulation tool executes the test case, and the test end time item corresponds to a test end time involved when the simulation tool executes the test case. The purpose of showing a plurality of target time items is to enable a tester to flexibly select the time required to be recorded according to the time recording requirement. It should be noted that, the target time item may be displayed in the interactive interface when displayed.
210. And determining the selected target time item.
For example, two buttons of a test start time item and a test end time item are displayed on the interactive interface, and when the two buttons are selected, the test start time and the test end time involved when the target simulation tool executes the test case need to be recorded.
211. Executing the copy of the test case using a target simulation tool.
And when a test execution button on the interactive interface is triggered, executing the copy of the test case by using the target simulation tool, and starting the execution of the test aiming at the test case.
212. And recording the target time involved when the target simulation tool executes the test case.
The purpose of recording the target time involved when the target simulation tool executes the test case is to extract the test log related to the target time from the log path of the target simulation tool and name the extracted test log.
213. Naming the test log of the test case executed by the target simulation tool based on the case label, the step number and the name of the target simulation tool.
And reading a test log related to the target time when the target simulation tool executes the test case, and naming the test log related to the target time when the target simulation tool executes the test case by using a case label, the step number and the name of the target simulation tool.
Illustratively, the test log is named:
OMAP-[RMU-SyRTC-0262]-step1,2,3。
wherein, OMAP is the name of the simulation tool, RMU-SyRTC-0262 is the use case label, step1,2,3 are step numbers.
214. A specified archival path is determined.
And the tester sets a designated filing path through the interactive interface so as to file the named test log.
Of course, to ensure that the specified archival path is legitimate, the specified archival path needs to be verified. If the specified filing path is verified to be legal, the named test log is filed to the specified filing path. If the designated filing path is verified to be illegal, a path error prompt is sent out, so that a tester can input the correct designated filing path again according to the prompt.
215. And archiving the named test log into a target folder under a specified archiving path.
The target folder is named based on one or more of a use case label, a step number, a name of the target simulation tool, and a target time. The specific implementation manner of the target folder is substantially the same as that of step 105, and therefore, will not be described herein again.
When the named test log is filed to a designated filing path, a folder can be automatically created based on one or more of the use case label, the step number, the name of the target simulation tool and the target time as the name, and then the named test log is stored under the folder.
Illustratively, the automatically creating a folder with the label, the step code and the target time as names is as follows:
[RMU-SyRTC-0262]-step1,2,3-20210601_155347-20210601_161031
the test log in step 212 is stored under that folder.
216. If the retrieval condition is obtained, detecting whether the format of the content carried by the retrieval condition is legal, and if so, executing 217; otherwise, 218 is performed.
In actual retrieval, the content in the retrieval condition may be set based on specific retrieval requirements. Illustratively, the content in the search condition may include one or more of the following: test time, case label and step number, simulation tool name. The test time may be a time point or a time period.
When the search condition is acquired, in order to smoothly perform the search, it is necessary to verify the validity of the search condition. And searching according to the searching condition after the searching condition is verified to be legal. And if the search condition is verified to be improper, the search is refused and a prompt is sent. The verification method of the retrieval condition comprises the following steps: if the search condition includes the test time, it needs to verify whether the format of the test time is legal. If the search condition includes a use case tag, it is necessary to verify whether the format of the use case tag is legal. If the search condition includes a step number, it is necessary to verify whether the format of the step number is legal. If the search condition includes the name of the simulation tool, it is necessary to verify whether the simulation tool corresponding to the name exists, if so, the simulation tool is legal, and if not, the simulation tool is illegal.
Illustratively, two retrieval boxes are arranged on the interactive interface, wherein one input box is used for inputting test time, and the other input box is used for inputting a test case label and/or a step number. A log retrieval button is also arranged in the interactive interface. For example, when one input box inputs test start time a and the other input box inputs use case label a, when the log retrieval button is triggered, it is first verified whether the formats of test start time a and use case label a are legal, if both the verifications are legal, it is started to retrieve the test log corresponding to test start time a and use case label a, and then the retrieval result is displayed on the interface. The display of the search result includes the following two types: one is to search for a test log corresponding to the test start time a and the use case label a, and output a storage path of the corresponding test log. If the test log corresponding to the test starting time A and the case label A is not searched, outputting a prompt without the corresponding test log.
217. And searching the test log according to the content carried by the search condition, and ending the current process.
If the retrieval condition is verified to be legal, the test log is retrieved according to the content carried by the retrieval condition.
And when the test log corresponding to the retrieval condition is retrieved, outputting a storage path of the corresponding test log for a tester to extract the test log.
And when the test log corresponding to the retrieval condition is not retrieved, outputting a prompt without the corresponding test log.
218. And prompting that the retrieval condition is wrong.
If the search condition is verified to be illegal, the search condition is abnormal, and the search condition is prompted to be wrong, so that a tester can check the search condition.
Further, according to the above method embodiment, another embodiment of the present invention further provides a test log generating apparatus for a railway signal system, as shown in fig. 3, the apparatus includes:
the determining unit 31 is configured to determine a case tag and a step number corresponding to a test case of a railway signal system, where the step number is a number corresponding to a step in the railway signal system related to the test case;
an execution unit 32, configured to execute the test case using a target simulation tool;
a recording unit 33, configured to record a target time involved when the target simulation tool executes the test case;
a naming unit 34, configured to name a test log of the target simulation tool for executing the test case based on the case tag, the step number, and the name of the target simulation tool, where the test log is a test log related to the target time;
and the filing unit 35 is used for filing the named test logs into the target folder under the designated filing path.
According to the test log generation device for the railway signal system, when a test case of the railway signal system needs to be tested, a case label and a step number corresponding to the test case are determined, and the test case is executed by using a target simulation tool. And recording the target time involved when the target simulation tool executes the test case. And naming a test log which is formed when the target simulation tool executes the test case and is related to the target time based on the case label, the step number and the name of the target simulation tool. And finally, filing the named test log into a target folder under a specified filing path. Therefore, the scheme provided by the embodiment of the invention names the test logs through the simulation tool name, the case label and the step number, so that the test content corresponding to each test log is more definite. And the test log is filed in a target folder under the appointed filing path, so that the log storage is more organized. Therefore, the efficiency of arranging the test logs can be improved, in addition, the correctness of the test result is analyzed through the test logs subsequently, and when the test logs are used as the evidence of the test conclusion to be tracked and consulted, the required test logs can be found quickly.
Optionally, as shown in fig. 4, the determining unit 31 includes:
the first copying module 311 is configured to copy the test case to form a copy of the test case;
a first processing module 312, configured to perform removal processing on the copy;
an extracting module 313, configured to extract the use case tag from the copy after the removal processing based on a preset use case tag format, and extract the step number from the copy after the removal processing;
the determining module 314 is configured to determine the extracted use case label and the step number as the use case label and the step number corresponding to the test case.
Optionally, as shown in fig. 4, the determining module 314 is specifically configured to display the extracted case labels and step numbers in units of test cases; and determining the selected case label and the step number as the case label and the step number corresponding to the test case.
Optionally, as shown in fig. 4, the first processing module 312 is specifically configured to clear the document format and/or revision record in the copy.
Optionally, as shown in fig. 4, the executing unit 32 includes:
a second copying module 321, configured to copy the test case to form a copy of the test case;
a second processing module 322, configured to perform removal processing on the copy;
an execution module 323 configured to execute the copy using the target simulation tool.
Optionally, as shown in fig. 4, the second processing module 322 is specifically configured to clear the document format and/or revision record in the copy.
Optionally, as shown in fig. 4, the recording unit 33 is specifically configured to show a plurality of target time items, where one target time item corresponds to one target time involved in the execution of the test case by the simulation tool; recording target time corresponding to the selected target time item when the target simulation tool executes the test case;
optionally, as shown in fig. 4, the naming unit 34 is specifically configured to name the test log according to a preset naming format by using the use case tag, the step number, and the name of the target simulation tool, where the naming format defines a position of the use case tag, the step number, and the name of the target simulation tool in the name of the test log.
Optionally, as shown in fig. 4, the apparatus further includes:
a retrieving unit 36, configured to, if a retrieving condition is obtained, detect whether a format of content carried by the retrieving condition is legal; if the test log is legal, searching the test log according to the content carried by the searching condition, wherein the content carried by the searching condition comprises at least one of the following contents: time, use case label, step number and simulation tool name;
optionally, as shown in fig. 4, the execution unit 32 is further configured to display names of a plurality of simulation tools; and determining the simulation tool corresponding to the selected name as the target simulation tool.
Optionally, as shown in fig. 4, the target folder referred to by the filing unit 35 is named based on one or more of the use case label, the step number, the name of the target simulation tool, and the target time.
In the test log generating device for a railway signal system provided in the embodiment of the present invention, for details of methods used in the operation process of each functional module, reference may be made to the corresponding methods in the embodiments of the methods in fig. 1 to fig. 2, and details are not described here again.
Further, according to the above embodiment, another embodiment of the present invention also provides a computer-readable storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the test log generation method for a railway signal system described in fig. 1-2.
Further, according to the above embodiment, another embodiment of the present invention provides a storage management apparatus, including:
a memory for storing a program;
a processor, coupled to the memory, for executing the program to perform the test log generation method for a railway signal system described in fig. 1-2.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any target computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Furthermore, the present invention is not directed to any target programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and the above description of target languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method, apparatus and framework for operation of a deep neural network model in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (10)

1. A method of test log generation for a railway signal system, the method comprising:
determining a case label and a step number corresponding to a test case of a railway signal system, wherein the step number is a number corresponding to a step in the railway signal system related to the test case;
executing the test case by using a target simulation tool;
recording target time involved when the target simulation tool executes the test case;
naming a test log of the target simulation tool for executing the test case based on the case label, the step number and the name of the target simulation tool, wherein the test log is a test log related to the target time;
filing the named test log into a target folder under a specified filing path;
recording the target time involved when the target simulation tool executes the test case, wherein the recording comprises the following steps:
displaying a plurality of target time items, wherein one target time item corresponds to one target time involved when the simulation tool executes the test case;
and recording the target time corresponding to the selected target time item when the target simulation tool executes the test case.
2. The method of claim 1, wherein determining a case label and a step number corresponding to a test case of the railway signal system comprises:
copying the test case to form a copy of the test case;
removing the copy;
extracting the use case label from the removed copy based on a preset use case label format, and extracting the step number from the removed copy;
and determining the extracted case label and the step number as the case label and the step number corresponding to the test case.
3. The method according to claim 2, wherein determining the extracted use case label and step number as the use case label and step number corresponding to the test case comprises:
displaying the extracted case labels and step numbers by taking the test cases as units;
and determining the selected case label and the step number as the case label and the step number corresponding to the test case.
4. The method of claim 1, wherein executing the test case using a target simulation tool comprises:
copying the test case to form a copy of the test case;
removing the copy;
executing the copy using the target simulation tool.
5. The method of claim 2 or 4, wherein performing a clean-up process on the copy comprises:
clearing the document format and/or revision record in the copy.
6. The method according to any of claims 1-4, wherein naming the test log of the test case executed by the target simulation tool based on the use case tag, the step number, and the name of the target simulation tool comprises:
naming the test log by using the use case label, the step number and the name of the target simulation tool according to a preset naming format, wherein the naming format defines the positions of the use case label, the step number and the name of the target simulation tool in the name of the test log;
and/or the presence of a gas in the gas,
the target folder is named based on one or more of the use case label, the step number, the name of the target simulation tool, and the target time.
7. The method according to any one of claims 1-4, further comprising:
if the retrieval condition is obtained, detecting whether the format of the content carried by the retrieval condition is legal or not;
if the test log is legal, searching the test log according to the content carried by the searching condition, wherein the content carried by the searching condition comprises at least one of the following contents: time, use case label, step number and simulation tool name;
and/or the presence of a gas in the gas,
the method further comprises the following steps:
displaying names of a plurality of simulation tools;
and determining the simulation tool corresponding to the selected name as the target simulation tool.
8. A test log generation apparatus for a railway signal system, the apparatus comprising:
the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a case label and a step number corresponding to a test case of the railway signal system, and the step number is a number corresponding to a step in the railway signal system related to the test case;
the execution unit is used for executing the test case by using a target simulation tool;
the recording unit is used for recording the target time involved when the target simulation tool executes the test case;
the naming unit is used for naming the test log of the test case executed by the target simulation tool based on the case label, the step number and the name of the target simulation tool, wherein the test log is related to the target time;
the filing unit is used for filing the named test logs into a target folder under a specified filing path;
the recording unit is specifically configured to display a plurality of target time items, where one target time item corresponds to one target time involved in the execution of the test case by the simulation tool; and recording the target time corresponding to the selected target time item when the target simulation tool executes the test case.
9. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, the apparatus on which the storage medium is controlled to execute the test log generation method for a railway signal system according to any one of claims 1 to 7.
10. A storage management apparatus, characterized in that the storage management apparatus comprises:
a memory for storing a program;
a processor, coupled to the memory, for executing the program to perform the method of test log generation for a railway signal system of any one of claims 1 to 7.
CN202111052640.3A 2021-09-09 2021-09-09 Test log generation method and device for railway signal system Active CN113501034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111052640.3A CN113501034B (en) 2021-09-09 2021-09-09 Test log generation method and device for railway signal system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111052640.3A CN113501034B (en) 2021-09-09 2021-09-09 Test log generation method and device for railway signal system

Publications (2)

Publication Number Publication Date
CN113501034A CN113501034A (en) 2021-10-15
CN113501034B true CN113501034B (en) 2021-12-24

Family

ID=78016910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111052640.3A Active CN113501034B (en) 2021-09-09 2021-09-09 Test log generation method and device for railway signal system

Country Status (1)

Country Link
CN (1) CN113501034B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062777A (en) * 2018-08-10 2018-12-21 湖南中车时代通信信号有限公司 A kind of track traffic signal equipment general automation test macro
CN109902009A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of method and system tested automatically under linux environment
CN111522738A (en) * 2020-03-30 2020-08-11 拉扎斯网络科技(上海)有限公司 Test method and device of micro-service system, storage medium and electronic equipment
CN112732563A (en) * 2020-12-31 2021-04-30 深圳赛安特技术服务有限公司 Interface script test log extraction method and device, terminal and storage medium
CN113268415A (en) * 2021-05-11 2021-08-17 卡斯柯信号(成都)有限公司 Interlocking rule automatic test system and method based on test case

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160357890A1 (en) * 2015-06-04 2016-12-08 Vtool Ltd. Verification Log Analysis
CN105471680A (en) * 2015-12-09 2016-04-06 上海斐讯数据通信技术有限公司 Network voice communication testing system and method
CN107870849B (en) * 2016-09-28 2021-03-09 平安科技(深圳)有限公司 Processing method and device of test log

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062777A (en) * 2018-08-10 2018-12-21 湖南中车时代通信信号有限公司 A kind of track traffic signal equipment general automation test macro
CN109902009A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of method and system tested automatically under linux environment
CN111522738A (en) * 2020-03-30 2020-08-11 拉扎斯网络科技(上海)有限公司 Test method and device of micro-service system, storage medium and electronic equipment
CN112732563A (en) * 2020-12-31 2021-04-30 深圳赛安特技术服务有限公司 Interface script test log extraction method and device, terminal and storage medium
CN113268415A (en) * 2021-05-11 2021-08-17 卡斯柯信号(成都)有限公司 Interlocking rule automatic test system and method based on test case

Also Published As

Publication number Publication date
CN113501034A (en) 2021-10-15

Similar Documents

Publication Publication Date Title
CN112486557A (en) Development-based complete life cycle management platform and method
US10162742B2 (en) System and method for end to end performance response time measurement based on graphic recognition
CN111209206B (en) Automatic test method and system for software products
CN106227654A (en) A kind of test platform
CN111198811A (en) Page automatic test method and device, electronic equipment and storage medium
CN111797006A (en) Method, device and equipment for testing thread and storage medium
JP2000112784A (en) Program test support device and storage medium recording program test support program
CN110737573B (en) Method and device for automatically testing user interface UI
CN113501034B (en) Test log generation method and device for railway signal system
CN110008074B (en) Method, device and equipment for automatically testing and inquiring upper-layer interface of hardware information
JP2007193504A (en) Test case preparation method, test case preparation system and test case preparation program
JP2006309576A (en) Verification device and verification method for logic system, and storage medium and computer program
JP2001273169A (en) Device for generating program test specification
CN110674038A (en) Method and device for classifying error information in software test
CN109857583A (en) A kind of processing method and processing device
CN111008140B (en) Cross-platform UI (user interface) automatic testing method and device
CN112612702A (en) Automatic testing method and device based on web
CN112035308A (en) Method and device for generating system interface test table
JP6897580B2 (en) Separation work identification device, separation work identification method and program
JP2001184232A (en) Software test case evaluating device, and software failure tree device and software hazard device, and software behavior describing device
US8141039B2 (en) Method and system for consolidating machine readable code
JP2020140282A (en) Module acquisition method and module acquisition device
CN109460336A (en) A kind of method and system of batch validation hard disk DST function
CN113886337B (en) Method and system for automatically checking change request records
JP6072547B2 (en) Application test system

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
GR01 Patent grant
GR01 Patent grant