Method, system, equipment and medium for multi-role pushing enterprise function automatic testing of investment attracting system

By analyzing the push enterprise processes and role synergy in the investment promotion system in detail, building an automated testing framework and writing test cases, the problem that existing automated testing methods are difficult to cover the responsibilities and business processes of multiple roles is achieved, and efficient and flexible Automated testing improves test coverage and efficiency.

CN119396738APending Publication Date: 2025-02-07INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411685221.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

Existing automated testing methods are difficult to fully cover the responsibilities and business processes of multiple roles in the investment promotion system, and lack flexibility and scalability, making it difficult to adapt to business changes, resulting in low test coverage and inefficiency.

Method used

By analyzing the push enterprise processes and role synergy relationships in the investment promotion system in detail, an automated testing framework is built, and a test case is written for the combination of different push enterprise processes and roles is written based on this framework, and a test case is run using the automated testing framework and a test report is generated.

Benefits of technology

It realizes comprehensive automated testing of the multi-role push enterprise functions of the investment promotion system, improves testing efficiency and coverage, has high flexibility and adaptability, can quickly respond to system changes, and reduces testing costs and human errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396738A_ABST
    Figure CN119396738A_ABST
Patent Text Reader

Abstract

The invention provides a method, a system, equipment and a medium for automatically testing multi-role pushing enterprise functions of an investment attracting system. The method comprises the following steps: determining all pushing enterprise processes in the investment attracting system and a cooperative relationship among different roles in each pushing enterprise process; building an automatic test framework of the investment attracting system, and compiling test cases for combinations of different pushed enterprise processes and roles in the investment attracting system based on the automatic test framework; and operating the test case by using the automatic test framework to test the push enterprise function of each role of the investment attracting system, and generating a test report. By comprehensively analyzing the pushing enterprise process and the role cooperation relationship thereof in the investment attracting system, the automatic test of the multi-role pushing enterprise function of the investment attracting system is realized, the limitation of the existing automatic test method in facing multi-role and multi-process characteristic enterprise-level application is solved, and the test comprehensiveness and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of software automated testing, and specifically designs a method, system, device and medium for automated testing of multi-role push enterprise functions in an investment promotion system. Background Art

[0002] With the development of information technology, software has become a key infrastructure for enterprise operations and service provision. All walks of life are using software technology to optimize business processes and improve work efficiency, resulting in a growing demand for software testing. Software testing can ensure the quality and stability of software systems, thereby ensuring the normal operation of software businesses. As the scale and complexity of software development grows, testing costs are also increasing. Due to the low efficiency of manual testing, automated testing applications have emerged. Automated testing can reduce testing costs and improve software quality by reducing manpower requirements and increasing test coverage and efficiency.

[0003] Although the existing automated testing methods can improve testing efficiency to a certain extent, they still have some limitations when facing enterprise-level applications with multi-role and multi-process characteristics such as investment promotion systems. First, investment promotion systems usually involve multiple roles, each of which has different responsibilities and tasks in the system, and the business processes are complex and changeable. Existing automated testing methods are often designed for relatively single test scenarios and roles, and it is difficult to fully cover the responsibilities and business processes of all roles in the investment promotion system. Second, as the business develops and changes, new roles and business processes may continue to be added to the investment promotion system, and existing automated testing methods often lack sufficient flexibility and scalability, making it difficult to quickly adapt to these changes. Due to the inapplicability of existing automated testing methods, the multi-role enterprise push function of the investment promotion system can only be performed manually, resulting in testers spending a lot of manpower, material resources and time, low test coverage and low test efficiency. Summary of the invention

[0004] In a first aspect, an embodiment of the present application provides a method for automated testing of a multi-role enterprise push function of an investment promotion system, comprising the following steps: S1. Determine all the push enterprise processes in the investment promotion system, as well as the collaborative relationships between different roles in each push enterprise process; S2. Build an automated testing framework for the investment promotion system, and write test cases for different combinations of push enterprise processes and roles in the investment promotion system based on the automated testing framework; S3. Use the automated testing framework to run test cases to test the enterprise push functions of each role in the investment promotion system and generate a test report.

