Integrated java all-environment operation test system and test method

Through the integrated Java environment running test system, the virtual machine simulates device environment and log analysis of different configurations, the complexity and time-consuming problems in the Java operation environment are solved, the testing efficiency and accuracy are improved, the cost is reduced and the cost is ensured is ensured. Code security.

CN119201738APending Publication Date: 2024-12-27TIANJIN C E ELECTRICAL AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411362958.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing systematic environmental testing is complex and time-consuming in Java running environment, making it difficult to detect problems in a comprehensive manner, resulting in the software test results not representing the actual deployment situation, and increasing the testing burden and cost of later development.

Method used

Design an integrated Java environment running test system, including virtual machines simulating device environments with different configurations, and implementing classification, storage and analysis of log files through the connection between the main server and the backend server, and simulating various situations to improve testing efficiency.

Benefits of technology

The system simplifies the construction of the test environment and log analysis, improves testing efficiency and accuracy, reduces costs, ensures the security of the code, and avoids the risk of third-party leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201738A_ABST
    Figure CN119201738A_ABST
Patent Text Reader

Abstract

The invention discloses an integrated java all-environment operation test system, which comprises a main server and a background server, and is characterized in that the main server is connected with the background server; a virtual machine is registered in the main server, a plurality of windows personal versions, a 1inux desktop system, a mobile device simulator and an android system are installed on the virtual machine by default, a virtual operating system required by testing is loaded in a mirror image of the virtual machine, CPU and memory resources are simulated and distributed, and a formulated intelligent device operating system is further installed on the virtual machine. Testing in a microprogram or joint application form; the virtual machine operates, checks and monitors logs of the virtual operating system and command line output in the Runtime environment through a specific command line, establishes a project file, and classifies and reserves log files according to projects; the background server is connected with the virtual machine, freely controls a connection port with the main server and sends information, and simulates special conditions for testers to observe problems and phenomena; the background server uploads a background file, and the method further comprises the step of starting the ssh service of the main server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing and verification, and in particular to an integrated Java full-environment operation testing system and a testing method. Background Art

[0002] At present, systematic environment testing is still not adopted by most companies. The main reason is that the construction of the test environment is too cumbersome, takes a lot of time and human resources, and may not be able to effectively detect the problem. Java runs on more than 3 billion devices in a complex environment, including personal computers, commercial servers, smart devices, mobile devices, and widely used service provider firmware systems. Integrating these test environments is almost impossible for development teams that lack time and equipment procurement costs. This makes it difficult to carry out and implement system testing in an environment that meets current software development standards.

[0003] The existing integrated testing system is mainly aimed at "testing the performance of software under different JRE versions", but in commercial applications, JRE version is not the only problem facing software compatibility. Oracle's system customization for some large manufacturers makes the devices of these manufacturers unique in the Java operating environment. In the field of smart devices, especially customized systems in mobile and web environments, there are also widespread cases of custom APIs and rewritten system classes, making it extremely difficult to simulate these environments. In addition, when purchasing multiple platforms for testing, obtaining application layer test logs and output feedback for all platforms is a time-consuming and labor-intensive task that often cannot be completed on time, which causes some problems that will not cause crashes to be ignored. The test results of the software system do not necessarily represent the actual performance after deployment. In this case, it becomes difficult for later developers to obtain relevant vulnerability information and warning logs, so they have to conduct another test, wasting precious production time. Summary of the invention

[0004] The purpose of this application is to provide an integrated Java full environment operation test system and test method to address the technical defects existing in the prior art.

[0005] The technical solution adopted to achieve the purpose of this application is:

[0006] An integrated Java full-environment operation test system includes a main server for simulating a Java operating environment, running all service processes to be tested, and a database, and a background server for deploying background programs and providing background support for Java front-ends that need to be tested, wherein the main server is connected to the background server;

[0007] The main server is registered with a virtual machine, which is installed with multiple Windows personal editions, 1inux desktop systems, mobile device simulators and Android systems by default. The virtual machine image is loaded with the virtual operating system required for the test and simulates the allocation of CPU and memory resources to simulate mobile devices with different configurations. The virtual machine is also installed with a specified smart device operating system, which is tested in the form of a microprogram or a joint application; the virtual machine views and monitors the logs of the virtual operating system and the command line output in the Runtime environment through specific command line operations, and establishes a project archive, and classifies and retains the log files according to the project;

[0008] The background server is connected to the virtual machine, freely controls the connection port and information sent to the main server, and simulates special situations for testers to observe problems and phenomena; the background server uploads background files that define the startup sequence of its own background system, and also includes an ssh service for starting the main server.

[0009] In the above technical solution, the main server is connected to the background server through a router.

