Python project-based unit test method, apparatus and device, and storage medium

By using two test script calling methods in the python project, the workload and time of unit testing are reduced, the problem of low testing efficiency in the existing technology is solved, and a more efficient testing process is achieved.

CN118733468APending Publication Date: 2024-10-01CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410894138.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing Python project unit testing method requires writing test scripts and configuring pipelines for each project, resulting in low testing efficiency.

Method used

By executing the first test script, this script is used to call the second test script of the remote server, initialize and assign data to it, generate a third test script that matches the python project to be tested, and finally execute the third test script to obtain Unit test results.

Benefits of technology

It reduces the workload of writing test scripts, improves testing efficiency, and avoids configuring separate test scripts for each project. It only needs to update the common test script on the remote server to adapt to functional changes or language version updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733468A_ABST
    Figure CN118733468A_ABST
Patent Text Reader

Abstract

The invention provides a unit test method, device and equipment based on a python project and a storage medium. Relates to the technical field of big data processing. The method comprises the following steps: executing a first test script for a python project to be tested, wherein the first test script is used for calling a second test script of a remote server; performing data initialization assignment on the called second test script through the first test script to obtain a third test script; and executing the third test script to obtain a unit test result of the python project to be tested. According to the method provided by the invention, the testing efficiency of the python project is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of big data processing, and in particular to a unit testing method, device, equipment and storage medium based on a Python project. Background Art

[0002] Python is a widely used programming language that provides efficient high-level data structures and simple and effective object-oriented programming. It is used for the development of independent and large-scale projects.

[0003] For large enterprises, the internal software system includes multiple unit projects developed in Python, and each project needs to be continuously developed and upgraded as business needs change. For each Python project, unit testing is required before going online. However, for the current Python project unit testing, you first need to write a test script, then import the test script into the project, and then execute the script in the form of a command. You also need to configure a pipeline for the test script, and then execute the test script through the pipeline.

[0004] In other words, the current Python project unit testing method requires configuring a test script for each Python project separately, and the testing efficiency is not high. Summary of the invention

[0005] The present application provides a unit testing method, apparatus, device and storage medium based on a Python project, which can improve the testing efficiency of the Python project.

[0006] In a first aspect, the present application provides a unit testing method based on a Python project, comprising:

[0007] Execute the first test script of the Python project to be tested, where the first test script is used to call the second test script of the remote server;

[0008] Initialize and assign data to the called second test script through the first test script, and generate a third test script that matches the Python project to be tested;

[0009] Execute the third test script to obtain the unit test results of the Python project to be tested.

[0010] In a second aspect, the present application provides a unit testing device based on a Python project, comprising:

[0011] The calling module executes the first test script of the Python project to be tested, and the first test script is used to call the second test script of the remote server;

[0012] An assignment module is used to perform data initialization assignment for the called second test script through the first test script, and generate a third test script matching the Python project to be tested;

[0013] The test module is used to execute the third test script to obtain the unit test results of the Python project to be tested.

[0014] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0015] Memory stores computer-executable instructions;

[0016] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the implementation modes of the first aspect.

[0017] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement a method as in any one of the implementation modes of the first aspect.

[0018] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a method as described in any one of the implementation modes of the first aspect.

[0019] The unit testing method, apparatus, device and storage medium based on Python project provided by the present application first execute a first test script for the Python project to be tested, wherein the first test script is used to call a second test script of a remote server; then, the first test script is used to initialize data for the called second test script to generate a third test script; finally, the third test script is executed to obtain the unit test result of the Python project to be tested, and the Python project is tested by calling two test scripts, which reduces the workload of writing test scripts and improves the testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0021] Figure 1 The process of the unit testing method based on the Python project provided in the embodiment of the present application Figure 1 ;

[0022] Figure 2 The process of the unit testing method based on the Python project provided in the embodiment of the present application Figure 2 ;

[0023] Figure 3 The process of the unit testing method based on the Python project provided in the embodiment of the present application Figure 3 ;

[0024] Figure 4 A schematic diagram showing the test results of the unit testing method based on the Python project provided by the embodiment of the present application;