[0005] Furthermore, the specific steps of step S1 are as follows: S11. Determine different types of push enterprise processes in the investment promotion system; S12. Identify the triggering conditions and push steps for each push enterprise process; S13. Determine the roles corresponding to the push end and the destination end of each push enterprise process; S14. Determine the authority and tasks assigned to each role and the collaborative relationship in pushing enterprise processes.

[0006] Furthermore, the specific steps of step S2 are as follows: S21. Build an automated testing environment based on Python programming language and combined with Pytest, Selenium and Allure frameworks; S22. Create a test project in the automated testing environment, create a function folder in the directory of the test project, and install the libraries and tools required for automated testing; S23. Determine all types of combinations of push enterprise processes and roles in the investment promotion system, and program test cases based on the triggering conditions and push steps of the push enterprise processes in each combination.

[0007] Furthermore, the specific steps of step S22 are as follows: S221. Create a test project for the push enterprise function of the merchant system in the automated testing environment; S222. Create a test case folder, a page class folder, a public folder, and a test report folder in the test project directory; S223. Install the required browser automation selenium library, pytest test framework, Allure command line tool, and pytest-allure-adapter library in the automated testing environment.

[0008] Furthermore, the specific steps of step S23 are as follows: S231. Positioning a type of push enterprise process in the investment promotion system; S232. Identify the role corresponding to the push end and the role corresponding to the destination end of the push enterprise process of the type of positioning; S233. According to the trigger conditions and push steps of the positioning type push enterprise process, simulate the push end role to push the enterprise function to the destination end role, write test cases, set the test case test input method and set the assertion verification test results; S234. Determine whether the type of enterprise process pushed in the investment promotion system has been located; If yes, go to step S235; If not, locate the next type of push enterprise process and return to step S232; S235. Save the written test case to the test case folder.

[0009] Furthermore, the specific steps of step S3 are as follows: S31. Use the command line tool or integrated development environment to run the test case and start the automated test of the multi-role enterprise push function of the investment promotion system; S32. Each test case simulates the operation of the push-end role of each push enterprise process of the corresponding type through the page class file, pushes the enterprise to the destination role, and uses assertions to verify whether the push is successful, and whether the destination role uses the page class file to generate a push notification after receiving the push enterprise, and generates a test result; S33. The command line tool collects the test results during the automated testing process and generates a test report to record the use case title, use case description, test results, and failed assertion screenshots.

[0010] Furthermore, before step S31, the following steps are also included: Determine whether there are new types of enterprise push processes; If yes, return to step S23 to add a test case for the new type of enterprise push process and store it in the test case folder; If not, go to step S31.

[0011] In a second aspect, the embodiment of the present application further provides a system for automated testing of enterprise functions for multi-role push in a merchant recruitment system, including: The push process and role coordination relationship determination module is used to determine all push processes in the investment promotion system and the coordination relationship between different roles in each push process; The module for building an automated testing framework and writing test cases is used to build an automated testing framework for the investment promotion system and write test cases for different push processes and role combinations in the investment promotion system based on the automated testing framework. The automated testing module is used to use the automated testing framework to run test cases to test the push enterprise functions of each role in the investment promotion system and generate a test report.

[0012] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system as described in the first aspect are implemented.

[0013] In a fourth aspect, an embodiment of the present application further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system as described in the first aspect.

