Software test method, software test apparatus, and software test program
The software testing method automatically corrects test patterns and re-executes tests to address defects in specifications, reducing rework and improving efficiency by saving successful patterns for future use.
Patent Information
- Application Number
- JP2024140837
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-03-06
AI Technical Summary
Existing software testing methods require significant rework when automated test results are not as expected due to defects in test specifications, leading to reduced work efficiency.
A software testing method that automatically corrects test patterns and executes retests if the test fails, saving successful patterns for future use, thereby reducing rework and improving efficiency.
Automatically correcting test patterns and re-executing tests reduces the need for rework, enhancing work efficiency by eliminating manual pattern recreation.
Smart Images

Figure 2026037669000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a software testing method, a software testing device, and a software testing program for verifying the quality of software installed in a control device for controlling an automobile or the like. [Background technology]
[0002] The driving and power control of automobiles and other vehicles is performed by electronic control units (ECUs) with installed software. However, the software installed in the ECUs must be tested during the development stage to verify its quality.
[0003] For example, when integrating multiple pieces of software, even if each piece of software has been verified individually, it is possible that problems will arise when integrating them. In other words, when test patterns are created according to test specifications and automated testing is performed, there are often cases where the specifications are inadequate and the tests do not run as expected. This results in having to go back to the stage of reconfirming the test specifications, which significantly reduces work efficiency.
[0004] To solve such problems, for example, Japanese Patent Application Laid-Open No. 2020-204847 (Patent Document 1) discloses the following: Patent Document 1 discloses that a test specification is read to automatically generate a test scenario, the test specification is corrected using error information output during scenario generation, and a test scenario is automatically generated again using the corrected test specification.
[0005] According to this method, test scenario creation for control software and software testing can be automated, reducing costs by reducing the number of testing steps and preventing testing errors. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Publication No. 2020-204847 Summary of the Invention [Problem to be solved by the invention]
[0007] However, while the technique in Patent Document 1 automatically creates test scenarios from test specifications and automatically executes tests, it does not guarantee the quality of the automatically created test scenarios, and if the automated test results are not as expected due to a defect in the test specifications, there is a problem that rework is required to reconfirm the test specifications.In other words, if the expected test results are not obtained due to a defect in the test specifications, the test scenarios must be created again, resulting in a lot of rework.
[0008] An object of the present invention is to provide a software testing method, a software testing device, and a software testing program that can reduce rework required for creating test patterns and improve work efficiency by automatically correcting test patterns and executing retests even if there are defects in the test specifications. [Means for solving the problem]
[0009] The present invention is a method for executing software testing in a test device that tests software, and is mainly characterized by the fact that the test device sequentially executes the following steps: testing the software to be tested according to a test pattern for automatic testing; determining the success or failure of the test; if the test fails, automatically correcting the test pattern for automatic testing and running the test again; if the test is successful, saving the test pattern for automatic testing as a regular test pattern for automatic testing; and testing the software again based on the saved regular test pattern for automatic testing. [Effects of the Invention]
[0010] According to the present invention, even if there is a defect in the test specification, the test pattern can be automatically corrected and a retest can be executed, thereby reducing the need for rework in creating test patterns and improving work efficiency. [Brief explanation of the drawings]
[0011] [Figure 1] FIG. 1 is a flowchart showing a control flow of a software test according to an embodiment of the present invention. [Figure 2] 1 is a block diagram showing functional blocks of a test device that tests software according to an embodiment of the present invention; [Figure 3] FIG. 2 is a flowchart showing details of steps for correcting the test pattern shown in FIG. 1. [Figure 4] FIG. 10 is an explanatory diagram for explaining details of a test pattern. [Figure 5] FIG. 10 is an explanatory diagram illustrating the relationship between the number of trials of a test pattern and timing (time) information. [Figure 6] FIG. 10 is an explanatory diagram illustrating the relationship between the number of trials of a test pattern and time width information. [Figure 7] FIG. 10 is an explanatory diagram illustrating the relationship between the number of trials of a test pattern and signal value information. [Figure 8] FIG. 1 is a flowchart showing a control flow of a conventional software test. DETAILED DESCRIPTION OF THE INVENTION
[0012] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. However, the present invention is not limited to the following embodiment, and various modifications and application examples within the technical concept of the present invention are also included within its scope.
[0013] Before describing the present invention, a conventional software testing method will be briefly described with reference to FIG.
[0014] <Step S80> In step S80, a process is executed to check the specifications of the test to be executed, such as the input signal label, input value, input timing, input time width, output expected value, etc. When the process of step S80 is completed, the process proceeds to step S81.
[0015] <Step S81> In step S81, a process is executed to create a time-series test pattern for automatic testing based on the information confirmed in step S80. Here, the test pattern for automatic testing is not a regular test pattern for automatic testing, but a default test pattern determined from the test specification. When the process of step S81 is completed, the process proceeds to step S82.
[0016] <Step S82> In step S82, the automatic test of the software is executed using the test pattern for the automatic test created in the process of step S81. When the process of step S82 is completed, the process proceeds to step S83.
[0017] <Step S83> In step S83, a process is executed to determine whether the results of the automated software test executed in step S82 are as expected. If it is determined in step S83 that the results of the automated test are as expected (OK determination), the process proceeds to step S84. On the other hand, if it is determined that the results of the automated test are not as expected (NG determination), the process returns to step S80 (where rework occurs).
[0018] <Step S84> In step S84, if the determination in step S83 is OK, the input test pattern for automatic testing is saved as a regular test pattern for automatic testing. When the saving process is completed, the process proceeds to step S85.
[0019] <Step S85> In step S85, it is determined whether or not a regression test is to be performed using the regular test pattern for automatic testing saved in step S84. If it is determined that a regression test is to be performed (YES determination), the process proceeds to step S82, where automatic testing is performed using the regular test pattern for automatic testing. On the other hand, if it is determined that a regression test is not to be performed (NO determination), the process proceeds to step S86.
[0020] The purpose of executing the regression test in step S85 is when the test specifications require that the same test be executed multiple times, or when the software to be tested is updated and a request is made to execute the same test again, etc. If these conditions are met, the process proceeds to step 86.
[0021] <Step S86> Since it is determined in step S85 that a regression test is not to be performed, in step S86 the process is completed assuming that the automatic test was successful.
[0022] In conventional software testing methods, if the result of the automatic test executed in step S82 is determined not to be as expected (NG judgment) in the judgment process of step S83, the process returns to step S80. Then, in step S80, it is necessary to check the test specifications and prepare test patterns for the automatic test again.
[0023] As described above, with conventional software testing methods, if an automated test is run using a created test pattern and the test result is judged as NG due to a defect in the test specifications, the test pattern must be recreated, which creates a problem of increasing the man-hours required to create test patterns for automated testing. [Example]
[0024] Next, an embodiment of the present invention for solving such problems will be described. This embodiment is characterized in that, when it is determined that the results of the automatic test are not as expected (NG determination), the test pattern for the automatic test is automatically corrected and then the automatic test is executed again. The concept of this embodiment will be described below using the processing flow in Figure 1.
[0025] <Step S10> In step S10, a process is executed to check the specifications of the test to be executed, such as the input signal label, input value, input timing, input time width, output expected value, etc. When the process of step S10 is completed, the process proceeds to step S11.
[0026] <Step S11> In step S11, a process for creating a time-series test pattern for automatic testing is executed based on the information confirmed in step S10. Here, the test pattern for automatic testing is not a regular test pattern for automatic testing, but a default test pattern determined from the test specification. When the process of step S11 is completed, the process proceeds to step S12. S12 <Step S12> In step S12, the automatic test of the software is executed using the test pattern for the automatic test created in the process of step S11. When the process of step S12 is completed, the process proceeds to step S13.
[0027] <Step S13> In step S13, a process is executed to determine whether the results of the software automatic test executed in step S12 are as expected. If the results of the automatic test are as expected and are determined to be a success (OK judgment) in step S13, the process proceeds to step S14. On the other hand, if the results of the automatic test are not as expected and are determined to be a failure (NG judgment), the process proceeds to step S17. The details of step S17 will be described later.
[0028] <Step S14> In step S14, if the determination in step S13 is OK, the input test pattern for the automatic test is saved as a regular test pattern for the automatic test. When the saving process is completed, the process proceeds to step S15.
[0029] <Step S15> In step S15, it is determined whether or not a regression test is to be performed using the regular test pattern for automatic testing saved in step S14. If it is determined that a regression test is to be performed (YES determination), the process proceeds to step S12, where automatic testing is performed using the regular test pattern for automatic testing. On the other hand, if it is determined that a regression test is not to be performed (NO determination), the process proceeds to step S16.
[0030] The purpose of executing the regression test in step S15 is when the test specifications require the same test to be executed multiple times, or when the software to be tested is updated and the same test needs to be executed again, etc. If these conditions are met, the process proceeds to step S16.
[0031] <Step S16> Since it is determined in step S15 that a regression test is not to be performed, in step S16 the process is completed assuming that the automatic test was successful.
[0032] <Step S17> Returning to step S13, if it is determined that the results of the automatic test are not as expected (NG judgment), the test pattern for the automatic test is corrected in step S17. Then, the process returns to step S12 and the automatic test is executed again using the corrected test pattern for the automatic test. In other words, active feedback is possible for deficiencies in the test specifications.
[0033] In this way, by performing the automatic test again in step S12 using the modified test pattern for the automatic test, it is possible to check the test specification in step S10 or recover from any deficiencies or defects in the creation of the test pattern for the automatic test in step S11.
[0034] Next, specific control function blocks that realize the above-mentioned processing flow will be described with reference to Fig. 2. Fig. 2 shows control function blocks that mainly execute steps S12, S13, S14, and S17 in Fig. 1.
[0035] The software test device 20 is a simulator device such as a Hardware In The Loop System (HILS). An electronic control unit (ECU) 21 in which the software to be tested is installed is connected to the test device 20. The test device 20 is equipped with the control function blocks described below.
[0036] 2, the test pattern input unit 22 has a function of outputting a test pattern for automatic testing (hereinafter referred to as a test pattern) created in step S11 in Fig. 1. In addition, the correction parameter assigning unit 23 connected thereto has a function of assigning correction parameters to the test pattern output from the test pattern input unit 22. The correction parameters are parameters for automatically correcting the test pattern.
[0037] The test pattern from the correction parameter assigning unit 23 is used by the test device 20 and is also supplied to the electronic control unit 21. Therefore, by comparing the output patterns of both, the software of the electronic control unit 21 can be tested.
[0038] The label conversion unit 24 connected to the correction parameter assignment unit 23 has the function of converting the signal label of the test pattern output from the correction parameter assignment unit 23 into an output RAM label linked to the signal label, and outputting the time series pattern of the output RAM label.
[0039] The expected value generation unit 25 outputs the expected output RAM value when a test is executed using a test pattern. This expected value becomes the criterion for software testing. Information from the label conversion unit 24 and the expected value generation unit 25 is provided to the calculation processing unit 26, which executes a predetermined calculation process.
[0040] That is, the arithmetic processing in the arithmetic processing unit 26 outputs an expected output RAM time series pattern value that is expected when the software test is executed, from the output RAM time series pattern output from the label conversion unit 24 and the output RAM expected value output from the expected value generation unit 25. This becomes a reference time series pattern for the software to be compared in the software test.
[0041] The transmission I / F unit 27 also has a function of transmitting the test pattern output from the correction parameter assigning unit 23 to the electronic control unit 21. Therefore, the software installed in the electronic control unit 21 is operated in accordance with this test pattern.
[0042] On the other hand, the electronic control unit 21 is equipped with the following functional blocks: The receiving I / F section 40 has the function of receiving the test pattern output from the transmitting I / F section 27 and outputting a signal of the test pattern to the software to be tested in the software to be tested section 41. The software to be tested section 41 has the function of executing software control based on the signal of the test pattern output from the receiving I / F section 40 and outputting the calculation results.
[0043] The output RAM section 42 has a function of saving the calculation results output from the software under test section 41 in RAM as output RAM actual values. In addition, the transmission I / F section 43 has a function of sending the output RAM actual values saved by the output RAM section 42 to the test device 20.
[0044] Returning to the test device 20, the receiving I / F unit 28 has the function of receiving the output RAM actual values transmitted from the transmitting I / F unit 43 and outputting the time series pattern of the output RAM actual values actually output from the electronic control unit 21 as the output RAM time series pattern actual values.
[0045] The output pattern comparison unit 29 has a function of comparing the expected value of the output RAM time series pattern output from the calculation processing unit 26 with the actual value of the output RAM time series pattern output by the receiving I / F unit 28. In addition, the output pattern comparison unit 29 has a function of incrementing (+1) an OK counter when the compared output RAM time series patterns match at each time, and incrementing (+1) an NG counter when they do not match.
[0046] In addition, the output pattern comparison unit 29 has a function of continuously updating the OK counter and the NG counter when the output RAM to be compared is under test, and outputting the count values of the OK counter and the NG counter when the test completion time of the output RAM to be compared is reached.
[0047] The test result determination unit 30 has a function of determining the test result by referring to the count values of the OK counter and the NG counter output from the output pattern comparison unit 29. The test result determination unit 30 has a function of outputting an OK determination when the counter value of the NG counter is less than a set value (threshold value).
[0048] The setting value of the NG counter is set taking into consideration the test specifications and the error of delay time that occurs due to the difference in communication path between the expected value of the output RAM time series pattern output from the calculation processing unit 26 and the actual value of the output RAM time series pattern output from the receiving I / F unit 28.
[0049] The test result judgment unit 30 can be set to a test pattern optimization mode. When the test pattern optimization mode is ON, even if the test result is judged as OK, the test pattern correction is continued until the number of retries set by the test pattern correction content selection unit 33 reaches or exceeds the set number. Furthermore, when the count value of the NG counter is equal to or greater than the set value, the test result judgment unit 30 outputs a RAM label judged as NG.
[0050] Furthermore, when executing a test on software that is different from the successful test pattern, the test result judgment unit 30 can compare the test parameters of the software when it was successful with the test parameters for the current test execution and automatically determine the difference between them. This automatically determines the difference between the test parameters of the software being tested, making it easy to determine the test parameters that need to be modified.
[0051] The test pattern storage unit 31 has a function of storing the current test pattern as a regular test pattern when the test result determination unit 30 determines that the test turn is OK.
[0052] Meanwhile, the label conversion unit 32 converts the RAM label output from the test result determination unit 30 into a signal label associated with it, and outputs the input signal label to be corrected. The test pattern correction content selection unit 33 selects the correction content of the input signal label to be corrected output from the label conversion unit 32, and outputs correction parameters. This correction parameter is fed back to the correction parameter assignment unit 23 and used to correct the test pattern.
[0053] The correction parameter assigning unit 23 then inputs the correction parameters output from the test pattern correction content selecting unit 33 and outputs the corrected test pattern again.
[0054] Furthermore, by referring to the correction parameters input to the correction parameter assigning unit 23, it is possible to automatically calculate the difference between the test parameters of the software when it was successful and the test parameters to be used to newly execute the test this time. In this way, the test pattern can be corrected and the test can be executed until the test result judgement indicates "OK" or the test pattern optimization mode is executed a set number of times and completed.
[0055] Next, the correction of the test pattern by the test pattern correction content selection unit 33, which is the main part of this embodiment, will be explained using the control flow in Fig. 3. Before explaining the control flow, the test pattern output from the correction parameter assignment unit 23 will be explained. Fig. 4 is a diagram for explaining the test pattern.
[0056] In FIG. 4, the label names of input information are set horizontally, and time information (here, time series information) is set vertically, and a time series pattern is generated according to the passage of time. The time series information includes at least information on "timing (time)" and "time width." The label names are set to indicate the type of input, such as temperature, torque, current, voltage, etc. In this way, the input information is linked to the time information.
[0057] In FIG. 4, for example, the first row, first column is the label / Time, which is information about the time of the test pattern. The further down the row you go, the more time passes. The second column of the first row to the n-th column of the first row are the labels / Signal, which are information about the signal values of the input of the test pattern. For example, these are input data names such as temperature information, torque information, etc. Therefore, input data corresponding to the passage of time is set.
[0058] Here, "tm" in the label / Time is information about the timing (time) of the test pattern, and "Δtm" is information about the duration of the test pattern.
[0059] For example, "fn(tm+Δtm)" in the bottom right label / Signal n indicates the signal value of label / Signal n at time (tm+Δtm), where Δtm is the time span mentioned above, and indicates the signal value within this time span Δtm.
[0060] In this way, by executing a predetermined test process using an input signal (parameter) at a predetermined time (time), the test can be made to pass rationally. In addition, the time information includes a time width, and by performing a predetermined process within the predetermined time width, the test can be made to pass.
[0061] Next, we will explain the control flow by returning to Figure 3. This control flow corresponds to step S17 in Figure 1, and is executed when it is determined that the results of the automatic test are not as expected (NG determination).
[0062] In the following, in order to execute the correction of the timing (time), duration, and signal value in order, a control flow is set up so that the correction of the timing (time), duration, and signal value is executed in order based on the number of trials. In other words, the correction of the timing (time) information, duration information, and signal value information is executed each time the correction of each information is completed.
[0063] <Step S30> In step S30, the calculation process of the correction parameters is started in accordance with information (input of the signal label to be corrected) from the label conversion unit 32. Thereafter, the processes from step S31 to step S41 are executed in order.
[0064] <Step S31> In step S31, the count value i of a counter that counts the number of attempts to correct the test pattern is counted up. Then, depending on the value of the count value i set in step S31, the content of the test pattern correction is selected in the subsequent control flow.
[0065] Here, the constants "a", "b", and "c" in the determination conditions of steps S32, S35, and S38 described below are the division granularity setting parameters of each correction parameter. The larger each value is, the finer the corresponding parameter can be corrected. Incidentally, these constants are determined in the relationship of "a < b < c". Also, "%" is an operator that outputs the remainder of a division. Therefore, {i%(c + 2)} in the determination condition indicates the number of the remainder when "i" is divided by "(c + 2)".
[0066] In the determination criterion of step S42, "d" is the retry count setting parameter value, indicating that the correction of the test pattern is retried only for the value of "d". "d" is determined in the relationship of "c < d". Also, {i%(c + 1)} indicates the number of the remainder when "i" is divided by "(c + 1)".
[0067] ≪Step S32≫ In step S32, it is determined whether the correction content of the test pattern is the correction of timing (time). This determination is made based on whether "{i%(c + 2)}" is less than or equal to "a". This determination is, in other words, synonymous with the determination of the number of trials. Therefore, if the current number of trials is less than the predetermined first number of trials (= a), the process proceeds to step S33, and if the current number of trials exceeds the predetermined first number of trials, the process proceeds to step S34.
[0068] ≪Step S33≫ Since it is determined as "Yes" in step S32, in step S33, the timing correction parameter is output according to the value of "i".
[0069] FIG. 5 shows the distribution of the timing correction parameters according to the value of "i". As shown in FIG. 5, the timing (time) information tm in which the timing is corrected according to the value of "i" is set. "i" is the number of trials from "0" to "a". Thus, the time information in the test pattern is associated with the number of trials of the test.
[0070] 5, "a" is the parameter division number, and the timing (time) information is calculated as "tm=tm-1+Δtm-1+i*{tm+1-(tm-1+Δtm-1)} / a." Note that when tm=t1, tm-1+Δtm-1=0.
[0071] In this way, if the executed test fails, the values of the specified parameters are automatically corrected and the test is executed again. By automatically correcting the parameters and executing the test again, the labor of correcting the parameters can be eliminated and the efficiency of the test can be improved. After the set number of trials has been executed in step S32, the process proceeds to step S34.
[0072] <Step S34> In step S34, after the number of trials set in step S32 has been performed, the timing correction parameters when the OK counter had the largest count value are output. The test pattern at this time can be used as training data. In other words, the test pattern that produced good results can be used as a reference test pattern for future use.
[0073] In this way, by selecting a better test pattern from among the successful tests, it becomes possible to execute a test with even higher accuracy. After step S34 is completed, the process proceeds to step S35.
[0074] <Step S35> In step S35, it is determined whether the modification of the test pattern is a modification of the time width. This determination is made based on whether "{i % (c + 2)}" is less than or equal to "b." As mentioned above, this determination is synonymous with determining the number of trials. Therefore, if the current number of trials is less than the predetermined second number of trials (= b), the process proceeds to step S36, and if the current number of trials exceeds the predetermined second number of trials, the process proceeds to step S37.
[0075] <Step S36> Since the determination in step S35 is "Yes", in step S36, a time duration correction parameter is output according to the value of "i".
[0076] FIG. 6 shows the distribution of modified parameters for the time width according to the value of "i". As shown in FIG. 6, time width information Δtm is set, in which the time width is modified according to the value of "i". "i" is the number of trials from "a+1" to "b". This "i" is a continuation of "i" in FIG. 5.
[0077] Here, as described above in FIG. 6, "ba" is the parameter division number, and the time width information is calculated by "Δtm=B*(ia)*Δtm / (ba)." Note that "B" is the maximum correction value of the time width, which is determined in advance.
[0078] In this way, if the executed test fails, the values of the specified parameters are automatically corrected and the test is executed again. By automatically correcting the parameters and executing the test again, the labor of correcting the parameters can be eliminated and the efficiency of the test can be improved. After the set number of trials has been executed in step S35, the process proceeds to step S37.
[0079] <Step S37> In step S37, after the number of trials set in step S35 has been performed, the time duration correction parameter when the OK counter had the largest count value is output. The test pattern at this time can also be used as training data. In other words, the test pattern when the test performed well can be used as the standard test pattern for future tests.
[0080] In this way, by selecting a better test pattern from among the successful tests, it becomes possible to perform a more accurate test. After step S37 is completed, the process proceeds to step S38.
[0081] <Step S38> In step S38, it is determined whether the modification of the test pattern is a modification of a signal value. This determination is made based on whether "{i % (c + 2)}" is less than or equal to "c." As mentioned above, this determination is equivalent to determining the number of trials. Therefore, if the current number of trials is less than the predetermined third number of trials (= c), the process proceeds to step S39, and if the current number of trials exceeds the predetermined third number of trials, the process proceeds to step S41.
[0082] <Step S39> Since the determination in step S38 is "Yes," the flag signal indicating the type of signal value is determined in step S39. The flag information determines whether the input signal is a two-position signal (ON / OFF) such as a switch signal, or an analog signal that changes continuously.
[0083] In the case of a two-position signal, correction is not possible, so the answer is "Yes" and the process proceeds to step S41. On the other hand, in the case of an analog signal, correction is possible, so the answer is "No" and the process proceeds to step S40.
[0084] <Step S40> Since the determination in step S39 is "No", in step S40, a signal value correction parameter is output according to the value of "i".
[0085] FIG. 7 shows the distribution of modified parameters for the signal value according to the value of "i". As shown in FIG. 7, the signal value fn(m) is set, in which the signal value is modified according to the value of "i". "i" is the number of trials from "b+1" to "c". This "i" is a continuation of "i" in FIG. 6.
[0086] Here, as described above in FIG. 6, "cb" is the parameter division number, and the signal value information is calculated by "fn(m)=C*(ib) / (cb)." Note that "C" is the maximum correction value of the signal value, which is determined in advance.
[0087] In this way, if the executed test fails, the values of the specified parameters are automatically corrected and the test is executed again. By automatically correcting the parameters and executing the test again, the labor of correcting the parameters can be eliminated and the efficiency of the test can be improved. After the set number of trials has been executed in step S39, the process proceeds to step S41.
[0088] <Step S41> In step S41, after the number of trials set in step S38 has been performed, the signal value correction parameters obtained when the OK counter had the largest count value are output. The test pattern obtained at this time can also be used as training data. In other words, the test pattern obtained when the test performed well can be used as the standard test pattern for future tests.
[0089] In this way, by selecting a better test pattern from among the successful tests, it becomes possible to perform a test with higher accuracy. After step S41 is completed, the process proceeds to step S42.
[0090] <Step S42> In step S42, it is determined whether or not to retry correcting the test pattern. This determination is made based on whether "{i % (c+1)}" is less than or equal to "d". This determination is synonymous with determining the number of attempts, as in the control step described above. Therefore, if the current number of attempts is less than the predetermined fourth number of attempts (=d), the process proceeds to step S31, where the correction of the test pattern continues. On the other hand, if the current number of attempts exceeds the predetermined fourth number of attempts, the process exits.
[0091] In step S42, if a test executed using a successful test pattern fails, the test can be automatically executed again using the same test pattern. Since this is a test pattern that has already succeeded, the test failure may be due to an unexpected cause. Therefore, by automatically executing the test again, it is possible to recover from the failure due to an unexpected cause.
[0092] As described above, the present invention is a method for executing software testing in a test device that tests software, characterized in that the test device sequentially executes the following steps: testing the software to be tested according to a test pattern for automatic testing; determining the success or failure of the test; if the test fails, automatically correcting the test pattern for automatic testing at that time and conducting the test again; if the test is successful, saving the test pattern for automatic testing at that time as a regular test pattern for automatic testing; and testing the software again based on the saved regular test pattern for automatic testing.
[0093] This allows automatic correction of test patterns and re-execution of tests even when there are defects in the test specifications, thereby reducing rework required for test pattern creation and improving work efficiency.
[0094] The present invention is not limited to the above-described embodiments and includes various modifications. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and are not necessarily limited to those including all of the described configurations. Furthermore, it is possible to replace part of the configuration of one embodiment with the configuration of another embodiment, or to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace part of the configuration of each embodiment with other configurations. [Explanation of symbols]
[0095] 20...Test device, 21...Electronic control unit, 22...Test pattern input section, 23...Correction parameter assignment section, 24...Label conversion section, 25...Expected value generation section, 26...Calculation processing section, 27...Transmission I / F section, 28...Reception I / F section, 29...Output pattern comparison section, 30...Test result judgment section, 31...Test pattern storage section, 32...Label conversion section, 33...Test pattern correction content selection section, 40...Reception I / F section, 41...Test target software section, 42...Output RAM section, 43...Transmission I / F section.
Claims
1. A software testing method in a test device for testing software, comprising: The testing of the software includes: performing the test of the software under test according to a test pattern for automatic testing; determining the success or failure of the test; If the test fails, the test pattern for the automatic test is automatically corrected and the test is performed again; If the test is successful, storing the test pattern for the automatic test at this time as a regular test pattern for the automatic test; and sequentially executing the steps of re-testing the software based on the stored regular test pattern for the automatic test. A software testing method characterized by:
2. 2. The software testing method according to claim 1, comprising: The test pattern for the automatic test includes time information indicating the passage of time and input information linked to the time information. A software testing method characterized by:
3. 3. The software testing method according to claim 2, comprising: The time information in the test pattern for the automatic test is associated with the number of trials of the test. A software testing method characterized by:
4. 3. The software testing method according to claim 2, further comprising: The time information includes at least timing (time) information and duration information. A software testing method characterized by:
5. 5. A software testing method according to claim 4, comprising: When the test pattern for the automatic test is modified, the timing (time) information, the time width information, and the signal value information are modified each time the modification of each information is completed. A software testing method characterized by:
6. 6. A software testing method according to claim 5, comprising: When correcting the test pattern for the automatic test, the test is executed multiple times, and the test pattern for the automatic test that has a good result among the tests that have been executed is set as the standard test pattern for the automatic test in the future. A software testing method characterized by:
7. A software testing device comprising a testing means for testing software, The testing means a test execution means for executing the test of the software to be tested in accordance with a test pattern for automatic testing; a test determination means for determining whether the test is successful or unsuccessful; an automatic correction means for automatically correcting the test pattern for the automatic test at that time and performing the test again if the test fails; a test pattern storage means for storing the test pattern for the automatic test at this time as a regular test pattern for the automatic test if the test is successful; and a retest execution means for re-executing the test of the software based on the stored regular test pattern for the automatic test. A software testing device characterized by:
8. A software test program for use in a test device for testing software, comprising: a function of performing the test of the software under test according to a test pattern for automatic testing; a function for determining the success or failure of said test; If the test fails, a function of automatically correcting the test pattern for the automatic test and performing the test again; a function of storing the test pattern for the automatic test at this time as a regular test pattern for the automatic test if the test is successful; A software test program for executing a function of re-testing the software based on the stored regular test pattern for the automatic test.
Citation Information
Patent Citations
Test scenario automatic generation method of control software and device and automatic test method, and device and computer program
JP2020204847A