Method for automatically counting test workload of track signal system

Through the method of automatically reading and calculating test reports, the problem of manual statistics taking time and error prone in the existing technology is solved, and the rapid and accurate test workload statistics of the track signal system is achieved, which improves statistical efficiency and accuracy.

CN119149897APending Publication Date: 2024-12-17浙江众合科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411040184.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The statistical work of the existing track signal system test workload relies on manual acquisition of test reports from SVN, which is time-consuming and easy to miss and calculate errors, resulting in a deviation from the actual workload.

Method used

Read configuration files and statistical cycles through automated methods, read configuration items lists, read the number and time of test reports one by one, calculate the test cycle, and store the results in the dictionary, and finally output the statistical results in the form of an EXCEL table, simplifying and Accelerate the workload statistics process.

Benefits of technology

It realizes the workload of automated statistical track signal system testing, saves manpower and time, improves statistical efficiency, reduces manual errors, and ensures the accuracy and consistency of statistical results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149897A_ABST
    Figure CN119149897A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically counting the test workload of a track signal system, which overcomes the defects in the prior art and comprises the following steps of: 1, reading a configuration file; step 2, reading a statistical period of the workload; 3, reading the content of the configuration item list; 4, judging whether the content of the configuration item list is completely read or not; step 5, reading the serial number in the test report and the name of the test report; step 6, searching the SVN path from the configuration file read in the step 1 according to the name of the test report; step 7, reading the time when the test report is uploaded to the SVN from the SVN path; 8, reading the test starting time and the test deadline of the test report, and calculating a test period; step 9, storing the test report name in the step 5 and the test period in the step 8 into a dictionary; step 10, judging whether all the test reports in one project are read or not; and step 11, reading the test report name and the test period from the dictionary, and counting the workload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of track signal system testing, and in particular to a method for automatically counting the testing workload of a track signal system. Background Art

[0002] The existing statistics of rail signal system test workload are manually obtained from SVN (Subversion, an open source version control system) to obtain multiple versions of test reports of all projects, then open the test reports one by one to obtain the test start and end time, manually calculate the test time, and finally accumulate all the test time to the final test time. Due to the large number of projects and versions, there are many test report documents. Manually opening the test reports one by one to obtain the test time is time-consuming and prone to omissions and calculation errors. The final statistical workload deviates from the actual workload. Summary of the invention

[0003] The purpose of the present invention is to provide a method for automatically counting the test workload of a track signal system to overcome the shortcomings of the prior art that the statistical work of the test workload of a track signal system is performed by manually obtaining a test report from an SVN, which is time-consuming and prone to omissions and calculation errors, and the final statistical workload deviates from the actual workload.

[0004] The purpose of the present invention is achieved through the following technical solutions: A method for automatically counting the test workload of a track signal system comprises the following steps: Step 1, read the configuration file; Step 2, read the statistical period of workload; Step 3, read the contents of the configuration item list, which includes configuration information of several items, each of which contains several test reports; Step 4, determine whether all contents of the configuration item list have been read, if completed, jump to step 11, if not completed, jump to step 5; Step 5, read the test report number and test report name; Step 6, search the SVN path from the configuration file read in step 1 according to the test report name; Step 7: Read the time when the test report is uploaded to SVN from the SVN path; Step 8, read the test start and end time in the test report and calculate the test cycle; Step 9, store the test report name in step 5 and the test cycle in step 8 into the dictionary; Step 10, determine whether all test reports in a project have been read. If not, jump to step 8. If completed, jump to step 3 to find the next project. Step 11, read the test report name and test cycle from the dictionary and count the workload.

[0005] Preferably, the configuration file is in XML format, the configuration item list is in EXCEL format, and in step 11, the workload is counted and recorded in an EXCEL statistical table.

[0006] Preferably, in the configuration item list, each row stores configuration information of one item.

[0007] Preferably, the cells occupied by the numbers and names of the test report are highlighted with colors; and a verification step is added between step 4 and step 5 to determine whether the contents of the read configuration item list are highlighted with colors. If so, jump to step 5; otherwise, jump to step 3.

[0008] Preferably, in step 7, it is also determined whether the time is within the statistical period of step 2. If so, jump to step 8. If not, re-execute step 6 to read the time of other upload SVNs of the test report.

[0009] Preferably, in step 10, the basis for determining whether all test reports in a project have been read is to first read the total number of test reports. When the number of test reports read is equal to the total number of test reports, the reading is determined to be completed, otherwise it is incomplete.

[0010] Preferably, the method for automatically counting the test workload of the rail signal system further includes a user side configuration process, specifically: a user configures a configuration file, the configuration file includes a test report name and an SVN storage path, and the test report name and the SVN storage path correspond one to one; The cells occupied by the test report numbers and names in the test reports to be counted in the configuration item list are highlighted in color.