[0014] It can be seen from the above technical solutions that the present invention has the following advantages: The method, system, device and medium for automated testing of the enterprise push function of the multi-role investment promotion system provided in the present application can comprehensively cover the responsibilities and business processes of all roles in the system by analyzing in detail the collaborative relationship between all the enterprise push processes and their roles in the investment promotion system, solving the problem that the existing automated testing methods are difficult to cope with the complexity of multiple roles and multiple processes; the test cases written through the automated testing framework can significantly improve the testing efficiency and reduce the consumption of manpower, material resources and time; the test cases can be quickly added and adjusted as the new roles and business processes of the investment promotion system change, ensuring the continued effectiveness and adaptability of the test; running the test cases through the automated testing framework can generate a detailed test report, recording the case title, description, test results and failed assertion screenshots, which helps to timely discover and fix defects in the software, and can also improve the test coverage to ensure that the enterprise push function of the investment promotion system can be fully verified in multiple roles and processes; and automated testing replaces manual testing, reduces the repetitive work of testers, reduces testing costs, and can also improve the stability and repeatability of the test, and reduce testing errors caused by human factors. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0016] Figure 1 The present invention is a flowchart of an embodiment of a method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system.

[0017] Figure 2 This is a flow chart of another embodiment of the method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system according to the present invention.

[0018] Figure 3 This is a system schematic diagram of the present invention for automated testing of enterprise functions pushed by multiple roles in the investment promotion system.

[0019] Figure 4 A schematic diagram of an electronic device storing a method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system according to the present invention. DETAILED DESCRIPTION

[0020] In the specific steps of the method for automated testing of enterprise functions for multi-role push of investment promotion system, which will be described in detail below, various embodiments of the present disclosure will be described more comprehensively. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.

[0021] For example, with the rapid development of information technology, software has become the core support for enterprise operations and service provision, prompting various industries to adopt software technology to optimize processes and improve efficiency, which in turn has driven the continued growth of software testing demand. Software testing is crucial to ensuring the quality and stability of software systems and is the guarantee for the normal operation of software businesses. However, with the continuous expansion of software development scale and increasing complexity, testing costs have also risen. Manual testing has been unable to meet demand due to its low efficiency, so automated testing has emerged. Automated testing effectively reduces testing costs and improves software quality by reducing manpower requirements and increasing test coverage and efficiency.

[0022] Despite this, existing automated testing methods still face many challenges when faced with enterprise-level applications with multi-role and multi-process characteristics such as the investment promotion system. First, the investment promotion system involves multiple roles, each with different responsibilities and tasks, and the business processes are complex and changeable, while existing automated testing methods are often only designed for a single test scenario and role, making it difficult to fully cover the responsibilities and business processes of all roles in the investment promotion system. Secondly, as the business continues to develop and change, new roles and business processes may continue to be added to the investment promotion system, and existing automated testing methods often lack sufficient flexibility and scalability, making it difficult to quickly adapt to these changes. Therefore, the multi-role enterprise push function of the investment promotion system currently still relies mainly on manual testing, which not only consumes a lot of manpower, material resources and time, but also leads to low test coverage and low test efficiency.

[0023] Exemplarily speaking, this embodiment provides a method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system, which achieves comprehensive coverage through in-depth analysis of the push process and role collaboration relationships; utilizes an automated testing framework to improve testing efficiency and reduce costs; has high flexibility and adaptability and can respond quickly to system changes; generates detailed test reports to help discover and repair defects in a timely manner, and ensures high test coverage; ultimately, automated testing replaces manual testing, reduces repetitive work, enhances test stability and repeatability, and reduces human errors.

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] See also Figure 1 The figure is a flowchart of a method for automated testing of enterprise functions pushed by multiple roles in a merchant recruitment system in a specific embodiment, and the method comprises the following steps: S1. Determine all the push enterprise processes in the investment promotion system, as well as the collaborative relationships between different roles in each push enterprise process; It should be noted that the Merchants Recruitment System redesigns the push enterprise processes related to different roles, and each role interacts and collaborates in the push business process; S2. Build an automated testing framework for the investment promotion system, and write test cases for different combinations of push enterprise processes and roles in the investment promotion system based on the automated testing framework; It should be noted that by writing test cases based on the pushed business processes and roles, it is possible to fully cover the responsibilities and business processes of all roles; S3. Use the automated testing framework to run test cases to test the push enterprise functions of each role in the investment promotion system and generate a test report; It should be noted that through testing, defects in the enterprise push function in the investment promotion system can be discovered in a timely manner and repaired in a timely manner. Automated testing will eventually replace manual testing, reducing repetitive work and enhancing the stability and repeatability of testing.