[0010] In the above technical solution, the main server is connected to the background server via the wide area network IP.

[0011] In the above technical solution, the data interaction between the main server and the background server is realized through the http protocol.

[0012] In the above technical solution, the log files include two types: front-end logs and back-end logs. The front-end logs are stored on the main server, and the back-end logs are stored on the background server.

[0013] In the above technical solution, both the front-end log and the back-end log are copied through a mobile medium and then viewed.

[0014] An integrated Java full environment running test method includes the following steps:

[0015] Step 1: Make a list of all the programs required for the test according to the test requirements, and register a new virtual machine required for the test on the main server starting from the first test;

[0016] Step 2: Start the background server, package the background files of the program to be tested and upload them to the specified directory of the background server for decompression, find the executable files of all service processes that need to be started in the background, create a new txt document named start, and enter the names of the executable files into the document one by one, using line breaks to separate the names of each executable file;

[0017] Step 3: Enter "systart path / start.t" in the command line of the background server to automatically start the various processes required by the background service in sequence, start the main server through the ssh service on the background server and establish a communication connection with the virtual machine port;

[0018] Step 4, pre-set an image, select a virtual operating system image required for the test from the pre-set images, load it, and start the virtual machine;

[0019] Step 5, installing the packaged file to be tested in the virtual operating system loaded by the image in step 4, and performing a complete alpha test process;

[0020] Step 6: After the alpha test of step 5 is completed, log files are exported from the main server and the background server for analysis. The background server simulates special situations for testers to observe problems and phenomena;

[0021] Step 7, deregister the virtual machine registered for the test, re-register a virtual machine required for the next test, and repeat steps 2 to 6 until the list described in step 1 is completed;

[0022] In step 8, the tester copies the front-end log on the main server and the back-end log on the back-end server through a removable medium, analyzes the front-end log and the back-end log, and debugs the program according to the analysis results.

[0023] The beneficial effects of the present invention are as follows:

[0024] The Java full-environment operation test system of the present invention completely relies on a main server for simulating the Java operating environment and running all service processes and databases to be tested, a background server for deploying background programs and providing background support for the Java front-end that needs to be tested, and an intranet environment, integrating system resources and environments that previously required a lot of time for large teams to integrate and that small teams did not have the ability and resources to integrate, thereby providing environmental guarantees for development and testing work; and focusing on improving the efficiency and accuracy of the development team in the testing link, reducing the cost and time previously required to achieve the same effect; because the Java full-environment operation test system of the present invention can be locally deployed, while providing a comprehensive test environment, it can also ensure the security of the code, thereby avoiding the leakage problem that may occur when handing over the testing work to a third party organization. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 This is a diagram of the Java full environment running test system architecture of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described below in conjunction with specific embodiments.

[0028] An integrated Java full environment running test system, see Figure 1 , including a main server for simulating the Java operating environment, running all the service processes to be tested, and a database, and a background server for deploying background programs and providing background support for the Java front end to be tested, the main server is connected to the background server through a router (or a wide area network IP). The data interaction between the main server and the background server is realized through the http protocol (or the communication protocol authorization established by the main server and the background server). The main server of this embodiment adopts Windows Server, which can make the installation of different environments more convenient and reduce the workload of testers.

[0029] The main server is registered with a virtual machine for uploading the packaged files of the program to be tested; the virtual machine is installed with a variety of Windows personal versions, Linux desktop systems, mobile device simulators and Android systems by default, and the virtual machine image is loaded with the virtual operating system required for the test (the public version system of a specific manufacturer) and simulates the allocation of CPU and memory resources to simulate mobile devices with different configurations. The virtual machine is also installed with a formulated smart device operating system or only installs firmware, and is tested in the form of microprograms or joint applications. The virtual machine uses specific command line operations to view and monitor the logs of the virtual operating system and the command line output under the Runtime environment, and establishes a project archive, classifies and retains the log files according to the project, ensures that the exported logs are accurate and timely, and facilitates testers to find problems. Among them, the log files include two types: front-end logs and back-end logs. The front-end logs are stored on the main server, and the back-end logs are stored on the background server. Both the front-end logs and the back-end logs can be viewed after being copied through removable media.

[0030] The backend server is connected to the virtual machine, freely controls the connection port and information sent to the main server, and simulates special situations (the special situations include communication interruption and message errors) for testers to observe problems and phenomena. The backend server uploads a background file that defines the startup sequence of its own backend system, and also includes an ssh service for starting the main server. The backend server uses the Linux system.

[0031] An integrated Java full environment running test method includes the following steps:

