Process automation testing for low-code platforms

With the rapid development of low-code platforms, developers can easily and quickly develop process applications. Due to the complexity of business processes and changing business requirements, business processes will be optimized and improved more frequently. In this process, It is required that the efficiency and quality of enterprise process testing need to keep up with the speed and change frequency of low-code process development, allowing testers to quickly discover problems in the process, enabling developers to adjust and optimize in a timely manner, and helping enterprises to be faster and more accurate Conduct process testing in a timely manner to improve the efficiency and quality of business process configuration.

How to realize the automatic generation of use cases through the low-code platform's own capabilities without relying on test scripts; how to intelligently complete the automatic adjustment of use cases when the process changes are the key issues to realize the automated testing of the process platform.

Existing general automated testing usually adopts the technical scheme of writing test scripts. Test scripts are used to simulate the operations performed by users in the application to verify the functions and performance of the application. Need to manually modify the use case, the difficulties are as follows:

High writing threshold: Test script writing requires professional skills and knowledge, basic knowledge of programming languages ​​and proficient writing skills, which may be difficult for non-technical personnel to master.

  • High writing cost: Writing automated test scripts requires a lot of time and energy, and requires multiple steps such as test scenario analysis, test script writing, and debugging, and the writing process is cumbersome.
  • High maintenance cost: With the version upgrade of the application program, changes in business requirements, etc., especially in the case of frequent changes in business processes, test cases need to be continuously modified and adjusted, which requires more time and energy, and consumes a lot of time. time and energy.

Especially in the process platform, the process verification is more complicated. In the process construction stage, it is necessary to verify the accuracy of the form, gateway, and approval authority configuration. Complex processes need to frequently switch between the configuration state and the running state, and frequently switch the job number. It is necessary to write There is a large amount of use case data, and there are many test data in complex process scenarios. Updating applications often requires process regression testing, which involves a lot of repetitive work and is time-consuming and laborious.

Haojing Lingxi development platform is a low-code platform independently developed by Haojing Technology. This article introduces the process automation testing of the low-code platform based on the Lingxi platform , including automatic generation of process robustness test cases, auxiliary batch generation of business process scenario test cases, and simulation Multi-user login and simulated entry of form data, driving the automatic flow of the process, and judging whether it meets expectations; providing complete tool and method support, including automatic generation of use cases, distribution of test cases, test plans, execution of test plans, automatic generation of test reports, etc.; pass the test Plan to execute in batches, reduce testing costs, and improve the efficiency of business loading and launching.

The automated testing of the process platform automates and visualizes the orchestration process of test cases on the process platform. When the process changes, it can automatically adjust the corresponding test cases to improve the efficiency and accuracy of test case orchestration. The process of automated testing includes the following steps:

  • Step 1: Automatically create process robustness test cases to verify the correctness of the process platform itself. Such test cases are completely automatically generated by the system;
  • Step 2: Traverse all possible flow directions of the process, automatically generate all test paths of the process, and generate the first draft of business scenario test cases to verify the business correctness of process flow.
  • Step 3: In the use case generated by the above steps, the key business data of the process flow still needs to be filled in manually. For example, in the process of reimbursement approval, the threshold for judging expenses needs to be assigned to leaders at different levels for approval. The expenses here are key business data and need to be filled in manually. , complete the test case.
  • Step 4: Configure the test plan, associate the business scenario test cases and robustness test cases generated in the above steps, and configure the plan for automatic execution.
  • Step 5: Automate the execution of the test plan.
  • Step 6: Automatically generate test reports.
  • Step 7: Through the automatic monitoring of process changes, automatically identify the test cases that need to be adjusted, the scope of influence, and the difference content, and automatically adjust the corresponding test cases.

Before explaining the above steps in detail, let's agree on a few concepts:

"Scenario" : Every possible branch of the process is a scenario.

"Preset scene" : After the process is activated, all branches of the process will be calculated in the background, and each branch direction will generate a preset scene to represent each possible direction of the process.

"Robustness test" : The test process can be initiated normally and the flow of each link is normal, which is used to verify the correctness of the function of the process platform itself.

"Business scenario test" : process simulation business scenario test with key business data required for process flow.

"Preset use case" : the test case used in the process robustness test, all the form data is generated by the background simulation.

"Custom use case" : the test case used by the process business scenario test, and the key form data is configured by the user.

After having the above concepts, let’s take a look at the flow chart below, which is an expansion of the aforementioned steps and explains the relationship between the steps.

Automatically generate preset scenarios and robustness tests

Manually do process testing, the process is very cumbersome, mainly reflected in:

It is necessary to frequently switch between different test accounts to simulate the operation and processing of process links by different processors;

It is necessary to test all branch scenarios of the process, and the complexity of the test increases exponentially with the number of gateways, resulting in a large number of cumbersome and repetitive operations;