[0026] This embodiment provides a method for automated testing of the enterprise function of pushing multiple roles in the investment promotion system. By comprehensively analyzing the enterprise push processes and role collaboration relationships in the investment promotion system, automated testing of the enterprise function of pushing multiple roles in the investment promotion system is achieved. This solves the limitations of existing automated testing methods when facing enterprise-level applications with multi-role and multi-process characteristics, and improves the comprehensiveness and accuracy of the test.

[0027] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for automated testing of multi-role push enterprise functions of the investment promotion system is provided, such as Figure 2 As shown, the method comprises the following steps: S1. Determine all the push enterprise processes in the investment promotion system, as well as the collaborative relationship between different roles in each push enterprise process; the specific steps of step S1 are as follows: S11. Determine different types of push enterprise processes in the investment promotion system; S12. Identify the triggering conditions and push steps for each push enterprise process; S13. Determine the roles corresponding to the push end and the destination end of each push enterprise process; S14. Determine the authority and tasks assigned to each role and the collaborative relationship in pushing the enterprise process; It should be noted that by breaking down the push enterprise process in detail, identifying the trigger conditions and push steps, and determining the roles of the push end and the destination end, the foundation of the test case can be accurately constructed, which helps to ensure that the test case can cover all key business processes and role interactions, and improve the depth and breadth of the test; S2. Build an automated testing framework for the investment promotion system, and write test cases for different combinations of push enterprise processes and roles in the investment promotion system based on the automated testing framework; the specific steps of step S2 are as follows: S21. Build an automated testing environment based on Python programming language and combined with Pytest, Selenium and Allure frameworks; S22. Create a test project in the automated testing environment, create a function folder in the directory of the test project, and install the libraries and tools required for automated testing; S23. Determine all types of push enterprise processes and role combinations in the merchant system, and program test cases based on the trigger conditions and push steps of each combination of push enterprise processes; It should be noted that the automated testing environment built based on the Python programming language and combined with the Pytest, Selenium and Allure frameworks provides powerful testing capabilities, which can not only meet the complex and changeable testing requirements of the investment promotion system, but also improve testing efficiency and quality; S3. Use the automated testing framework to run test cases to test the push enterprise functions of each role in the investment promotion system and generate a test report; the specific steps of step S3 are as follows: S31. Use the command line tool or integrated development environment to run the test case and start the automated test of the multi-role enterprise push function of the investment promotion system; S32. Each test case simulates the operation of the push-end role of each push enterprise process of the corresponding type through the page class file, pushes the enterprise to the destination role, and uses assertions to verify whether the push is successful, and whether the destination role uses the page class file to generate a push notification after receiving the push enterprise, and generates a test result; S33. The command line tool collects the test results during the automated testing process and generates a test report to record the use case title, use case description, test results, and failed assertion screenshots; It should be noted that running test cases using command line tools or an integrated development environment and simulating role operations through page class files for push verification can efficiently and accurately perform tests. At the same time, the generated test report provides detailed test results and failed assertion screenshots, which helps to quickly locate and solve problems.

