Method and device for generating train number validity test case of vehicle-mounted system

By determining the number of train numbers and character selection rules in the on-board system, and generating test cases for train numbers validity are solved, the problems of low test efficiency and incomplete test combinations in the existing technology are solved, and a more efficient testing process is achieved.

CN119705543AActive Publication Date: 2025-03-28CASCO SIGNAL LTD

Patent Information

Application Number
CN202411860525.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-28
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In the prior art, the test efficiency of the number of train numbers is low and the test combination is incomplete, resulting in a long and low efficiency of the number of train numbers in the on-board system.

Method used

By determining the number of digits of the vehicle-mounted system, and determining the character selection of each digit according to the arrangement type of characters corresponding to each digit and the valid rules and requirements of the vehicle-mounted system, several test cases where the vehicle-mounted system is valid.

Benefits of technology

While ensuring the integrity and correctness of the test, the number of test cases has been greatly reduced, the testing efficiency and quality of on-board vehicle number validity tests has been improved, and the testing efficiency has been improved by about 86%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119705543A_ABST
    Figure CN119705543A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for generating a validity test case of a train number of a vehicle-mounted system. The generation method comprises the following steps: determining the number of bits of the train number of the vehicle-mounted system; determining the character selection of each digit according to the arrangement type of the character corresponding to each digit and the rule requirement that the train number is valid; if the arrangement type of the characters corresponding to the digits is an enumeration type, selecting each character corresponding to the digits one by one as a test case value of the digits; if the arrangement type of the character corresponding to the digit is a continuous type, selecting a boundary value and an equivalence class value of the character corresponding to the digit as a test case value of the digit based on the boundary value and the equivalence class; and combining the test case value corresponding to each digit according to a digit sequence to form a plurality of test cases with effective vehicle numbers of the vehicle-mounted system. According to the invention, the number of test cases is greatly reduced, and the train number validity test efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of rail transportation, and in particular relates to a method and device for generating a test case for the validity of a train number of an on-board system. Background Art

[0002] At present, the validity test of the train number based on the city-wide vehicle-mounted system is mainly based on the train number table provided by each project for one-by-one testing. The train number table lists all valid train numbers according to the city-wide train number rules, so that the number of train numbers is very large. At the same time, since the train number in the prior art needs to be manually input one by one in the DMI (vehicle-driver interaction interface), and because the composition of the train number is largely a combination of letters and numbers, the switching operation of the letter and number keys is required when inputting the train number on the DMI, so it takes longer time to complete all the train number tests, and the efficiency is very low.

[0003] Furthermore, the train number lists provided by various projects currently do not list invalid train numbers, and in order to reflect the combination of numbers in the digital area, the existing train number testing efficiency is low and the test combination is incomplete. Summary of the invention

[0004] The purpose of the present invention is to solve the above-mentioned problem and to provide a method and device for generating test cases for the validity of the train number of an on-board system, so as to greatly reduce the number of test cases while ensuring the integrity and correctness of the test according to the rules for the validity and invalidity of the train number, thereby improving the test efficiency and quality of the on-board train number validity test.

[0005] To achieve the above-mentioned purpose, the present invention provides a method for generating a test case for the validity of a train number of an on-board system, which comprises: determining the number of digits of the train number of the on-board system; determining the character selection for each digit according to the arrangement type of the characters corresponding to each digit and the rule requirements for the validity of the train number; if the arrangement type of the characters corresponding to the number of digits is an enumeration type, selecting each character corresponding to the number of digits one by one as the test case value for the number of digits; if the arrangement type of the characters corresponding to the number of digits is a continuous type, selecting the boundary value and equivalence class value of the characters corresponding to the number of digits as the test case value for the number of digits based on the boundary value and the equivalence class; combining the test case values ​​corresponding to each digit in the order of the number of digits to form a number of test cases for which the train number of the on-board system is valid.

[0006] Optionally, the number of digits of the vehicle system train number includes the first to eighth digits or the first to ninth digits.

[0007] Optionally, the rule requirements for the validity of the train number include a first rule requirement, a second rule requirement and a third rule requirement, the first rule requirement is applicable to the 9-digit onboard system train number, and the second rule requirement and the third rule requirement are applicable to the 8-digit onboard system train number.