When upgrading the on-site version, it is necessary to ensure the continuity of the process first, and then ensure the accuracy of each process branch scene. The entire process test takes too long.

The core point of the above problem is how to automatically generate preset scenes. The advantage of the Haojing Lingxi development platform is that it has its own analysis engine and corresponding DSL definition language . If you can simulate the analysis engine and analyze the process DSL, you can know the whole process and each step, so as to deduce all the branch directions of the process, and automatically save each possible branch direction and its process nodes, so that the prediction is realized. Automatic generation of configuration scenarios.

Now let’s look at the effect of the two preset scenarios that are automatically generated in the simple approval process of expense reimbursement. After the employee submits the reimbursement form, it will be approved by the project manager first, and then by the financial approval. If the financial approval is passed, it will be completed. If the financial approval is not passed, it will be called back. The project manager will review again. The screenshots of the automatically generated 2 preset scenes are as follows:

Click the "Pre-flow" button in the upper right corner to present the process of process flow in the form of animation. The above is the automatic generation and visual presentation of the robustness test.

The automatic generation and automatic circulation of the robustness test, without business data, is mainly to verify the correctness of the process platform's own functions. Robustness testing can be used when:

  • After the new process configuration is completed, use the robustness test to verify whether the basic functions of the platform can run through;
  • After the version is upgraded, do a robustness test on the original process to verify the adaptability of the process engine and the original process configuration.

Business scenario testing and rapid generation of custom use cases

In traditional automated testing, it is necessary to configure test scripts for different business scenarios and frequently switch job numbers to complete a complete business scenario test, which is a cumbersome process.

In the Haojing Lingxi development platform, it is also possible to analyze the DSL of the process platform, and analyze the key business data on the basis of preset scenarios. At the same time, providing a visual custom use case configuration interface allows process configurators to quickly generate custom use cases in batches. Different from the fully automatic generation of preset use cases, custom use cases are semi-automatic generation.

What data is key data? After analyzing the process configuration data, the core data that affects process flow are the conditions configured in various "gateways", and these fields are parsed from the process configuration. The platform first automatically generates the first draft of the custom use case, including processes and nodes, and then provides a visual interface for manually filling in these key fields. After these fields are completed, the automatic flow test of the business scenario can be realized. In the automatic transfer test, a full-role matching scheme was used to avoid frequent switching of job numbers.

As shown in the figure, in this example, a marketing activity planning and approval process scenario is designed. When the cost is <500, the marketing activity director can approve it. When the cost is >=500, the marketing director needs to approve it. In the automatic process test interface, the system has pre-generated the process flow diagram of the use case. The operator only needs to fill in the key business data of "marketing activity cost" in the interface, and the entire use case can complete the automatic test.

Monitor process changes and automatically adjust use cases

When the process configuration changes, the usual practice is to manually analyze the impact of the use case, and then manually adjust the configuration of the test case. Each branch must be fully considered, which is complicated and easy to miss.

To solve this problem, the Haojing Lingxi development platform realizes automatic monitoring of process version changes, and at the same time, automatically adjusts test cases according to the changed content. The implementation plan is roughly as follows:

  • The background monitors the change of the process version. When a change occurs, the test case associated with the current process version is notified to automatically perform a test case adjustment that adapts to the content of the new process version.
  • After receiving the notification request for automatic adjustment, obtain the definitions of the old and new process versions, and convert the process definitions of the old and new process versions into directed acyclic graphs based on the process difference analysis algorithm, perform topological sorting respectively, and obtain the topological sequence of nodes. For each node, compare whether the in-degree and out-degree of the node are the same, and if they are different, identify it as a suspected difference node. Then calculate the predecessor node and successor node set of each suspected difference node in the old and new versions, and compare their differences. If there is a difference in the predecessor node set or the successor node set, it is determined that the node has a difference. Record the location of the confirmation difference node and the difference content.
  • According to the difference content, the program automatically modifies the original test case and generates a new test case.
  • Check the automatically adjusted test cases, including process test path reachability check and process data integrity check. If the check is passed, pre-execution detection is performed. If the pre-execution is successful, the automatic adjustment of the test case is completed; if the automatically adjusted test case check fails, or the pre-execution fails, the test case is set to invalid, and the tester is notified to perform manual inspection and maintenance. Adjust and optimize in time until the pre-execution of the test case is successful and the effective state is restored.

To sum up, the Haojing Lingxi development platform provides the robustness automation test of the process, and the process center automatically simulates the form data to complete the penetration test of the whole branch scene of the process; it provides the business scene test of the process, which is customized by the user Form data of various branch scenarios, and then the process center completes the accuracy test of various branch scenarios of the process; it can also automatically monitor changes in process versions and automatically adjust test cases.

Guess you like

Origin blog.csdn.net/whalecloud/article/details/131643835