[0011] Preferably, the method for automatically counting the test workload of the rail signal system further includes a user-side use process, specifically: The user selects the statistical period, i.e. the start and end time of workload calculation; The user clicks the Start Statistics button to automatically count the workload, and the statistical results are saved in the same path as the configuration item list in the form of an EXCEL statistical table.

[0012] The beneficial effects of the present invention are as follows: the present invention automatically obtains the corresponding project test report within the corresponding time from the SAN, automatically reads the start and end time of the test project in the test report, automatically calculates the test cycle, and finally outputs a statistical table in the form of EXCEL. The statistical table counts the test time according to the project, and finally summarizes the test time of all projects. The user can count the test workload within a certain period according to this table. The present invention saves manpower and does not require the person in charge of each project to manually count the workload; it saves time, can quickly count the workload of different projects or all projects, and improves statistical efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 is a flow chart of the present invention; Figure 2 It is a flow chart of the user operation part of the present invention. DETAILED DESCRIPTION

[0014] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0015] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0016] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0017] A method for automatically counting the test workload of a track signal system, such as Figure 1 As shown, the following steps are included: Step 1, read the configuration file, which is a custom file configured by the user; Step 2: Read the workload statistical period, which is set by the user. Step 3, read the contents of the configuration item list, which includes configuration information of several items, each of which contains several test reports; Step 4, determine whether all contents of the configuration item list have been read, if completed, jump to step 11, if not completed, jump to step 5; Step 5, read the test report number and test report name; Step 6, search the SVN path from the configuration file read in step 1 according to the test report name; Step 7: Read the time when the test report is uploaded to SVN from the SVN path; Step 8, read the test start and end time in the test report and calculate the test cycle; Step 9, store the test report name in step 5 and the test cycle in step 8 into the dictionary; Step 10, determine whether all test reports in a project have been read. If not, jump to step 8. If completed, jump to step 3 to find the next project. Step 11, read the test report name and test cycle from the dictionary and count the workload.

[0018] This method exists in the form of a tool. This tool is divided into two parts: development and use. The development process is as follows: Figure 1 As shown, the development language is C#, and the interface is presented to the user. The user usage process is as follows Figure 2 .

[0019] The configuration file is in XML format, the configuration item list is in EXCEL format, and in step 11, the workload is counted and recorded in an EXCEL statistical table. In the configuration item list, each row stores the configuration information of one project.

[0020] The cells occupied by the number and name of the test report are highlighted with colors; an inspection step is added between step 4 and step 5 to determine whether the content of the read configuration item list is highlighted with colors. If so, jump to step 5, otherwise jump to step 3.

[0021] In this embodiment, the color highlighting can be yellow, or red, purple or other colors. Since the background color of a general table is white and the color of the text is black, a color that is clearly distinguishable from white, black, etc. can be selected.

[0022] In step 7, it is also determined whether the time is within the statistical period of step 2. If so, jump to step 8. If not, re-execute step 6 to read other upload SVN times of the test report.

[0023] In this embodiment, considering that there may be multiple versions of test reports due to different versions and the time of different versions of test reports is also different, only the test reports within the statistical period need to be considered, and the test reports outside the statistical period are discarded.

[0024] In step 10, the basis for judging whether all the test reports in a project have been read is to first read the total number of test reports. When the number of test reports read is equal to the total number of test reports, the reading is judged to be completed, otherwise it is incomplete.

[0025] The method for automatically counting the test workload of the rail signal system also includes a user side configuration process and a user side use process such as Figure 2 As shown in the figure, the user-side configuration process is as follows: The user configures a configuration file, which includes the test report name and SVN storage path. The test report name and SVN storage path correspond one to one; The cells occupied by the test report numbers and names in the test reports to be counted in the configuration item list are highlighted in color.

[0026] The user-side usage process is as follows: The user selects the statistical period, i.e. the start and end time of workload calculation; The user clicks the Start Statistics button to automatically count the workload, and the statistical results are saved in the same path as the configuration item list in the form of an EXCEL statistical table.