[0008] Optionally, the first rule requirements include: the first digit is fixed to the first number; the second digit is fixed to the first letter; the third digit is fixed to any letter in the first letter set; the fourth digit is any letter in the second letter set or any number in the first number set; and the fifth to ninth digits are fixed to numbers.

[0009] Optionally, the second rule requirements include: the first digit is fixed to the first letter; the second digit is fixed to any letter in the first letter set; the third digit is any letter in the second letter set; and the fourth to eighth digits are fixed to any number in the first number set.

[0010] Optionally, the third rule requirements include: the first digit is fixed to be the first letter; the second digit is fixed to be any letter in the first letter set; and the third to eighth digits are fixed to be any number in the first number set.

[0011] Optionally, the first letter is the Arabic numeral 0; the first letter is S; the first letter set is {A, B, C, D, E, F, M, X, L, W, T, Y, J}; the second letter set is {AZ}; and the first number set is {0-9}.

[0012] Optionally, the generation method also includes: determining the character selection for each digit according to the rule requirements for invalid train numbers, forming several test cases in which the train numbers of the on-board system are invalid; wherein the rule requirements for invalid train numbers include the fourth rule requirements, the fifth rule requirements and the sixth rule requirements.

[0013] Optionally, the fourth rule requirement is applicable to a 9-digit on-board system train number, and the fourth rule requirement includes: the first digit is not the first digit and meets the rule requirements of the second to ninth digits in the first rule requirement; or the first digit is the first digit, the second digit is not the first letter, and meets the rule requirements of the third to ninth digits in the first rule requirement; or the first digit is the first digit, the second digit is the first letter, and the third digit is a letter in the non-first letter set, and meets the rule requirements of the fourth to ninth digits in the first rule requirement; or the first digit is the first digit, the second digit is the first letter, the third digit is any letter in the first letter set, the fourth digit is any letter in the second letter set, and the fifth to ninth digits are non-digits; or the first digit is the first digit, the second digit is the first letter, the third digit is a letter in the first letter set, the fourth digit is any digit in the first digit set, and the fifth to ninth digits are non-digits.

[0014] Optionally, the fifth rule requirement applies to the 8-digit on-board system train number, and the fifth rule requirement includes: the first digit is not the first letter, and the rule requirements of the second to eighth digits in the second rule requirement are met; or the first digit is the first letter, the second digit is a letter in a non-first letter set, and the rule requirements of the third to eighth digits in the second rule requirement are met; or the first digit is the first letter, the second digit is any letter in the first letter set, the third digit is a number, and the fourth to eighth digits are any numbers in the first number set; or the first digit is the first letter, the second digit is any letter in the first letter set, the third digit is any letter in the second letter set, and the fourth to eighth digits are not all numbers.

[0015] Optionally, the sixth rule requirement applies to the 8-digit on-board system train number, and the sixth rule requirement includes: the first digit is not the first letter, and the rule requirements of the second to eighth digits in the third rule requirement are met; or the first digit is the first letter, the second digit is a letter in a non-first letter set, and the rule requirements of the third to eighth digits in the third rule requirement are met; or the first digit is the first letter, the second digit is any letter in the first letter set, and the third to eighth digits are not all numbers; or the first digit is the first letter, the second digit is any letter in the first letter set, and the third to eighth digits are empty.

[0016] Optionally, the first letter is the Arabic numeral 0; the first letter is S; the first letter set is {A, B, C, D, E, F, M, X, L, W, T, Y, J}; the second letter set is {AZ}; and the first number set is {0-9}.

[0017] Optionally, the method for generating the validity of the vehicle system train number is applicable to the urban vehicle train number.

[0018] The present invention also provides a device for generating a test case for the validity of a vehicle-mounted system train number, which comprises: a digit confirmation module, used for determining the digits of the vehicle-mounted system train number; a character selection module, used for determining the character selection for each digit according to the arrangement type of the character corresponding to each digit and the rule requirements for the validity of the train number; wherein, if the arrangement type of the character corresponding to the digit is an enumeration type, each character corresponding to the digit is selected one by one as the test case value of the digit; if the arrangement type of the character corresponding to the digit is a continuous type, based on the boundary value and the equivalence class, the boundary value and the equivalence class value of the character corresponding to the digit are selected as the test case value of the digit; and a test case generation module, used for combining the test case values ​​corresponding to each digit in the order of the digits to form a plurality of test cases for which the vehicle-mounted system train number is valid.