[0032] Step 1: Make a list of all the programs required for the test according to the test requirements. Starting from the first test, register a new virtual machine required for the test on the main server.

[0033] Step 2: Start the background server, package the background files of the program to be tested and upload them to the specified directory of the background server for decompression, find the executable files of all service processes that need to be started in the background, create a new txt document named start, and enter the names of the executable files into the document one by one, using line breaks to separate the names of each executable file.

[0034] Step 3: Enter "systart path / start.t" in the command line of the background server to automatically start the various processes required by the background service in sequence, start the main server through the ssh service on the background server and establish a communication connection with the virtual machine port.

[0035] Step 4: pre-set an image, select a virtual operating system image required for the test from the pre-set images, load it, and start the virtual machine.

[0036] Step 5: Install the packaged file to be tested in the virtual operating system loaded by the image in step 4 to perform a complete alpha test process.

[0037] Step 6: After the alpha test of step 5 is completed, log files are exported from the main server and the background server for analysis. The background server simulates special situations for testers to observe problems and phenomena.

[0038] Step 7, deregister the virtual machine registered for the test, re-register a virtual machine required for the next test, and repeat steps 2 to 6 until the list described in step 1 is completed.

[0039] In step 8, the tester copies the front-end log on the main server and the back-end log on the back-end server through a removable medium, analyzes the front-end log and the back-end log, and debugs the program according to the analysis results.

[0040] The Java full-environment operation test method based on this embodiment can collect information according to the running status of the program to be tested in different JREs, different command sets, different office systems or customized systems, and can realize timely discovery, timely verification and timely repair of problems.

[0041] The above is only a preferred embodiment of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An integrated Java full environment operation test system, characterized in that: It includes a main server for simulating the Java operating environment, running all service processes to be tested, and a database, and a backend server for deploying backend programs and providing backend support for the Java frontend to be tested, wherein the main server is connected to the backend server; The main server is registered with a virtual machine, which is installed with multiple Windows personal editions, 1inux desktop systems, mobile device simulators and Android systems by default. The virtual machine image is loaded with the virtual operating system required for the test and simulates the allocation of CPU and memory resources to simulate mobile devices with different configurations. The virtual machine is also installed with a specified smart device operating system, which is tested in the form of a microprogram or a joint application; the virtual machine views and monitors the logs of the virtual operating system and the command line output in the Runtime environment through specific command line operations, and establishes a project archive, and classifies and retains the log files according to the project; The backend server is connected to the virtual machine, freely controls the connection port and information sent to the main server, and simulates special situations for testers to observe problems and phenomena; The background server uploads a background file defining the startup sequence of its own background system, and also includes an ssh service for starting the main server.

2. The Java full environment operation test system according to claim 1 is characterized in that: The main server is connected to the backend server via a router.

3. The Java full environment operation test system according to claim 1 is characterized in that: The main server is connected to the backend server via the WAN IP.

4. The Java full environment operation test system according to claim 1, characterized in that: The data interaction between the main server and the backend server is achieved through the http protocol.

5. The Java full environment operation test system according to claim 1, characterized in that: The log files include two types: front-end logs and back-end logs. The front-end logs are stored on the main server, and the back-end logs are stored on the background server.

6. The Java full environment operation test system according to claim 1, characterized in that: The front-end log and the back-end log are both copied through mobile media and then viewed.

7. A testing method based on the Java full environment operation testing system according to claims 1-6, characterized in that: The following steps are involved: Step 1: Make a list of all the programs required for the test according to the test requirements, and register a new virtual machine required for the test on the main server starting from the first test; Step 2: Start the background server, package the background files of the program to be tested and upload them to the specified directory of the background server for decompression, find the executable files of all service processes that need to be started in the background, create a new txt document named start, and enter the names of the executable files into the document one by one, using line breaks to separate the names of each executable file; Step 3: Enter "systart path / start.t" in the command line of the background server to automatically start the various processes required by the background service in sequence, start the main server through the ssh service on the background server and establish a communication connection with the virtual machine port; Step 4, pre-set an image, select a virtual operating system image required for the test from the pre-set images, load it, and start the virtual machine; Step 5, installing the packaged file to be tested in the virtual operating system loaded by the image in step 4, and performing a complete alpha test process; Step 6: After the alpha test of step 5 is completed, log files are exported from the main server and the background server for analysis. The background server simulates special situations for testers to observe problems and phenomena; Step 7, deregister the virtual machine registered for the test, re-register a virtual machine required for the next test, and repeat steps 2 to 6 until the list described in step 1 is completed; In step 8, the tester copies the front-end log on the main server and the back-end log on the back-end server through a removable medium, analyzes the front-end log and the back-end log, and debugs the program according to the analysis results.