[0025] Figure 5 A schematic diagram of the structure of a unit test device based on a Python project provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of the structure of another unit testing device based on a Python project provided in an embodiment of the present application;

[0027] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0028] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0029] The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0030] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0031] Figure 1 The process of the unit testing method based on the Python project provided in the embodiment of the present application Figure 1 .like Figure 1 As shown, the unit test method based on the Python project includes:

[0032] Step S110: execute a first test script of the Python project to be tested, where the first test script is used to call a second test script on a remote server.

[0033] The unit testing method based on the Python project of this embodiment can be applied to testing software projects written in Python. Python is widely used in the development of various software projects due to its simplicity, readability and scalability. For user-oriented enterprises such as banks, due to the high complexity of their business and the high frequency of business updates, using Python to write software projects is a more preferred solution.

[0034] After the software project is written in Python, in order to ensure that the software code runs normally, it needs to be tested multiple times. The software can be put online only after passing all the tests. Currently, Python projects are generally tested using Python libraries such as Pytest and unittest for unit testing, but a separate test script needs to be written for each Python project test before the script can be executed in the form of a command. In addition, a pipeline needs to be configured for the test script, and then the test script is executed through the pipeline. Therefore, the current testing efficiency of Python projects is not high.

[0035] The unit test method based on Python project provided by the embodiment of the present application designs two different scripts for the test of Python project, thereby improving the test efficiency of Python project. First, the first test script of the Python project to be tested is executed, and the first test script is used to call the second test script of the remote server. The second test script is the script that actually performs the test work on the Python project, and the second test script is stored in the remote server. The first test script is not a script that directly tests the Python project, but a script that calls the second script and initializes the second script. Since the codes of different Python projects are different, the test scripts for testing different Python projects are also different, but since the Python project is still a software code written based on the Python language, different Python projects are written under a unified writing standard, so the scripts for testing different Python projects also have unified or similar properties. Therefore, a test script that is common to different Python projects, that is, a second test script, can be written, and the second test script can be stored in the remote server. For different Python projects, different initialization assignments can be written in the first test script, and then the second test script is called by the first test script, and then the called second test script is initialized and assigned, so that the test script corresponding to the Python project to be tested can be obtained.

[0036] In one embodiment, executing a first test script corresponding to a Python project to be tested includes: executing a local first test script corresponding to the Python project to be tested, the first test script being used to call a second test script on a remote server through a Java service interface. The first test script is located locally in the Python project to be tested and can be written by a tester who tests the Python project to be tested. The first script calls the second test script on the source server through a Java service port.

[0037] Step S120: Initialize and assign data to the called second test script through the first test script to generate a third test script that matches the Python project to be tested.

[0038] The calling of the second test script by the first test script is divided into two steps. The first step is to call the second test script from the remote server. The second test script can be the test script corresponding to the Python project to be tested. Then, the initialization assignment data in the first test script is used to assign values ​​to the called second test script, and the second test script after data initialization assignment can be obtained, that is, the third test script. In summary, the first test script includes two parts, one is the calling information of the second test script, and the other is the data initialization assignment information of the second test script.

[0039] Step S130, execute the third test script to obtain the unit test result of the Python project to be tested.

[0040] The third test script obtained after executing the first test script is the test script corresponding to the Python project to be tested. By executing the third test script, the unit test results of the Python project to be tested can be obtained. Since the second test script is a general test script and the second test script is located on a remote server, only a unified second test script is needed to implement the test of various Python projects. There is no need to configure a separate test script for each Python project. The second test script only needs to be updated when the function to be tested undergoes a major change or the Python language version is updated. The first test script is for each Python project to be tested, but only the call instructions for the second test script and the data initialization assignment information need to be written in the first test script, which greatly reduces the workload of writing the test script for the Python project, and there is no need to write a separate pipeline for the test script, thereby improving the testing efficiency of the Python project.