[0019] Optionally, the character selection module is further used to determine the character selection for each digit according to the rule requirements for invalid train numbers, so as to form several test cases in which the train numbers of the on-board system are invalid.

[0020] Compared with the prior art, the method and device for generating a test case for the validity of the train number of the vehicle system provided by the present invention determines the character selection for each digit by limiting the valid rule requirements and invalid rule requirements for each digit of the train number of the test case. Only 129 test cases for the validity of the train number are required to be generated. Under the premise of ensuring the integrity and correctness of the test, the number of test cases is greatly reduced compared with the number of test cases in the prior art (936), and the test efficiency is greatly improved. Compared with the existing test method, the test efficiency of the validity test of the vehicle-mounted train number is improved by about 86%. At the same time, the generation method provided by the present invention has clear and easy-to-read entries, which can better guide the test execution of the train number of the vehicle system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic block diagram of a device for generating a test case for the validity of a train number in a vehicle-mounted system of the present invention;

[0022] Figure 2 The present invention is a test flow chart of a test case for the validity of the train number of the vehicle system generated based on the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the attached embodiment of the present invention Figure 1 ~Attached Figure 2 , the technical solutions, structural features, objectives achieved and effects in the embodiments of the present invention are described in detail.

[0024] It should be noted that the drawings are in a very simplified form and use non-precise proportions. They are only used to conveniently and clearly assist in explaining the embodiments of the present invention, and are not used to limit the conditions for the implementation of the present invention. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical content disclosed by the present invention.

[0025] It should be noted that, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only the elements explicitly listed, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0026] The number of test train numbers in the validity test of the on-board system train number in the prior art is huge, and there is a problem of test omissions. In order to reduce test cases and improve test efficiency, the present invention provides a method for generating a test case for the validity of the on-board system train number, which is applicable to the urban on-board train number, and the generation method includes: determining the number of digits of the on-board system train number; wherein the number of digits of the on-board system train number includes the first to the eighth digit or the first to the ninth digit, because when the number of characters inputted in the train number is less than 8 characters, the train number belongs to the format of the national railway train number, and does not belong to the requirements of the urban train number in the present invention.

[0027] Furthermore, the character selection for each digit is determined according to the arrangement type of the characters corresponding to each digit and the valid rules for the train number. Specifically, if the arrangement type of the characters corresponding to the digit is an enumeration type, each character corresponding to the digit is selected one by one as the test case value of the digit; if the arrangement type of the characters corresponding to the digit is a continuous type, based on the boundary value and the equivalence class, the boundary value and equivalence class value of the characters corresponding to the digit are selected as the test case value of the digit; finally, the test case values ​​corresponding to each digit are combined in the order of the digits to form several test cases for which the train number of the vehicle system is valid.

[0028] Among them, the rule requirements for the validity of the train number include the first rule requirement, the second rule requirement and the third rule requirement. The first rule requirement is applicable to the 9-digit on-board system train number, and the second rule requirement and the third rule requirement are applicable to the 8-digit on-board system train number.

[0029] Further, the first rule requirements include: the first digit is fixed to the first digit; the second digit is fixed to the first letter; the third digit is fixed to any letter in the first letter set; the fourth digit is any letter in the second letter set or any number in the first number set; and the fifth to ninth digits are fixed to numbers. Specifically, in this embodiment, the first letter is the Arabic numeral 0; the first letter is S; the first letter set is {A, B, C, D, E, F, M, X, L, W, T, Y, J}; the second letter set is {AZ}; the first number set is {0-9}.

[0030] In a specific embodiment, the test case value of the first digit of the test case is 0, and the test case value of the second digit is S. Since the character sorting type in the first letter set is an enumeration type, it is necessary to list them one by one. In this embodiment, the third digit lists the characters A, B, Y, and J as the test case values ​​of the third digit; and the character sorting types of the second letter set and the first number set are both continuous types. Therefore, considering the boundary value and the equivalence class, for the first number set, the fifth to ninth digits select 0, 1, 9 (or 1, 8, 9) as the test case values ​​of the fifth to ninth digits; for the second letter set, the fifth to ninth digits select A, B, Z (or A, Y, Z) as the test case values ​​of the fifth to ninth digits; and then according to the first rule requirements, a 9-digit vehicle system train number is formed as a valid test case, as shown in Table 1:

[0031]

[0032] Table 1. Example test cases generated according to the first rule requirements