[0027] Specifically, the solution of this embodiment can be expressed as follows using C# as the development language: using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace TestWorkloadStatistics { Class Program { static void Main(string[]args) { / / Step 1: Read the configuration file string configFilePath="path_to_your_config_file.json"; var config=ReadConfigFile(configFilePath); / / Step 2: Read the workload statistics period DateTime startPeriod=new DateTime(2023,1,1); DateTime endPeriod=new DateTime(2023,1,31); / / Step 3: Read the contents of the configuration item list string projectsFilePath="path_to_your_projects_file.json"; var projects=ReadProjectsFile(projectsFilePath); / / Step 4-10: Process the test report for each project var testReportsDict=new Dictionary<string,string> (); foreach(var project in projects) { foreach(var reportName in project.Reports) { / / Step 5: Read the number and test report name in the test report (here we assume that the number is the name) string reportId=reportName; / / Step 6: Find the SVN path from the configuration file based on the test report name string svnPath=config[reportName]; / / Step 7: Read the time when the test report was uploaded to SVN from the SVN path DateTime uploadTime = new DateTime (2023, 1, 15); / / Assumed time / / Step 8: Read the test start and end time of the test report and calculate the test cycle DateTime startTime = new DateTime (2023, 1, 10); / / Assumed time DateTime endTime = new DateTime (2023, 1, 12); / / Assumed time string testPeriod = $"{startTime.ToShortDateString()} to {endTime.ToShortDateString()}"; / / Step 9: Store the test report name and test period in the dictionary testReportsDict[reportName]=testPeriod; } } / / Step 11: Read the test report name and test cycle from the dictionary and count the workload foreach(var kvpin testReportsDict) { Console.WriteLine($"Test report name:{kvp.Key}, test cycle:{kvp.Value}");} Console.WriteLine("Workload statistics completed."); } private static Dictionary<string,string> ReadConfigFile(stringfilePath) { return new Dictionary<string,string> { {"report1","svn: / / path / to / report1"}, {"report2","svn: / / path / to / report2"}, {"report3","svn: / / path / to / report3"} }; } private static List <project>ReadProjectsFile(string filePath) { / / Here should be the code for reading and parsing JSON files / / Assume that a list of items is returned return new List <project> { new Project { ProjectName = "Project A", Reports = new List <string>{"Report 1","Report 2"} }, New Project { ProjectName = "Project B", Reports = new List <string>{"Report 3"} } In this embodiment, the ReadConfigFile and ReadProjectsFile methods contain the actual file reading and parsing logic, and hard-coded data is used for simplicity. Similarly, the logic of reading the test report upload time from the SVN path and reading the test start and end time from the test report also needs to be implemented according to the actual situation.

[0028] In summary, the present invention automatically obtains the corresponding project test report within the corresponding time from the SAN, automatically reads the start and end time of the test project in the test report, automatically calculates the test cycle, and finally outputs a statistical table in the form of EXCEL. The statistical table counts the test time according to the project, and finally summarizes the test time of all projects. The user can count the test workload within a certain period according to this table. The present invention saves manpower and does not require the person in charge of each project to manually count the workload; it saves time, can quickly count the workload of different projects or all projects, and improves statistical efficiency.

[0029] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0030] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0031] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.< / string> < / string> < / project> < / project>

Claims

1. A method for automatically counting the test workload of a track signal system, characterized in that: The following steps are involved: Step 1, read the configuration file; Step 2, read the statistical period of workload; Step 3, read the contents of the configuration item list, which includes configuration information of several items, each of which contains several test reports; Step 4, determine whether all contents of the configuration item list have been read, if completed, jump to step 11, if not completed, jump to step 5; Step 5, read the test report number and test report name; Step 6, search the SVN path from the configuration file read in step 1 according to the test report name; Step 7: Read the time when the test report is uploaded to SVN from the SVN path; Step 8, read the test start and end time in the test report and calculate the test cycle; Step 9, store the test report name in step 5 and the test cycle in step 8 into the dictionary; Step 10, determine whether all test reports in a project have been read. If not, jump to step 8. If completed, jump to step 3 to find the next project. Step 11, read the test report name and test cycle from the dictionary and count the workload.

2. The method for automatically counting the test workload of a track signal system according to claim 1, characterized in that: The configuration file is in XML format, the configuration item list is in EXCEL format, and in step 11, the workload is counted and recorded in an EXCEL statistical table.

3. The method for automatically counting the test workload of a track signal system according to claim 2, characterized in that: In the configuration item list, each line stores the configuration information of one item.

4. The method for automatically counting the test workload of a track signal system according to claim 2, characterized in that: The cells occupied by the number and name of the test report are highlighted with colors; an inspection step is added between step 4 and step 5 to determine whether the content of the read configuration item list is highlighted with colors. If so, jump to step 5, otherwise jump to step 3.

5. The method for automatically counting the test workload of a track signal system according to claim 1, characterized in that: In step 7, it is also determined whether the time is within the statistical period of step 2. If so, jump to step 8. If not, re-execute step 6 to read other upload SVN times of the test report.

6. The method for automatically counting the test workload of a track signal system according to claim 1, characterized in that: In step 10, the basis for judging whether all the test reports in a project have been read is to first read the total number of test reports. When the number of test reports read is equal to the total number of test reports, the reading is judged to be completed, otherwise it is incomplete.

7. The method for automatically counting the test workload of a track signal system according to claim 3, characterized in that: It also includes the user-side configuration process, specifically: The user configures a configuration file, which includes the test report name and SVN storage path. The test report name and SVN storage path correspond one to one; The cells occupied by the test report numbers and names in the test reports to be counted in the configuration item list are highlighted in color.

8. The method for automatically counting the test workload of a track signal system according to claim 7, characterized in that: It also includes the user-side usage process, specifically: The user selects the statistical period, i.e. the start and end time of workload calculation; The user clicks the Start Statistics button to automatically count the workload, and the statistical results are saved in the same path as the configuration item list in the form of an EXCEL statistical table.