[0041] In one embodiment, after executing the third test script, in addition to obtaining the unit test results of the Python project to be tested, coverage parameters can also be obtained. In fact, the test requirements for the Python project to be tested can be configured in the first test script, including whether to perform unit testing or coverage testing on the Python project to be tested, or to perform unit testing and coverage testing at the same time. Among them, coverage testing is a means of testing integrity, which is used to test the percentage of the tested code of the Python project code in the total code.

[0042] In one embodiment, the second test script includes a general test script for testing a variety of different python projects. The second test script can be written for a python project, including script support for a plurality of different test cases of the python project, or the second test script can also be written for the testing of a variety of different python projects, including test script support for a variety of different python projects. Accordingly, when the second test script includes a general test script for testing a variety of different python projects, the first test script can be configured according to the unit test requirements of different python projects to be tested, including the configuration of the test projects, the number of test cases, the specific test scripts, etc. of the python projects to be tested. After the first test script is configured for the unit test requirements of different python projects to be tested, the second test script corresponding to the python project to be tested in the remote server can be called by the first test script.

[0043] The unit testing method based on Python project provided in this embodiment first executes a first test script for the Python project to be tested, wherein the first test script is used to call a second test script on a remote server; then, the first test script is used to initialize and assign data to the called second test script to obtain a third test script; finally, the third test script is executed to obtain the unit testing result of the Python project to be tested. The Python project is tested by calling two test scripts, which reduces the workload of writing test scripts and improves the testing efficiency.

[0044] Figure 2 The process of the unit testing method based on the Python project provided in the embodiment of the present application Figure 2 .like Figure 2 As shown, the unit test method based on the Python project includes:

[0045] Step S210: execute a first test script for the Python project to be tested, wherein the first test script includes call information and corresponding initialization assignments of second test scripts corresponding to a plurality of test cases in the Python project to be tested.

[0046] For a unit test of a Python project, multiple test cases may need to be tested, and the test scripts and corresponding initialization assignment data to be executed for each test case may be different. Therefore, when the test of the Python project to be tested includes multiple test cases, the first test script includes the call information and corresponding initialization assignment of the second test script corresponding to the multiple test cases in the Python project to be tested. That is, for the Python to be tested, multiple different test cases are configured for it in the first test script, and the test items and initialization assignments of each test case are different.

[0047] Step S220: Initialize and assign data to the second test scripts corresponding to the multiple test cases in the Python project to be tested that are called by the first test script, and generate multiple third test scripts corresponding to the multiple test cases.

[0048] When the first test script includes the calling information and corresponding initialization assignment of the second test script corresponding to the multiple test cases in the Python project to be tested, the first test script performs data initialization assignment for the second test scripts corresponding to the multiple test cases in the Python project to be tested, and the second test scripts after the data initialization assignment corresponding to the multiple test cases of the Python project to be tested can be obtained, that is, multiple third test scripts. When executing the first test script, the second test script is first called to obtain the second test scripts corresponding to the multiple test cases of the Python project to be tested, and the obtained multiple second test scripts are different according to the test requirements of the multiple test cases of the Python project to be tested. Then, according to the initialization assignments corresponding to the multiple test cases of the Python project to be tested in the first test script, the obtained multiple second test scripts are assigned respectively, and multiple third test scripts corresponding to the multiple test cases can be obtained.

[0049] Step S230: execute multiple third test scripts corresponding to the multiple test cases to obtain unit test results of the Python project to be tested.

[0050] After obtaining the third test scripts corresponding to the multiple test cases of the Python project to be tested, the third test scripts corresponding to the multiple test cases of the Python project to be tested are respectively executed to obtain the unit test results of the multiple test cases of the Python project to be tested.

[0051] Figure 3 The process of the unit testing method based on the Python project provided in the embodiment of the present application Figure 3 .like Figure 3 As shown, the unit test method based on the Python project includes:

[0052] Step S310, executing a first test script of the Python project to be tested, where the first test script is used to call a second test script on a remote server.

[0053] Step S320, initializing and assigning data to the called second test script through the first test script to obtain a third test script.

[0054] Step S330, execute the third test script to obtain the unit test result of the Python project to be tested.

[0055] Step S340, display the unit test results of the Python project to be tested.