[0033] Furthermore, the second rule requirements include: the first digit is fixed to the first letter; the second digit is fixed to any letter in the first letter set; the third digit is any letter in the second letter set; and the fourth to eighth digits are fixed to any number in the first number set. Specifically, in this embodiment, the first letter is the Arabic numeral 0; the first letter is S; the first letter set is {A, B, C, D, E, F, M, X, L, W, T, Y, J}; the second letter set is {AZ}; the first number set is {0-9}.

[0034] In a specific embodiment, the test case value of the first digit of the test case is S. Since the character sorting type in the first letter set is an enumeration type, it is necessary to list them one by one. In this embodiment, the second digit lists the characters A, B, Y, and J as the test case value of the second digit; and the character sorting types of the second letter set and the first number set are both continuous types. Therefore, considering the boundary value and the equivalence class, for the second letter set, the third digit selects A, B, Z (or A, Y, Z) as the test case value of the third digit; for the first number set, the fifth to ninth digits select 0, 1, 9 (or 1, 8, 9) as the test case values ​​of the fourth to eighth digits; and then according to the second rule requirement, an 8-digit vehicle system train number is formed as a valid test case, as shown in Table 2:

[0035]

[0036] Table 2. Example test cases generated according to the second rule requirements

[0037] Furthermore, the third rule requirement includes: the first digit is fixed to be the first letter; the second digit is fixed to be any letter in the first letter set; and the third to eighth digits are fixed to be any number in the first number set. Specifically, in this embodiment, the first letter is the Arabic numeral 0; the first letter is S; and the first number set is {0-9}.

[0038] In a specific embodiment, the test case value of the first digit of the test case is S. Since the character sorting type in the first letter set is an enumeration type, it is necessary to list them one by one. In this embodiment, the second digit lists characters A, B, Y, and J as the test case values ​​of the second digit; and the character sorting type of the first digital set is a continuous type. Therefore, considering the boundary value and the equivalence class, for the first digital set, the third to eighth digits select 0, 1, 9 (or 1, 8, 9) as the test case values ​​of the third to eighth digits; and then according to the third rule, an 8-digit vehicle system train number is formed as a valid test case, as shown in Table 3:

[0039]

[0040]

[0041] Table 3. Example test cases generated according to the third rule requirements

[0042] In order to ensure the integrity of the train number validity test, the generation method also includes: determining the character selection for each digit according to the rule requirements for invalid train number, forming several test cases in which the on-board system train number is invalid; wherein the rule requirements for invalid train number include the fourth rule requirements, the fifth rule requirements and the sixth rule requirements.

[0043] The fourth rule is applicable to the 9-digit vehicle system train number, and the fourth rule includes:

[0044] The first digit is not the first digit (i.e., a digit other than "0" or a letter), and meets the requirements of the second to ninth digits in the first rule requirement;

[0045] Or the first digit is the first number (i.e., the Arabic numeral "0"), the second digit is not the first letter (i.e., a digit or a letter other than "S"), and the requirements of the third to ninth digits in the first rule requirement are met;

[0046] Or the first digit is the first number (i.e., the Arabic numeral "0"), the second digit is the first letter (i.e., the letter "S"), the third digit is a letter in the non-first letter set (i.e., not in {A, B, C, D, E, F, M, X, L, W, T, Y, J}), and the fourth to ninth digits of the first rule requirements are met;

[0047] Or the first digit is the first number (i.e., the Arabic numeral "0"), the second digit is the first letter (i.e., the letter "S"), the third digit is any letter in the first letter set (i.e., one of {A, B, C, D, E, F, M, X, L, W, T, Y, J}), the fourth digit is any letter in the second letter set, and the fifth to ninth digits are non-digits (i.e., each digit is a letter);

[0048] Or the first digit is the first digit (that is, the Arabic numeral "0"), the second digit is the first letter (that is, the Arabic numeral "0"), the third digit is a letter in the first letter set (that is, one of {A, B, C, D, E, F, M, X, L, W, T, Y, J}), the fourth digit is any digit in the first digit set, and the fifth to ninth digits are non-digits (that is, each digit can be selected as a letter).

[0049] Based on the fourth rule above, a test case is formed where the 9-digit vehicle system train number is invalid, as shown in Table 4:

[0050] First place Second Place Third Place Fourth Place Fifth Sixth place Seventh Eighth Ninth place Expected Results 1 S A A 0 0 0 0 0 Invalid train number A S B B 1 1 1 1 1 Invalid train number 0 M A 0 0 0 0 0 0 Invalid train number 0 S 9 Z 9 9 9 9 9 Invalid train number 0 S G 0 0 0 0 0 0 Invalid train number 0 S C C A 9 9 9 9 Invalid train number 0 S D 9 1 2 3 4 Y Invalid train number

[0051] Table 4. Example test cases generated according to the fourth rule

[0052] Furthermore, the fifth rule is applicable to the 8-digit vehicle system train number, and the fifth rule includes:

[0053] The first digit is not the first letter (i.e. a number or a letter other than "S") and meets the second rule requirement for the second to eighth digits;

[0054] Or the first digit is the first letter (i.e., the letter "S"), the second digit is a letter not in the set of first letters (i.e., not in {A, B, C, D, E, F, M, X, L, W, T, Y, J}), and the rule requirements of the third to eighth digits in the second rule requirement are met;

[0055] Or the first digit is the first letter (i.e., the letter "S"), the second digit is any letter in the first letter set (i.e., one of {A, B, C, D, E, F, M, X, L, W, T, Y, J}), the third digit is a number, and the fourth to eighth digits are any numbers in the first number set;

[0056] Or the first digit is the first letter (that is, the letter "S"), the second digit is any letter in the first letter set (that is, one of {A, B, C, D, E, F, M, X, L, W, T, Y, J}), the third digit is any letter in the second letter set, and the fourth to eighth digits are not all numbers (that is, letters can be selected for each digit).

[0057] Based on the fifth rule above, an 8-digit vehicle system train number is required to be an invalid test case, as shown in Table 5:

[0058]

[0059]

[0060] Table 4. Example test cases generated according to the fifth rule

[0061] Furthermore, the sixth rule is applicable to the 8-digit vehicle system train number, and the sixth rule includes:

[0062] The first digit is not the first letter (i.e. a number or a letter other than "S"), and the requirements for the second to eighth digits in the third rule are met;

[0063] Or the first digit is the first letter (i.e., the letter "S"), the second digit is a letter not in the set of first letters (i.e., not in {A, B, C, D, E, F, M, X, L, W, T, Y, J}), and the third to eighth digits of the third rule requirement are met;

[0064] Or the first digit is the first letter (i.e., the letter "S"), the second digit is any letter in the first letter set (i.e., one of {A, B, C, D, E, F, M, X, L, W, T, Y, J}), and the third to eighth digits are not all numbers (i.e., each digit can be selected as a letter);

[0065] Or the first position is the first letter, the second position is any letter in the first letter set, and the third to eighth positions are empty (ie, do not exist).

[0066] Based on the sixth rule above, an 8-digit vehicle system train number is required to be an invalid test case, as shown in Table 6:

[0067] First place Second Place Third Place Fourth Place Fifth Sixth place Seventh Eighth Expected Results 0 A 0 0 0 0 0 0 Invalid train number D J 1 1 1 1 1 1 Invalid train number S 0 9 9 9 9 9 9 Invalid train number S Z 0 0 0 0 0 0 Invalid train number S Y A 1 1 1 1 1 Invalid train number S Y 1 1 1 1 1 Z Invalid train number

[0068] Table 6. Example test cases generated according to the requirements of the sixth rule

[0069] Another embodiment of the present invention also provides a device for generating a test case for the validity of a train number in a vehicle-mounted system, such as Figure 1 As shown, the generating device 10 includes: a digit confirmation module 11, used to determine the number of digits in the vehicle-mounted system train number; a character selection module 12, used to determine the character selection for each digit according to the arrangement type of the character corresponding to each digit and the valid rule requirements of the train number; wherein, if the arrangement type of the character corresponding to the digit is an enumeration type, each character corresponding to the digit is selected one by one as the test case value of the digit; if the arrangement type of the character corresponding to the digit is a continuous type, then based on the boundary value and the equivalence class, the boundary value and the equivalence class value of the character corresponding to the digit are selected as the test case value of the digit; a test case generating module 13, used to combine the test case values ​​corresponding to each digit in the order of the digits to form a number of test cases in which the vehicle-mounted system train number is valid.

[0070] Furthermore, the character selection module 12 is also used to determine the character selection for each digit according to the rule requirements for invalid train numbers, so as to form several test cases in which the train numbers of the vehicle-mounted system are invalid.