[0028] In an embodiment of the present invention, based on step S22 and step S23, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0029] The specific steps of step S22 are as follows: S221. Create a test project for the push enterprise function of the merchant system in the automated testing environment; S222. Create a test case folder, a page class folder, a public folder, and a test report folder in the test project directory; S223. Install the required browser automation selenium library, pytest test framework, Allure command line tool and pytest-allure-adapter library in the automated testing environment; It should be noted that creating test projects and related folders in the automated testing environment and installing the required libraries and tools provide a good organizational structure and environment support for the writing and management of test cases, which helps to ensure the standardization and maintainability of test cases; The specific steps of step S23 are as follows: S231. Positioning a type of push enterprise process in the investment promotion system; S232. Identify the role corresponding to the push end and the role corresponding to the destination end of the push enterprise process of the type of positioning; S233. According to the trigger conditions and push steps of the positioning type push enterprise process, simulate the push end role to push the enterprise function to the destination end role, write test cases, set the test case test input method and set the assertion verification test results; S234. Determine whether the type of enterprise process pushed in the investment promotion system has been located; If yes, go to step S235; If not, locate the next type of push enterprise process and return to step S232; S235. Store the written test case in the test case folder; It should be noted that by analyzing and pushing the combination of enterprise processes and roles in detail and writing corresponding test cases, the integrity and accuracy of the test cases can be ensured, which helps to discover potential software defects and improve the reliability and stability of the software; Another method for automated testing of enterprise functions of multi-role push in investment promotion system provided in this embodiment may further include the following steps before step S31: Determine whether there are new types of enterprise push processes; If yes, return to step S23 to add a test case for the new type of enterprise push process and store it in the test case folder; If not, go to step S31.

[0030] In the embodiment of the present invention, by determining whether there is a new type of enterprise push process and adding test cases in a timely manner, the continued effectiveness and adaptability of the test can be ensured, which helps to cope with changes in new roles and business processes in the investment promotion system and ensure continuous improvement of software quality.

[0031] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0032] Taking an investment promotion system as an example, multiple roles are designed, including administrators, leading units, responsible units, etc. Each role has specific responsibilities and tasks. One of the core functions of the investment promotion system is enterprise push, which is to push enterprise information from one role to another. In order to ensure the stability and reliability of the system, this function needs to be comprehensively tested.

[0033] The specific implementation is as follows: 1. Obtain multi-process management and multi-role collaboration of the investment promotion system According to the actual business needs of the investment promotion system, there are different business push processes, such as: Initial push process for new enterprises: After the administrator reviews the new enterprise information, it will be pushed to the lead unit for further review; Customized push process for enterprises with specific needs: According to the specific needs of the enterprise, the administrator pushes it to the corresponding responsible unit for processing; Follow-up and push process for companies that have been contacted: For companies that have been contacted but not successfully cooperated with, the administrator will follow up regularly and push them to relevant units for further communication; These processes have clear steps and trigger conditions to ensure that the information can be pushed to the target companies at a verified time; In the investment promotion system, different roles are identified, such as investment promotion specialists, leading units, leaders at all levels, etc., and corresponding permissions and tasks are assigned to each role. Through role collaboration, effective communication and collaboration among various roles in the information push process can be achieved. For example, the leading unit can receive corporate information pushed by the administrator and conduct further review and processing; the responsible unit can formulate corresponding cooperation plans based on the specific needs of the enterprise.

[0034] 2. Build an automated testing framework and write test cases Use Python programming language, combined with frameworks such as Pytest, Selenium and Allure, to build an automated testing environment; Create corresponding folders in the project directory, such as tests / to store test case files, pages / to store page class files, utils / to store tool classes and auxiliary functions, and reports / to store test reports; Install required libraries and tools including selenium library for browser automation, pytest testing framework for organizing and executing test cases, and allure command-line tool and pytest-allure-adapter library for generating detailed test reports.

[0035] In the tests / folder, use Pytest to write test cases. The test cases should cover different processes and role combinations of the investment promotion system to ensure the comprehensiveness and accuracy of the test. For example: The test case for the initial push of a new enterprise simulates the process of an administrator reviewing the new enterprise information and pushing it to the lead unit; Customized push test cases for specific needs enterprises, simulating the process of administrators pushing them to the corresponding responsible units according to the specific needs of the enterprise; The test case of follow-up push for contacted enterprises simulates the process of administrators regularly following up on contacted enterprises and pushing them to relevant units for further communication; Test cases should include assertions to verify test results, such as checking whether the push is successful, whether the receiving unit has received the push notification, etc. At the same time, logs should be recorded for subsequent analysis and troubleshooting.