[0056] This embodiment Figure 1 On the basis of the illustrated embodiment, the unit test results of the Python project to be tested can be further displayed. In traditional Python project testing, the test results are test data corresponding to each test script, and professional testers are required to understand the test results. In this embodiment, after completing the test of the Python project to be tested, the unit test results of the Python project to be tested can be directly displayed, and this display can be in an intuitive way. For example, numerical values, tables, icons, curves and other display methods can be used for display, so that the tester can intuitively see the test results of the Python project to be tested. Furthermore, when the test of the Python project to be tested also includes coverage testing, it is also possible to display unit test results and coverage test results. Of course, in Figure 2 Based on the illustrated embodiment, unit test results of multiple test cases of the Python project to be tested can also be displayed.

[0057] In one embodiment, the display of the test results of the Python project to be tested can also be performed by displaying the unit test results of the Python project to be tested in a formatted display template. The formatted display template includes, for example, the name, type, tester, test results and other information of the Python project to be tested. By analyzing the test results, various test information is filled into the corresponding positions of the formatted display template, and the final display is the completed project test report, which is convenient for the standardized management of enterprise content.

[0058] In one embodiment, after obtaining the unit test results of the Python project to be tested, the unit test results of the Python project to be tested can also be saved on a remote server, so that the test status of the Python project to be tested can be checked from the remote server at any time, providing data support for the subsequent writing and maintenance of Python projects.

[0059] Figure 4This is a schematic diagram showing the test results of the unit test method based on the Python project provided by the embodiment of the present application. Figure 4 As shown, a structured test result may include information such as number, name, test unit, as well as test items and test results. The entire test result is displayed in the form of a test report, which is clear at a glance and easy to archive and count.

[0060] Figure 5 This is a schematic diagram of the structure of a unit test device based on a Python project provided in an embodiment of the present application. Figure 5 As shown, the unit testing device based on the Python project includes: a calling module 510, an assignment module 520, and a testing module 530.

[0061] The calling module 510 executes a first test script of the Python project to be tested, and the first test script is used to call a second test script of the remote server.

[0062] The assignment module 520 is used to perform data initialization assignment for the called second test script through the first test script to obtain a third test script.

[0063] The test module 530 is used to execute the third test script to obtain the unit test result of the Python project to be tested.

[0064] In some embodiments, the calling module 510 is specifically used to execute a first test script for the Python project to be tested, and the first test script includes calling information and corresponding initialization assignments of second test scripts corresponding to multiple test cases in the Python project to be tested.

[0065] In some embodiments, the assignment module 520 is specifically used to perform data initialization assignment for the second test scripts corresponding to the multiple test cases in the called Python project to be tested through the first test script.

[0066] In some embodiments, the test module 530 is specifically used to execute multiple third test scripts corresponding to the multiple test cases, and obtain unit test results of the multiple test cases of the Python project to be tested.

[0067] In some embodiments, the calling module 510 is specifically used to execute a local first test script corresponding to the Python project to be tested, and the first test script is used to call a second test script of a remote server through a Java-side service interface.

[0068] In some embodiments, the test module 530 is specifically used to execute the third test script to obtain the unit test results and coverage of the Python project to be tested.

[0069] In some embodiments, the second test script comprises a general test script for testing a variety of different python projects.

[0070] In some embodiments, the first test script is configured according to unit test requirements of different Python projects to be tested.

[0071] In some embodiments, the first test script is used to call a second test script in a remote server corresponding to the Python project to be tested.

[0072] Figure 6 This is a schematic diagram of another unit test device based on a Python project provided in an embodiment of the present application. Figure 6 As shown, the unit test device based on the Python project is Figure 5 On the basis of

[0073] The display module 540 is used to display the unit test results of the Python project to be tested.

[0074] In some embodiments, the display module 540 is specifically used to display the unit test results of the Python project to be tested in a formatted display template.

[0075] In some embodiments, the unit testing apparatus based on the Python project may further include a storage module 550 for storing the unit testing results of the Python project to be tested on a remote server.