[0071] Regarding the specific limitations of the device for generating the validity test case of the vehicle-mounted system train number, please refer to the limitations of the method for generating the validity test case of the vehicle-mounted system train number above, which will not be repeated here. Each module in the above-mentioned device for generating the validity test case of the vehicle-mounted system train number can be fully or partially implemented by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0072] The 9-character train number generated by the present invention is a valid test case, and the validity of the on-board train number is verified by combining the on-board function, such as Figure 2 As shown, including:

[0073] Example 1: Test case where the 9-character train number is valid: 0SAA99999

[0074] S1. After the vehicle system is powered on and the brake test is performed, the tester is required to input the driver number on the DMI; after the brake test is completed and the correctness of the driver number input by the driver is verified, the train number input and verification phase (i.e. step S2) is entered;

[0075] S2. After completing the driver number input, enter the train number input interface. The tester enters the train number 0SAA99999 digit by digit through the DMI button according to the 9-character train number; if letters or numbers need to be entered during the input process, press the letter / number switch key to complete the input of letters and numbers. When the train number input is completed, press the "Confirm" button;

[0076] S3, the vehicle system determines whether the train number is valid; if the train number is valid, execute step S41; if the train number is invalid, execute step S42;

[0077] S41: The train number is valid, indicating that the verification has passed. The DMI interface jumps to the train number input interface, the train number validity verification is completed, and the vehicle selection group interface is entered;

[0078] S42: The train number is invalid, which means the verification has not passed and the system still stays at the train number input interface (unable to enter the next registration stage). The system needs to re-enter the train number to complete the validity verification.

[0079] In summary, the method and device for generating a vehicle-mounted system train number validity test case provided by the present invention determine the character selection for each digit by limiting the valid rule requirements and invalid rule requirements for the train number for each digit of the test case. Only 129 test cases for the validity of the train number need to be generated. Under the premise of ensuring the integrity and correctness of the test, the number of test cases is greatly reduced compared with the number of test cases in the prior art (936), and the test efficiency is greatly improved. Compared with the existing test method, the test efficiency of the vehicle-mounted train number validity test is improved by about 86%.

[0080] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.

Claims

1. A method for generating a test case for the validity of a train number in a vehicle-mounted system, characterized in that: include: Determine the number of digits of the train number in the onboard system; Determine the character selection for each digit according to the arrangement type of the characters corresponding to each digit and the effective rules and requirements of the train number; If the arrangement type of the characters corresponding to the digit is an enumeration type, each character corresponding to the digit is selected one by one as the test case value of the digit; If the arrangement type of the characters corresponding to the digit is a continuous type, based on the boundary value and the equivalence class, the boundary value and the equivalence class value of the characters corresponding to the digit are selected as the test case value of the digit; Combine the test case values ​​corresponding to each digit in the order of the digits to form several valid test cases for the vehicle system train numbers.

2. The generation method according to claim 1, characterized in that: The number of digits of the vehicle system train number includes the first to the eighth digits or the first to the ninth digits.

3. The generation method according to claim 2, characterized in that: The valid rule requirements for the train number include a first rule requirement, a second rule requirement and a third rule requirement. The first rule requirement is applicable to the 9-digit on-board system train number, and the second rule requirement and the third rule requirement are applicable to the 8-digit on-board system train number.

4. The generation method according to claim 3, characterized in that: The first rule requirements include: the first digit is fixed to the first number; the second digit is fixed to the first letter; the third digit is fixed to any letter in the first letter set; the fourth digit is any letter in the second letter set or any number in the first number set; and the fifth to ninth digits are fixed to numbers.

5. The generation method according to claim 3, characterized in that: The second rule requirements include: the first digit is fixed to the first letter; the second digit is fixed to any letter in the first letter set; the third digit is any letter in the second letter set; and the fourth to eighth digits are fixed to any number in the first number set.

6. The generation method according to claim 3, characterized in that: The third rule requirements include: the first digit is fixed to be the first letter; the second digit is fixed to be any letter in the first letter set; and the third to eighth digits are fixed to be any number in the first number set.

7. The generation method according to claim 4, 5 or 6, characterized in that: The first letter is the Arabic numeral 0; the first letter is S; the first letter set is {A, B, C, D, E, F, M, X, L, W, T, Y, J}; the second letter set is {AZ}; the first number set is {0-9}.