[0036] 3. Run test cases and generate test reports Use command line tools or integrated development environment IDE to run test cases. During the test execution, Allure will automatically collect test results and related information and generate a detailed test report. The test report includes the case title, case description, test results, failed assertion screenshots and other information; Analyze test reports, find issues and fix them. Continuously optimize test cases and system functions based on test results and feedback.

[0037] Through the above steps, the multi-role process automated testing of the enterprise push function of the investment promotion system can be realized. The automated testing tool can quickly and accurately execute various test scenarios, greatly shortening the testing cycle. At the same time, the generated detailed test report helps developers to find problems in time and fix them, thereby improving the stability and reliability of the system.

[0038] like Figure 3 As shown, the following is an embodiment of a system for automated testing of enterprise functions pushed by multiple roles in an investment promotion system provided by an embodiment of the present disclosure. The system and the methods for automated testing of enterprise functions pushed by multiple roles in an investment promotion system in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the system for automated testing of enterprise functions pushed by multiple roles in an investment promotion system, reference can be made to the embodiments of the methods for automated testing of enterprise functions pushed by multiple roles in an investment promotion system in the above-mentioned embodiments.

[0039] The system includes: a push process and role coordination relationship determination module, which is used to determine all push processes in the investment promotion system and the coordination relationship between different roles in each push process; The module for building an automated testing framework and writing test cases is used to build an automated testing framework for the investment promotion system and write test cases for different push processes and role combinations in the investment promotion system based on the automated testing framework. The automated testing module is used to use the automated testing framework to run test cases to test the push enterprise functions of each role in the investment promotion system and generate a test report.

[0040] This embodiment provides a system for automated testing of enterprise functions for multi-role push in the investment promotion system. Through modular design, the push process and role coordination relationship determination, automated test framework construction, test case writing, and automated testing are separated, thereby improving the maintainability and scalability of the system. At the same time, the system can perform tests efficiently and accurately, and generate detailed test reports, providing strong support for the quality assurance of the investment promotion system.

[0041] Figure 4 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0042] The method for automated testing of enterprise functions for multi-role push of investment promotion system provided in the embodiment of the present application can be applied to electronic devices. It can be understood by those skilled in the art that the electronic device structure involved in the embodiment of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components. In an embodiment of the present invention, the electronic device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0043] The electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, buttons, a camera, a display, and a SIM card interface, etc.

[0044] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0045] The processor may include one or more processing units, for example, the processor may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors.

[0046] The above-mentioned electronic device implements the method of this application for automated testing of the multi-role push enterprise function of the investment promotion system by comprehensively analyzing the push enterprise process and its role collaboration relationship in the investment promotion system, thereby realizing automated testing of the multi-role push enterprise function of the investment promotion system, solving the limitations of existing automated testing methods when facing enterprise-level applications with multi-role and multi-process characteristics, and improving the comprehensiveness and accuracy of the test.

[0047] The storage medium provided in the present application stores a program product that can implement a method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system.

[0048] The method for automated testing of the enterprise push function of multiple roles in the investment promotion system includes: determining all the enterprise push processes in the investment promotion system, and the collaborative relationship between different roles in each push enterprise process; building an automated testing framework for the investment promotion system, and writing test cases for different combinations of push enterprise processes and roles in the investment promotion system based on the automated testing framework; using the automated testing framework to run test cases to test the enterprise push functions of each role in the investment promotion system, and generating a test report.

[0049] In some possible implementations, the method for automated testing of enterprise functions pushed by multiple roles in an investment promotion system disclosed herein can be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above “Exemplary Method” section of this specification according to various exemplary implementations of the present disclosure.

[0050] The storage medium of the present disclosure can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0051] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for automated testing of enterprise functions for multi-role push in investment promotion system, characterized in that: The steps include: S1. Determine all the push enterprise processes in the investment promotion system, as well as the collaborative relationships between different roles in each push enterprise process; S2. Build an automated testing framework for the investment promotion system, and write test cases for different combinations of push enterprise processes and roles in the investment promotion system based on the automated testing framework; S3. Use the automated testing framework to run test cases to test the enterprise push functions of each role in the investment promotion system and generate a test report.