[0076] The unit testing device based on Python project provided in the embodiment of the present application can be used to execute the technical solution of the unit testing method based on Python project in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0077] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the calling module 510, the assignment module 520, the test module 530, the display module 540, and the storage module 550 can all be separately established processing elements, or they can be integrated in a chip of the above device for implementation. In addition, they can also be stored in the memory of the above device in the form of program code, and a processing element of the above device can call and execute the functions of the above data calling module 510, the assignment module 520, the test module 530, the display module 540, and the storage module 550. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in a processor element or an instruction in software form.

[0078] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device may include: a transceiver 71 , a processor 72 , and a memory 73 .

[0079] The processor 72 executes the computer execution instructions stored in the memory, so that the processor 72 executes the scheme in the above embodiment. The processor 72 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0080] The memory 73 is connected to the processor 72 via a system bus and completes communication between them. The memory 73 is used to store computer program instructions.

[0081] The transceiver 71 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0082] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.

[0083] The electronic device provided in the embodiment of the present application may be a computer or a server that can perform data processing in a computer system.

[0084] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the unit testing method based on the Python project in the above embodiment.

[0085] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the unit testing method based on the Python project in the above embodiment.

[0086] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution of the unit testing method based on the Python project in the above embodiment can be implemented.

[0087] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0088] 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.

Claims

1. A unit testing method based on Python projects, It is characterized in that include: Execute a first test script of the Python project to be tested, wherein the first test script is used to call a second test script of a remote server; Initialize and assign data to the called second test script through the first test script to generate a third test script that matches the Python project to be tested; Execute the third test script to obtain the unit test result of the Python project to be tested.

2. The method according to claim 1, It is characterized in that The execution of the first test script of the Python project to be tested includes: Execute a first test script for the Python project to be tested, wherein the first test script includes call information and corresponding initialization assignments of second test scripts corresponding to multiple test cases in the Python project to be tested.

3. The method according to claim 2, It is characterized in that The step of performing data initialization and value assignment for the called second test script by the first test script to generate a third test script matching the Python project to be tested includes: The first test script is used to perform data initialization assignment for second test scripts corresponding to multiple test cases in the Python project to be tested, thereby generating multiple third test scripts corresponding to the multiple test cases.

4. The method according to claim 3, It is characterized in that The executing the third test script to obtain the unit test result of the Python project to be tested includes: Execute multiple third test scripts corresponding to the multiple test cases respectively to obtain unit test results of the multiple test cases of the Python project to be tested.

5. The method according to any one of claims 1 to 3, It is characterized in that The executing of a first test script corresponding to the Python project to be tested, wherein the first script is used to call a second test script of a remote server, includes: Execute a local first test script corresponding to the Python project to be tested, wherein the first test script is used to call a second test script of a remote server through a Java-side service interface.

6. The method according to any one of claims 1 to 3, It is characterized in that The executing the third test script to obtain the unit test result of the Python project to be tested includes: Execute the third test script to obtain the unit test results and coverage of the Python project to be tested.

7. The method according to any one of claims 1 to 3, It is characterized in that The second test script includes a general test script used for testing a variety of different python projects.

8. The method according to claim 6, It is characterized in that The first test script is configured according to the unit test requirements of different Python projects to be tested.

9. The method according to any one of claims 1 to 3, It is characterized in that After executing the third test script to obtain the unit test result of the Python project to be tested, the method further includes: Display the unit test results of the Python project under test.

10. The method according to claim 9, It is characterized in that The unit test results of the Python project to be tested are displayed, including: The unit test results of the Python project to be tested are displayed in a formatted display template.

11. The method according to claim 10, It is characterized in that After executing the third test script to obtain the unit test result of the Python project to be tested, the method further includes: The unit test results of the Python project to be tested are saved on the remote server.

12. A unit test device based on Python project, It is characterized in that include: A calling module executes a first test script of the Python project to be tested, wherein the first test script is used to call a second test script of a remote server; An assignment module, used to perform data initialization assignment for the called second test script through the first test script, and generate a third test script matching the Python project to be tested; The test module is used to execute the third test script to obtain the unit test result of the Python project to be tested.

13. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 11 when executed by a processor.

15. A computer program product, It is characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 11 when being executed by a processor.