8. The generation method according to claim 3, characterized in that: Also includes: According to the rule requirements for invalid train numbers, the character selection for each digit is determined to form several test cases in which the train numbers of the on-board system are invalid; wherein the rule requirements for invalid train numbers include the fourth rule requirements, the fifth rule requirements and the sixth rule requirements.

9. The generation method according to claim 8, characterized in that: The fourth rule is applicable to the 9-digit vehicle system train number, and the fourth rule includes: The first digit is not the first digit, and satisfies the rule requirements of the second to ninth digits in the first rule requirements; Or the first digit is the first number, the second digit is not the first letter, and the rule requirements of the third to ninth digits in the first rule requirements are met; Or the first digit is the first number, the second digit is the first letter, the third digit is a letter in the set other than the first letter, and the rule requirements of the fourth to ninth digits in the first rule requirements are met; Or the first digit is the first number, the second digit is the first letter, the third digit is any letter in the first letter set, the fourth digit is any letter in the second letter set, and the fifth to ninth digits are non-digits; Or the first digit is the first number, the second digit is the first letter, the third digit is a letter in the first letter set, the fourth digit is any digit in the first number set, and the fifth to ninth digits are non-digits.

10. The generation method according to claim 8, characterized in that: The fifth rule is applicable to the 8-digit vehicle system train number, and the fifth rule includes: The first digit is not the first letter, and the second rule requirement from the second digit to the eighth digit is met; Or the first digit is the first letter, the second digit is a letter in the set of non-first letters, and the rule requirements of the third to eighth digits in the second rule requirement are met; or the first digit is the first letter, the second digit is any letter in the first letter set, the third digit is a number, and the fourth to eighth digits are any numbers in the first number set; Or the first digit is the first letter, the second digit is any letter in the first letter set, the third digit is any letter in the second letter set, and the fourth to eighth digits are not all numbers.

11. The generation method according to claim 8, characterized in that: The sixth rule is applicable to the 8-digit vehicle system train number, and the sixth rule includes: The first digit is not the first letter, and the second to eighth digits of the third rule are met; Or the first digit is the first letter, the second digit is a letter in the set of non-first letters, and the third to eighth digits of the third rule requirement are met; or the first digit is the first letter, the second digit is any letter in the set of first letters, and the third to eighth digits are not all numbers; Or the first digit is the first letter, the second digit is any letter in the set of the first letters, and the third to eighth digits are empty.

12. The generation method according to claim 9, 10 or 11, characterized in that: The first letter is the Arabic numeral 0; the first letter is S; the first letter set is {A, B, C, D, E, F, M, X, L, W, T, Y, J}; the second letter set is {AZ}; the first number set is {0-9}.

13. The generation method according to claim 1, characterized in that: The method for generating the validity of the vehicle system train number is applicable to the urban vehicle train number.

14. A device for generating a test case for the validity of a train number in a vehicle-mounted system, characterized in that: include: A digit confirmation module is used to determine the number of digits of the train number in the on-board system; The character selection module is used to determine the character selection for each digit according to the arrangement type of the characters corresponding to each digit and the effective rule requirements of the train number; wherein, if the arrangement type of the characters corresponding to the digit is an enumeration type, each character corresponding to the digit is selected one by one as the test case value of the digit; if the arrangement type of the characters corresponding to the digit is a continuous type, based on the boundary value and the equivalence class, the boundary value and the equivalence class value of the characters corresponding to the digit are selected as the test case value of the digit; The test case generation module is used to combine the test case values ​​corresponding to each digit in the order of digits to form several valid test cases for the vehicle system train numbers.

15. The generating device according to claim 14, characterized in that The character selection module is also used to determine the character selection for each digit according to the rule requirements for invalid train numbers, so as to form several test cases in which the train numbers of the on-board system are invalid.

Citation Information

Patent Citations

  • Method for automatically generating character string type test case

    CN105224455A

  • CTCS2-200C type train control on-board equipment automatic simulation test platform

    CN108227519A

  • Vehicle frame number automatic identification method

    CN112215221A

  • Comprehensive simulation verification platform for city signal system and implementation method thereof

    CN113147837A

  • Full-scene GSM-R interface server test platform system

    CN113704089A

Cited By

  • System and method for testing validity of train number of vehicle-mounted system

    CN119717764A