2. The method for automated testing of enterprise functions for multi-role push in investment promotion system according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. Determine different types of push enterprise processes in the investment promotion system; S12. Identify the triggering conditions and push steps for each push enterprise process; S13. Determine the roles corresponding to the push end and the destination end of each push enterprise process; S14. Determine the authority and tasks assigned to each role and the collaborative relationship in pushing enterprise processes.

3. The method for automated testing of enterprise functions for multi-role push in investment promotion system according to claim 1, characterized in that: The specific steps of step S2 are as follows: S21. Build an automated testing environment based on Python programming language and combined with Pytest, Selenium and Allure frameworks; S22. Create a test project in the automated testing environment, create a function folder in the directory of the test project, and install the libraries and tools required for automated testing; S23. Determine all types of combinations of push enterprise processes and roles in the investment promotion system, and program test cases based on the triggering conditions and push steps of the push enterprise processes in each combination.

4. The method for automated testing of enterprise functions for multi-role push in investment promotion system according to claim 3, characterized in that: The specific steps of step S22 are as follows: S221. Create a test project for the push enterprise function of the merchant system in the automated testing environment; S222. Create a test case folder, a page class folder, a public folder, and a test report folder in the test project directory; S223. Install the required browser automation selenium library, pytest test framework, Allure command line tool, and pytest-allure-adapter library in the automated testing environment.

5. The method for automated testing of enterprise functions for multi-role push in investment promotion system according to claim 4, characterized in that: The specific steps of step S23 are as follows: S231. Positioning a type of push enterprise process in the investment promotion system; S232. Identify the role corresponding to the push end and the role corresponding to the destination end of the push enterprise process of the type of positioning; S233. According to the trigger conditions and push steps of the positioning type push enterprise process, simulate the push end role to push the enterprise function to the destination end role, write test cases, set the test case test input method and set the assertion verification test results; S234. Determine whether the type of enterprise process pushed in the investment promotion system has been located; If yes, go to step S235; If not, locate the next type of push enterprise process and return to step S232; S235. Save the written test case to the test case folder.

6. The method for automated testing of enterprise functions for multi-role push in investment promotion system according to claim 5, characterized in that: The specific steps of step S3 are as follows: S31. Use the command line tool or integrated development environment to run the test case and start the automated test of the multi-role enterprise push function of the investment promotion system; S32. Each test case simulates the operation of the push-end role of each push enterprise process of the corresponding type through the page class file, pushes the enterprise to the destination role, and uses assertions to verify whether the push is successful, and whether the destination role uses the page class file to generate a push notification after receiving the push enterprise, and generates a test result; S33. The command line tool collects the test results during the automated testing process and generates a test report to record the use case title, use case description, test results, and failed assertion screenshots.

7. The method for automated testing of enterprise functions of multi-role push in investment promotion system according to claim 6, characterized in that: Before step S31, the following steps are also included: Determine whether there are new types of enterprise push processes; If yes, return to step S23 to add a test case for the new type of enterprise push process and store it in the test case folder; If not, go to step S31.

8. A system for automated testing of enterprise functions for multi-role push in investment promotion system, characterized in that: include: The push process and role coordination relationship determination module is used to determine all push processes in the investment promotion system and the coordination relationship between different roles in each push process; The module for building an automated testing framework and writing test cases is used to build an automated testing framework for the investment promotion system and write test cases for different push processes and role combinations in the investment promotion system based on the automated testing framework. The automated testing module is used to use the automated testing framework to run test cases to test the enterprise push functions of each role in the investment promotion system and generate a test report.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for automated testing of multi-role push enterprise functions of the investment promotion system as described in any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the method for automated testing of multi-role push enterprise functions of the investment promotion system as described in any one of claims 1 to 7 are implemented.