Virtual scene test method and device, electronic equipment and storage medium
By freezing the virtual scene and performing image comparison, the inaccuracy and subjectivity of virtual scene testing are solved, and an automated and rapid testing method is achieved.
Patent Information
- Application Number
- CN202410308860.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2025-09-23
AI Technical Summary
In the existing technology, manual testing of virtual scenes is inaccurate, incomplete, takes a long time, and the results are subjective, making it difficult to discover detailed problems in the scene and shorten the testing time.
By freezing the virtual scene, collecting screenshots of different versions of the scene, and determining the test results through image comparison, automated testing is achieved.
It achieves more comprehensive and accurate testing, reduces the workload of testers and shortens testing time.
Smart Images

Figure CN120687351A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a method, device, electronic device and storage medium for testing a virtual scene. Background Art
[0002] The Metaverse refers to the fact that every person in the real world has a networked avatar within it. As the Metaverse continues to grow in size and complexity, every scene change presents challenges for game developers. Promptly identifying scene issues significantly reduces manual effort, effectively improving Metaverse stability and enhancing the user experience.
[0003] In order to discover problems with the virtual scene, the modified virtual scene needs to be tested. In the prior art, a tester plays around the scene and identifies problems in the scene with the naked eye.
[0004] However, it is difficult to detect problems in scene details with the naked eye, and there is a possibility of missing problems. In addition, there are a large number of virtual scenes, and naked eye testing will greatly extend the test time. In addition, due to the lack of effect standards, the effect problems of some virtual scenes are subjective. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide a virtual scene testing method, device, electronic device and storage medium to solve the problems in the prior art of inaccurate and incomplete manual testing of virtual scenes, long testing time and subjective test results.
[0006] In a first aspect, an embodiment of the present application provides a method for testing a virtual scene, comprising:
[0007] Freezing the first version of the virtual scene to obtain a first frozen virtual scene, and collecting a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene;
[0008] Freezing the second version of the virtual scene to obtain a second frozen virtual scene, and collecting a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game;
[0009] A test result of the second version relative to the first version is determined according to the first scene screenshot of each test point and the second scene screenshot of each test point.
[0010] In a second aspect, an embodiment of the present application further provides a virtual scene testing device, wherein:
[0011] a first acquisition module, configured to freeze the first version of the virtual scene to obtain a first frozen virtual scene, and acquire a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene;
[0012] a second acquisition module, configured to freeze the second version of the virtual scene to obtain a second frozen virtual scene, and acquire a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game;
[0013] The determination module is used to determine the test result of the second version relative to the first version based on the first scene screenshot of each test point and the second scene screenshot of each test point.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of a virtual scene testing method as described in any one of the first aspects.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a virtual scene testing method as described in any one of the first aspects are executed.
[0016] The present application freezes the first version of the virtual scene and the second version of the virtual scene, so that the scene resources in different versions of the virtual scene can be kept in the same state, thereby avoiding the influence of different states of the virtual scene on subsequent image comparison. By collecting the first scene screenshot and the second scene screenshot at the test points in the first frozen virtual scene and the second frozen virtual scene, the influence of different image collection positions on the subsequent automatic comparison of images can be avoided, and the screenshots of different versions at the same test point can also more accurately characterize the differences between the second version of the game and the first version of the game. The present application freezes the scene to take screenshots of different versions of the virtual scene, and performs image comparison on the screenshots of different versions of the scene to perform automated testing of different game versions. Compared with traditional testing methods, the present application is more comprehensive and accurate, greatly reduces the workload of testers, and shortens the overall testing time.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic diagram showing an application scenario provided by an embodiment of the present application is shown;
[0020] Figure 2 A flowchart of a virtual scene testing method provided in an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram of a test point provided in an embodiment of the present application is shown;
[0022] Figure 4 A flowchart of a freezing process provided by an embodiment of the present application is shown;
[0023] Figure 5 A specific flowchart of freezing processing provided by an embodiment of the present application is shown;
[0024] Figure 6 A flowchart of obtaining a first scene screenshot provided by an embodiment of the present application is shown;
[0025] Figure 7 A flow chart for determining a test result provided by an embodiment of the present application is shown;
[0026] Figure 8 A flowchart of determining difference information of scene screenshots provided by an embodiment of the present application is shown;
[0027] Figure 9 A schematic diagram showing test results of a test point provided by an embodiment of the present application;
[0028] Figure 10 The following is an overall flow chart of a virtual scene testing method provided by an embodiment of the present application;
[0029] Figure 11 A schematic structural diagram of a virtual scene testing device provided in an embodiment of the present application is shown;
[0030] Figure 12 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0032] In one embodiment of the present disclosure, the virtual scene testing method can be run on a local terminal device or a server. When the virtual scene testing method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0033] In an optional embodiment, various cloud applications, such as cloud gaming, can be run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the operating body of the game program and the main body presenting the game screen are separated. The storage and operation of the virtual scene testing method are completed on the cloud gaming server. The client device is used to receive and send data and present the game screen. For example, the client device can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, PDA, etc.; however, it is the cloud gaming server in the cloud that performs information processing. When playing the game, the player operates the client device to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device via the network. Finally, the client device decodes and outputs the game screen.
[0034] In an alternative embodiment, taking a game as an example, a local terminal device stores a game program and is used to present the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), that is, conventionally downloading and installing the game program through an electronic device and running it. The local terminal device can provide the GUI to the player in a variety of ways, for example, it can be rendered and displayed on the terminal's display screen, or provided to the player through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present the GUI, the GUI including the game screen, and the processor is used to run the game, generate the GUI, and control the display of the GUI on the display screen.
[0035] In one possible implementation, an embodiment of the present invention provides a method for testing a virtual scene, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or the client device in the cloud interaction system mentioned above.
[0036] After a game version is upgraded, in order to improve the stability of the virtual scene, it is usually necessary to test the game to discover abnormal problems in the virtual scene, such as changes beyond the modification in the modified scene.
[0037] The most commonly used solution at present is for testers to play in the venue before and after the modification, and compare the scene resources to find problems in the scene.
[0038] However, it is difficult for the naked eye to detect the details in the scene, and there is a possibility of missing problems. Moreover, as the game continues to update, the number of virtual scenes increases, and the naked eye test will greatly extend the test time. In addition, due to the lack of effect standards, the effect of some virtual scenes is subjective.
[0039] Based on this, the present application proposes a virtual scene testing method, which realizes automated testing of the game by freezing the virtual scene, capturing the virtual scene before and after modification at the test points in the virtual scene, and comparing the captured scenes. It can also comprehensively and accurately discover abnormal problems before and after modification, while greatly reducing the workload of testers and shortening the testing time.
[0040] like Figure 1 As shown, it is a schematic diagram of an application scenario. The first version is version A, and the modified second version is version B. Testers can freeze and screenshot the scenes of version A and version B respectively based on the method of this application, and compare the screenshots to obtain the test results of version B compared with version A.
[0041] During this process, the electronic device may also save screenshots of version A and version B to the cloud, and the cloud device may determine the test results of version B compared to version A based on the screenshots of version A and version B.
[0042] Next, combine Figure 2 , the test method of the virtual scene of this application is described, such as Figure 2 As shown, the method includes:
[0043] S201 : Freeze the first version of the virtual scene to obtain a first frozen virtual scene, and collect a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene according to position information of each test point in the first version of the virtual scene.
[0044] Optionally, the first version may be a game version before modification, the freeze instruction may keep scene resources in the virtual scene in an initialized state, and the first frozen scene may be a virtual scene of the first version in which all scene resources are kept in an initialized state.
[0045] In the initialization state, all scene resources in the scene may be stationary. For example, the scene resources may include: virtual objects in the scene, animations and special effects in the scene, and materials in the scene.
[0046] Optionally, the test point can be a specific position pre-marked in the virtual scene, and the position information of the test point can be the coordinate position of the test point in the virtual scene. The coordinate position can be represented by a Vector3 vector, which contains three elements, representing the coordinate values on the x, y, and z axes respectively.
[0047] Optionally, the multiple first scene screenshots corresponding to the test point may be virtual scene screenshots of the first frozen virtual scene in various directions under the viewing angle of the test point.
[0048] S202: Freeze the second version of the virtual scene to obtain a second frozen virtual scene, and collect multiple second scene screenshots corresponding to each test point in the second frozen virtual scene based on the position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game.
[0049] Optionally, the second version may be a game version modified from the first version, and the second frozen scene may be a virtual scene of the second version in which all scene resources are kept in an initialized state.
[0050] The target game can be any game that needs to test the difference information before and after the modification.
[0051] It should be noted that the position information of the test point in the first version of the virtual scene may be the same as the position information of the test point in the second version of the virtual scene.
[0052] The plurality of second scene screenshots corresponding to the test point may be virtual scene screenshots of the second frozen virtual scene in various directions from the perspective of the test point.
[0053] like Figure 3 As shown, it is a schematic diagram of the test points in a virtual scene. The test points can include eight directions. For each direction, a scene screenshot can be collected separately. At this time, the test points correspond to the eight first scene screenshots of the eight directions.
[0054] Before entering the first version of the game, testers can issue a freeze command through the graphical user interface to keep the scene resources in the virtual scene in an initialized state. Then, they can use the virtual camera in the Unity game engine to capture screenshots of the first scene at various test points. Before entering the second version of the game, testers can also use the same method to capture screenshots of the second scene at various test points.
[0055] S203: Determine a test result of the second version relative to the first version based on the first scene screenshot of each test point and the second scene screenshot of each test point.
[0056] The test result may represent difference information in the virtual scene between the second version and the first version, such as color difference, position difference, or size difference of scene resources in the virtual scene.
[0057] For example, in this application, the test results of each test point can be determined by taking the first scene screenshot and the second scene screenshot from each perspective of the same test point, and the test result of the second version relative to the first version can be determined based on the test results of all test points. For example, the first scene screenshot and the second scene screenshot from each perspective of test point A can be compared to determine the test result of the second version relative to the first version of test point A.
[0058] In an embodiment of the present application, in response to a freeze instruction for a first version of a virtual scene, the first version of the virtual scene is frozen to obtain a first frozen virtual scene, and based on the position information of each test point in the first version of the virtual scene, multiple first scene screenshots corresponding to each test point in the first frozen virtual scene are collected. In response to a freeze instruction for a second version of the virtual scene, the second version of the virtual scene is frozen to obtain a second frozen virtual scene, and based on the position information of each test point in the second version of the virtual scene, multiple second scene screenshots corresponding to each test point in the second frozen virtual scene are collected, wherein the first version and the second version are different versions of the target game, and based on the multiple first scene screenshots and the multiple second scene screenshots, the test result of the second version relative to the first version is determined.
[0059] By freezing the first version of the virtual scene and the second version of the virtual scene, the scene resources in the different versions of the virtual scene can be kept in the same state, avoiding the impact of different states of the virtual scene on subsequent image comparison. By collecting the first scene screenshot and the second scene screenshot at the test points in the first frozen virtual scene and the second frozen virtual scene, the impact of different image collection positions on the subsequent automatic comparison of images can be avoided, and the screenshots of different versions at the same test point can also more accurately characterize the differences between the second version of the game and the first version of the game. The present application freezes the scene to take screenshots of different versions of the virtual scene, and performs image comparison on the screenshots of different versions of the scene to perform automated testing of different game versions. Compared with traditional testing methods, it is more comprehensive and accurate, greatly reduces the workload of testers, and shortens the overall testing time.
[0060] Next, the steps of freezing the first version of the virtual scene to obtain the first frozen virtual scene are described. Figure 4 As shown, the above step S201 includes:
[0061] S401: Acquire scene resources in a first version of a virtual scene, where the scene resources include at least one of the following: special effects, animations, and dynamic materials.
[0062] Optionally, the scene resources may be dynamic resources that change over time or in response to player operation instructions in the virtual scene, such as animations, special effects, dynamic materials, etc. in the virtual scene.
[0063] S402: Freeze the scene resources in the first version of the virtual scene to obtain a first frozen virtual scene.
[0064] After determining the scene resources in the first version of the virtual scene, the scene resources may be frozen so that all scene resources are in an initialized state, and the first version of the virtual scene with frozen scene resources is used as the first frozen virtual scene.
[0065] The following is a further explanation of the freezing process of the scene resources in the first version of the virtual scene. Figure 5 As shown, the above step S402 includes:
[0066] S501: Modify the states of the nodes corresponding to the special effects and the nodes corresponding to the animations to be closed, so that the special effects and the animations are in a frozen state.
[0067] It should be noted that all objects in the virtual scene can be stored in the form of a scene tree, and each node in the scene tree corresponds to an object in the virtual scene.
[0068] When obtaining the animation and special effects in the first version of the virtual scene, you can traverse the scene tree corresponding to the first version of the virtual scene, determine the nodes corresponding to the special effects and the nodes corresponding to the animation in the scene tree, and modify the node states of the nodes corresponding to the special effects and the nodes corresponding to the animation to the closed state. In the closed state, the special effects and animation will remain stationary, that is, the special effects and animation are in a frozen state.
[0069] S502: Modify the time information of the dynamic material to a preset value, so that each dynamic material is in a frozen state.
[0070] It should be noted that the changes of dynamic materials in the virtual scene can be controlled by a unified time attribute. When the dynamic materials in the virtual scene need to be frozen, the time information of the time attribute can be modified to the preset value, stopping the passage of time in Unity, thereby pausing the playback of the dynamic material.
[0071] The preset value may be 0. By modifying the time information to 0, all dynamic materials in the virtual scene may be set to the first frame state.
[0072] It should be understood that the step of freezing the second version of the virtual scene may be the same as the process of freezing the first version of the virtual scene in the above steps S401-S402, and will not be described in detail in this application.
[0073] After obtaining the first frozen scene, the present application may collect a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene according to the position information of each test point in the first version of the virtual scene, such as Figure 6 As shown, the above step S201 includes:
[0074] S601: Move the virtual camera to the location of the test point.
[0075] Optionally, a virtual camera is a component in a game engine that is used to render a scene. It defines the position, direction, and field of view of the scene, as well as how to render the scene.
[0076] In this application, the number of the first scene screenshots is the same as the number of directions of the virtual camera, and the field of view of the virtual camera determines the range of the first scene screenshots.
[0077] S602: Control a virtual camera to shoot a virtual scene according to at least one preset shooting direction, and obtain a plurality of first scene screenshots corresponding to each shooting direction of the test point.
[0078] As a possible implementation method, the game engine can create a virtual camera in the virtual scene, and after entering the first version of the game, control the virtual camera to move to each test point in turn, and collect screenshots of the first scene from each perspective of each test point.
[0079] As another possible implementation, the game engine may also create virtual cameras at each test point in the virtual scene, and after entering the first version of the game, use each virtual camera to collect screenshots of the first scene from each perspective of the test point. The specific collection method is not limited in this application.
[0080] Furthermore, in step S602, the virtual camera is controlled to shoot the virtual scene according to at least one preset shooting direction to obtain a plurality of first scene screenshots corresponding to the test points, including:
[0081] According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain the first scene screenshot in each shooting direction of the test point.
[0082] Among them, the shooting direction can be the direction in which the virtual camera observes in the scene. The number of shooting directions can be determined by the tester based on actual needs, and this application does not impose any restrictions here.
[0083] As a possible implementation method, the orientation of the virtual camera at the test point can be adjusted in sequence according to a preset order, the orientation of the virtual camera can be adjusted to the shooting direction, and based on the position coordinates of the virtual camera, the current position coordinates and the virtual scene within the current field of view can be screenshoted to obtain the first scene screenshot in each shooting direction of the test point.
[0084] The preset order of adjusting the directions of the virtual cameras may be the same, so that the first scene screenshots of the various directions can be distinguished.
[0085] As another possible implementation, orientation identifiers may be added to the first scene screenshots of each shooting direction of the virtual camera at the test point to distinguish the first scene screenshots in different orientations.
[0086] It is worth noting that the method of collecting multiple second scene screenshots corresponding to each test point in the second frozen virtual scene can be the same as the above steps S601-S602, which will not be described in detail in this application.
[0087] When collecting the second scene screenshots, the same method as collecting the first scene screenshots can also be used. Specifically, based on the position information of each test point in the second version of the virtual scene, the step of collecting multiple second scene screenshots corresponding to each test point in the second frozen virtual scene includes:
[0088] Move the virtual camera to the location of the test point.
[0089] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of second scene screenshots corresponding to the shooting directions of the test points.
[0090] After entering the second version of the virtual scene, the virtual camera can be controlled to shoot at each test point in the same manner as in steps S601-S602 above, obtaining multiple second scene screenshots corresponding to each shooting direction of the test point. The specific process is not described in detail in this application.
[0091] As a possible implementation, the step of controlling the virtual camera to shoot the virtual scene according to at least one preset shooting direction to obtain multiple second scene screenshots corresponding to each shooting direction of the test point includes:
[0092] According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain a second scene screenshot in each shooting direction of the test point.
[0093] When capturing the first scene screenshot and the second scene screenshot, the order of the test points that the virtual camera passes through and the order of its orientation at the test points can be the same. Therefore, when executing the above step S203, the nth first scene screenshot and the nth second scene screenshot can be compared to obtain a comparison result.
[0094] In the second implementation method, test point identifiers and perspective identifiers can also be added to the first scene screenshot and the second scene screenshot. Therefore, when executing the above step S203, the first scene screenshot and the second scene screenshot with the same test point identifier and the same perspective identifier can be compared to obtain a comparison result.
[0095] Next, the step of generating the test points before collecting a plurality of first scene screenshots corresponding to the test points in the first frozen virtual scene based on the position information of the test points in the first version of the virtual scene is described. This step includes:
[0096] In response to the point configuration information, a plurality of test points in the virtual scene of the target game are generated, where the point configuration information includes: a point position coordinate range and / or the number of points.
[0097] Optionally, the point configuration information includes a point position coordinate range and / or the number of points.
[0098] Among them, the point position coordinate range includes the point position coordinate range in the three directions of x, y, and z axes in three-dimensional space, which is used to indicate the minimum coordinate value and maximum coordinate value of the test points generated in the three directions of x, y, and z axes. The number of points can include the number of points in the three directions of x, y, and z axes, which is used to indicate the number of test points generated in the three directions of x, y, and z axes.
[0099] In the first implementation method, when a partial area in a virtual scene needs to be tested, the tester can pre-configure the point location coordinate range and the number of test points to be generated to generate multiple test points in the area to be tested.
[0100] In the second implementation, when all areas in the virtual scene need to be tested, the tester can configure the number of points to generate test points in the entire virtual scene.
[0101] After generating multiple test points in the virtual scene of the target game, if the positions of the test points need to be adjusted, the present application can also perform secondary editing on the test points. This step also includes:
[0102] In response to the point modification instruction, the modified position coordinates corresponding to the test point are determined, and the modified position coordinates are used as the position coordinates of the test point.
[0103] As a possible implementation method, the tester can modify the position of the test point by dragging the camera point. At this time, the end point of the drag can be used as the modified position coordinate corresponding to the test point, and the modified position coordinate can be used as the coordinate of the test point.
[0104] As another possible implementation, the coordinates of the test point may be directly modified to obtain modified position coordinates.
[0105] Next, the steps of determining the test results of the second version relative to the first version based on the plurality of first scenario screenshots and the plurality of second scenario screenshots are described. Figure 7 As shown, the above step S203 includes:
[0106] S701: Determine the image difference between the first scene screenshot and the second scene screenshot at each test point based on a preset image comparison strategy.
[0107] Optionally, the image difference may be the degree of image difference between the first scene screenshot and the second scene screenshot at the same test point and in the same shooting direction.
[0108] Among them, the preset image comparison strategy can be a mean-square error (MSE) algorithm, a structural similarity (SSIM) algorithm, or other image similarity calculation algorithms, such as a histogram-based similarity algorithm or a deep learning-based similarity calculation.
[0109] For example, the MSE algorithm and the SSIM algorithm can be used to perform image comparison on the first scene screenshot and the second scene screenshot of each test point to obtain the difference items on the images of the first scene screenshot and the second scene screenshot of each test point, and the MSE value and the SSIM value are obtained respectively to characterize the degree of difference between the first scene screenshot and the second scene screenshot.
[0110] The MSE algorithm determines the difference in pixel values between the first and second scene screenshots. The SSIM algorithm considers not only the difference between pixel values but also their position within the image structure. Therefore, the MSE and SSIM values can comprehensively characterize the degree of difference between the first and second scene screenshots.
[0111] It should be noted that the same test point includes multiple shooting directions, and each shooting direction includes a first scene screenshot and a second scene screenshot. Therefore, based on the preset image comparison strategy, the image difference in each shooting direction can be determined, and the image difference of the test point can be a collection of image differences in each shooting direction.
[0112] S702: Determine the test result of each test point according to the image difference of each test point and a preset comparison threshold.
[0113] Optionally, if the image difference in any shooting direction of the test point exceeds a preset comparison threshold, it indicates that there is an abnormality at the point. At this time, the first scene screenshot and the second scene screenshot in the shooting direction of the test point with the abnormality can be further compared to determine the test result of the test point.
[0114] S703: Determine the test result of the second version relative to the first version based on the test results of each test point.
[0115] After the test results of all test points are determined based on the above steps S701 - S702 , the test results of all test points may be combined and a test report may be generated to obtain the test results of the second version relative to the first version.
[0116] The test report may include the first scene screenshot, the second scene screenshot, and the difference positions between the first scene screenshot and the second scene screenshot for each test point where there are differences.
[0117] Furthermore, in the above step S702, the test results of each test point are determined based on the image difference of each test point and a preset comparison threshold, including:
[0118] If the image difference value of the test point is greater than the comparison threshold, the difference information is determined according to the image comparison result of the test point.
[0119] Optionally, the image comparison result may be a difference image between the first scene screenshot and the second scene screenshot.
[0120] For example, after determining the image difference between the first scene screenshot and the second scene screenshot at each test point based on a preset image comparison strategy, the difference results between the first scene screenshot and the second scene screenshot can be visualized to obtain a difference image between the two.
[0121] If the value of the image difference at the test point is greater than the comparison threshold, the difference information between the first scene screenshot and the second scene screenshot can be determined based on the image comparison result at the test point.
[0122] Furthermore, the above step of determining the difference information based on the image comparison results of the test points is as follows: Figure 8 As shown, including:
[0123] S801 : Compare the first scene screenshot and the second scene screenshot of the test point to obtain an image comparison result.
[0124] For example, a difference image between the first scene screenshot and the second scene screenshot may be determined based on the MSE algorithm and the SSIM algorithm, and the difference image may be used as the image comparison result.
[0125] S802: Perform grayscale processing on the image comparison result, and determine difference information based on the grayscale image of the image comparison result.
[0126] Reference Figure 9, shows the test results for one shooting direction at test point A. From left to right, it shows the first scene screenshot, the second scene screenshot, and a grayscale image of the image comparison result. The bright areas in the grayscale image represent the differences between the first and second scene screenshots.
[0127] Next, combine Figure 10 , the overall process of the virtual scene testing method in this application is described.
[0128] Reference Figure 10 , the test points can be marked in the virtual scene based on the unity engine. The unity engine can generate multiple test points in the virtual scene in response to the point configuration information. During this process, the tester can also adjust the generated test points.
[0129] When conducting automatic testing, the virtual scene can be frozen for the game versions before and after modification, and the scene screenshots of each test point in the game versions before and after modification can be determined. The test results of the test point can be determined based on the scene screenshots of the same test point. The test results of all test points can be combined to generate and output a test report.
[0130] During this process, scene screenshots of different game versions at the same test point can also be automatically saved to the cloud. In this way, when testers determine the game effect of the modified game version, they can use the game effect of the historical version as the standard for judgment, avoiding the problem of testers judging the effect of the virtual scene too subjectively.
[0131] Figure 11 A schematic diagram of the structure of a virtual scene testing device provided in an embodiment of the present application is shown, wherein:
[0132] A first acquisition module 1101 is configured to freeze the first version of the virtual scene to obtain a first frozen virtual scene, and acquire a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene;
[0133] A second acquisition module 1102 is configured to freeze the second version of the virtual scene to obtain a second frozen virtual scene, and to acquire a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on the position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game;
[0134] The determination module 1103 is configured to determine a test result of the second version relative to the first version based on the scene screenshots of each test point and the second scene screenshots of each test point.
[0135] In a feasible implementation scheme, the first acquisition module 1101 is specifically configured to:
[0136] Obtaining scene resources in the first version of the virtual scene, where the scene resources include at least one of the following: special effects, animations, and dynamic materials;
[0137] The scene resources in the first version of the virtual scene are frozen to obtain a first frozen virtual scene.
[0138] In a feasible implementation scheme, the first acquisition module 1101 is specifically configured to:
[0139] Change the status of the nodes corresponding to the special effects and animations to the closed state, so that each special effect and animation is in a frozen state;
[0140] Modify the timing information of dynamic materials to the preset value so that each dynamic material is in a frozen state.
[0141] In a feasible implementation scheme, the first acquisition module 1101 is specifically configured to:
[0142] Move the virtual camera to the location of the test point;
[0143] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of first scene screenshots corresponding to the shooting directions of the test points.
[0144] In a feasible implementation scheme, the first acquisition module 1101 is specifically configured to:
[0145] According to each preset shooting direction, the direction of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain the first scene screenshot in each shooting direction of the test point.
[0146] In a feasible implementation, the second acquisition module 1102 is specifically configured to:
[0147] Move the virtual camera to the location of the test point;
[0148] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of second scene screenshots corresponding to the shooting directions of the test points.
[0149] In a feasible implementation, the second acquisition module 1102 is specifically configured to:
[0150] According to each preset shooting direction, the direction of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain a second scene screenshot in each shooting direction of the test point.
[0151] In a feasible embodiment, the device of the present application further includes a point generation module for:
[0152] In response to the point configuration information, a plurality of test points in the virtual scene of the target game are generated, where the point configuration information includes: a point position coordinate range and / or the number of points.
[0153] In a feasible implementation scheme, the point generation module is specifically used to:
[0154] In response to the point modification instruction, the modified position coordinates corresponding to the test point are determined, and the modified position coordinates are used as the position coordinates of the test point.
[0155] In a feasible implementation scheme, the determination module 1103 is specifically configured to:
[0156] Based on a preset image comparison strategy, determine the image difference between the first scene screenshot and the second scene screenshot at each test point;
[0157] Determine the test results of each test point based on the image difference of each test point and the preset comparison threshold;
[0158] The test result of the second version relative to the first version is determined based on the test result of each test point.
[0159] In a feasible implementation scheme, the determination module 1103 is specifically configured to:
[0160] If the image difference value of the test point is greater than the comparison threshold, the difference information is determined according to the image comparison result of the test point.
[0161] In a feasible implementation scheme, the determination module 1103 is specifically configured to:
[0162] Compare the first scene screenshot and the second scene screenshot of the test point to obtain an image comparison result;
[0163] The image comparison results are grayscale processed, and the difference information is determined based on the grayscale image of the image comparison results.
[0164] By freezing the first version of the virtual scene and the second version of the virtual scene, the present application can keep the scene resources in different versions of the virtual scene in the same state, avoiding the impact of different virtual scene states on subsequent image comparisons. By collecting the first scene screenshot and the second scene screenshot at the test points in the first frozen virtual scene and the second frozen virtual scene, the impact of different image collection positions on subsequent automatic image comparisons can be avoided, and different versions of screenshots at the same test point can also more accurately characterize the differences between the second version of the game and the first version of the game. Compared with traditional testing methods, the present application performs automated testing of different game versions through image comparison, which is more comprehensive and accurate, greatly reduces the workload of testers, and shortens the overall testing time.
[0165] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown, including: a processor 1201, a storage medium 1202, and a bus 1203. The storage medium 1202 stores machine-readable instructions executable by the processor 1201. When the electronic device runs a virtual scene testing method in the embodiment, the processor 1201 communicates with the storage medium 1202 via the bus 1203. The processor 1201 executes the machine-readable instructions. The processor 1201 executes the preamble of the method item to perform the following steps:
[0166] Freezing the first version of the virtual scene to obtain a first frozen virtual scene, and collecting a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene;
[0167] Freezing the second version of the virtual scene to obtain a second frozen virtual scene, and collecting a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game;
[0168] The test result of the second version relative to the first version is determined based on the first scene screenshot of each test point and the second scene screenshot of each test point.
[0169] In a feasible implementation manner, when the processor 1201 freezes the first version of the virtual scene to obtain the first frozen virtual scene, it is specifically configured to:
[0170] Obtaining scene resources in the first version of the virtual scene, where the scene resources include at least one of the following: special effects, animations, and dynamic materials;
[0171] The scene resources in the first version of the virtual scene are frozen to obtain a first frozen virtual scene.
[0172] In a feasible implementation manner, when the processor 1201 freezes the scene resources in the first version of the virtual scene, it is specifically configured to:
[0173] Change the status of the nodes corresponding to the special effects and animations to the closed state, so that each special effect and animation is in a frozen state;
[0174] Modify the timing information of dynamic materials to the preset value so that each dynamic material is in a frozen state.
[0175] In one feasible implementation, when the processor 1201 collects a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on the position information of each test point in the first version of the virtual scene, the processor 1201 is specifically configured to:
[0176] Move the virtual camera to the location of the test point;
[0177] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of first scene screenshots corresponding to the shooting directions of the test points.
[0178] In one feasible implementation, when the processor 1201 controls the virtual camera to shoot the virtual scene according to at least one preset shooting direction and obtains multiple first scene screenshots corresponding to the test points, it is specifically configured to:
[0179] According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain the first scene screenshot in each shooting direction of the test point.
[0180] In one feasible implementation, when the processor 1201 collects multiple second scene screenshots corresponding to each test point in the second frozen virtual scene based on the position information of each test point in the first version of the virtual scene, it is specifically configured to:
[0181] Move the virtual camera to the location of the test point;
[0182] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of second scene screenshots corresponding to the shooting directions of the test points.
[0183] In one feasible implementation, when the processor 1201 controls the virtual camera to shoot the virtual scene according to at least one preset shooting direction and obtains multiple second scene screenshots corresponding to the test points, it is specifically configured to:
[0184] According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain a second scene screenshot in each shooting direction of the test point.
[0185] In one feasible implementation, before collecting a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on the position information of each test point in the first version of the virtual scene, the processor 1201 is specifically configured to:
[0186] In response to the point configuration information, a plurality of test points in the virtual scene of the target game are generated, where the point configuration information includes: a point position coordinate range and / or the number of points.
[0187] In a feasible embodiment, when executing the virtual scene testing method of the present application, the processor 1201 is further configured to:
[0188] In response to the point modification instruction, the modified position coordinates corresponding to the test point are determined, and the modified position coordinates are used as the position coordinates of the test point.
[0189] In one feasible implementation, when the processor 1201 determines the test result of the second version relative to the first version based on the plurality of first scene screenshots and the plurality of second scene screenshots, the processor 1201 is specifically configured to:
[0190] Based on a preset image comparison strategy, determine the image difference between the first scene screenshot and the second scene screenshot at each test point;
[0191] Determine the test results of each test point based on the image difference of each test point and the preset comparison threshold;
[0192] The test result of the second version relative to the first version is determined based on the test result of each test point.
[0193] In a feasible implementation, when the processor 1201 determines the test result of each test point based on the image difference of each test point and a preset comparison threshold, it is specifically configured to:
[0194] If the image difference value of the test point is greater than the comparison threshold, the difference information is determined according to the image comparison result of the test point.
[0195] In a feasible implementation, when determining difference information based on image comparison results of the test points, the processor 1201 is specifically configured to:
[0196] Compare the first scene screenshot and the second scene screenshot of the test point to obtain an image comparison result;
[0197] The image comparison results are grayscale processed, and the difference information is determined based on the grayscale image of the image comparison results.
[0198] In an embodiment of the present application, by freezing the first version of the virtual scene and the second version of the virtual scene, the scene resources in the different versions of the virtual scene can be kept in the same state, avoiding the influence of the different states of the virtual scene on the subsequent image comparison. By collecting the first scene screenshot and the second scene screenshot at the test points in the first frozen virtual scene and the second frozen virtual scene, the influence of the different image collection positions on the subsequent automatic comparison of images can be avoided, and the different versions of the screenshots at the same test point can also more accurately characterize the difference between the second version of the game and the first version of the game. The present application performs automated testing of different game versions by image comparison, which is more comprehensive and accurate than the traditional testing method, greatly reduces the workload of testers, and shortens the overall testing time.
[0199] An embodiment of the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium. The computer program is executed when a processor is run, and the processor performs the following steps:
[0200] Freezing the first version of the virtual scene to obtain a first frozen virtual scene, and collecting a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene;
[0201] Freezing the second version of the virtual scene to obtain a second frozen virtual scene, and collecting a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game;
[0202] The test result of the second version relative to the first version is determined based on the first scene screenshot of each test point and the second scene screenshot of each test point.
[0203] In a feasible implementation manner, when the processor freezes the first version of the virtual scene to obtain the first frozen virtual scene, the processor is specifically configured to:
[0204] Obtaining scene resources in the first version of the virtual scene, where the scene resources include at least one of the following: special effects, animations, and dynamic materials;
[0205] The scene resources in the first version of the virtual scene are frozen to obtain a first frozen virtual scene.
[0206] In a feasible implementation manner, when the processor freezes the scene resources in the first version of the virtual scene, it is specifically configured to:
[0207] Change the status of the nodes corresponding to the special effects and animations to the closed state, so that each special effect and animation is in a frozen state;
[0208] Modify the timing information of dynamic materials to the preset value so that each dynamic material is in a frozen state.
[0209] In one feasible implementation, when the processor collects multiple first scene screenshots corresponding to each test point in the first frozen virtual scene based on the position information of each test point in the first version of the virtual scene, it is specifically configured to:
[0210] Move the virtual camera to the location of the test point;
[0211] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of first scene screenshots corresponding to the shooting directions of the test points.
[0212] In one feasible implementation, when the processor controls the virtual camera to shoot the virtual scene according to at least one preset shooting direction and obtains multiple first scene screenshots corresponding to the test points, it is specifically configured to:
[0213] According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain the first scene screenshot in each shooting direction of the test point.
[0214] In one feasible implementation, when the processor collects multiple second scene screenshots corresponding to each test point in the second frozen virtual scene based on the position information of each test point in the first version of the virtual scene, it is specifically configured to:
[0215] Move the virtual camera to the location of the test point;
[0216] According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of second scene screenshots corresponding to the shooting directions of the test points.
[0217] In one feasible implementation, when the processor controls the virtual camera to shoot the virtual scene according to at least one preset shooting direction to obtain multiple second scene screenshots corresponding to the test points, it is specifically configured to:
[0218] According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain a second scene screenshot in each shooting direction of the test point.
[0219] In one feasible implementation, before the processor collects multiple first scene screenshots corresponding to each test point in the first frozen virtual scene based on the position information of each test point in the first version of the virtual scene, the processor is specifically configured to:
[0220] In response to the point configuration information, a plurality of test points in the virtual scene of the target game are generated, where the point configuration information includes: a point position coordinate range and / or the number of points.
[0221] In a feasible embodiment, when executing the virtual scene testing method of the present application, the processor is further configured to:
[0222] In response to the point modification instruction, the modified position coordinates corresponding to the test point are determined, and the modified position coordinates are used as the position coordinates of the test point.
[0223] In one feasible implementation, when the processor determines the test result of the second version relative to the first version based on the plurality of first scenario screenshots and the plurality of second scenario screenshots, the processor is specifically configured to:
[0224] Based on a preset image comparison strategy, determine the image difference between the first scene screenshot and the second scene screenshot at each test point;
[0225] Determine the test results of each test point based on the image difference of each test point and the preset comparison threshold;
[0226] The test result of the second version relative to the first version is determined based on the test result of each test point.
[0227] In one feasible implementation, when the processor determines the test result of each test point based on the image difference of each test point and a preset comparison threshold, it is specifically configured to:
[0228] If the image difference value of the test point is greater than the comparison threshold, the difference information is determined according to the image comparison result of the test point.
[0229] In one feasible implementation, when determining difference information based on image comparison results of the test points, the processor is specifically configured to:
[0230] Compare the first scene screenshot and the second scene screenshot of the test point to obtain an image comparison result;
[0231] The image comparison results are grayscale processed, and the difference information is determined based on the grayscale image of the image comparison results.
[0232] In an embodiment of the present application, by freezing the first version of the virtual scene and the second version of the virtual scene, the scene resources in the different versions of the virtual scene can be kept in the same state, avoiding the influence of the different states of the virtual scene on the subsequent image comparison. By collecting the first scene screenshot and the second scene screenshot at the test points in the first frozen virtual scene and the second frozen virtual scene, the influence of the different image collection positions on the subsequent automatic comparison of images can be avoided, and the different versions of the screenshots at the same test point can also more accurately characterize the difference between the second version of the game and the first version of the game. The present application performs automated testing of different game versions by image comparison, which is more comprehensive and accurate than the traditional testing method, reduces the workload of the testers, and shortens the overall testing time.
[0233] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment and will not be repeated here.
[0234] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0235] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0236] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0237] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0238] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0239] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or make equivalent replacements for some of the technical features thereof. However, these modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A virtual scene testing method, characterized in that: include: Freezing the first version of the virtual scene to obtain a first frozen virtual scene, and collecting a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene; Freezing the second version of the virtual scene to obtain a second frozen virtual scene, and collecting a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game; A test result of the second version relative to the first version is determined according to the first scene screenshot of each test point and the second scene screenshot of each test point.
2. The method according to claim 1, characterized in that Freezing the first version of the virtual scene to obtain a first frozen virtual scene includes: Obtaining scene resources in the first version of the virtual scene, wherein the scene resources include at least one of the following: special effects, animations, and dynamic materials; Freeze the scene resources in the first version of the virtual scene to obtain the first frozen virtual scene.
3. The method according to claim 2, characterized in that The freezing of the scene resources in the first version of the virtual scene includes: Modify the states of the nodes corresponding to the special effects and the nodes corresponding to the animations to be closed, so that the special effects and the animations are in a frozen state; The time information of the dynamic material is modified to a preset value so that each of the dynamic materials is in a frozen state.
4. The method according to claim 1, wherein The collecting, based on the position information of each test point in the first version of the virtual scene, a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene includes: Move the virtual camera to the location of the test point; According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of first scene screenshots corresponding to the shooting directions of the test points.
5. The method according to claim 4, characterized in that The step of controlling the virtual camera to shoot the virtual scene according to at least one preset shooting direction to obtain a plurality of first scene screenshots corresponding to the test points includes: According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain the first scene screenshot in each shooting direction of the test point.
6. The method according to claim 1, characterized in that The collecting, according to the position information of each test point in the second version of the virtual scene, a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene includes: Move the virtual camera to the location of the test point; According to at least one preset shooting direction, the virtual camera is controlled to shoot the virtual scene to obtain a plurality of second scene screenshots corresponding to the shooting directions of the test points.
7. The method according to claim 6, characterized in that The step of controlling the virtual camera to shoot the virtual scene according to at least one preset shooting direction to obtain a plurality of second scene screenshots corresponding to the shooting directions of the test points includes: According to each preset shooting direction, the orientation of the virtual camera is adjusted to the shooting direction in sequence, and the virtual camera is controlled to shoot the virtual scene to obtain a second scene screenshot in each shooting direction of the test point.
8. The method according to any one of claims 1 to 7, characterized in that Before collecting a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene according to the position information of each test point in the first version of the virtual scene, the method includes: In response to the point configuration information, a plurality of test points in the virtual scene of the target game are generated, wherein the point configuration information includes: a point position coordinate range and / or a number of points.
9. The method according to claim 8, characterized in that The method further comprises: In response to the point modification instruction, the modified position coordinates corresponding to the test point are determined, and the modified position coordinates are used as the position coordinates of the test point.
10. The method according to claim 1, characterized in that Determining, based on the plurality of first scenario screenshots and the plurality of second scenario screenshots, a test result of the second version relative to the first version includes: Based on a preset image comparison strategy, determine the image difference between the first scene screenshot and the second scene screenshot at each test point; Determining the test results of each test point based on the image difference of each test point and a preset comparison threshold; A test result of the second version relative to the first version is determined according to the test result of each test point.
11. The method according to claim 10, characterized in that Determining the test results of each test point based on the image difference of each test point and a preset comparison threshold includes: If the image difference value of the test point is greater than the comparison threshold, the difference information is determined according to the image comparison result of the test point.
12. The method according to claim 11, characterized in that Determining difference information based on the image comparison results of the test points includes: Comparing the first scene screenshot and the second scene screenshot of the test point to obtain the image comparison result; Grayscale processing is performed on the image comparison result, and the difference information is determined according to the grayscale image of the image comparison result.
13. A virtual scene testing device, characterized in that: include: a first acquisition module, configured to freeze the first version of the virtual scene to obtain a first frozen virtual scene, and acquire a plurality of first scene screenshots corresponding to each test point in the first frozen virtual scene based on position information of each test point in the first version of the virtual scene; a second acquisition module, configured to freeze the second version of the virtual scene to obtain a second frozen virtual scene, and acquire a plurality of second scene screenshots corresponding to each test point in the second frozen virtual scene based on position information of each test point in the second version of the virtual scene, wherein the first version and the second version are different versions of the target game; The determination module is used to determine the test result of the second version relative to the first version based on the first scene screenshot of each test point and the second scene screenshot of each test point.
14. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual scene testing method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the virtual scene testing method according to any one of claims 1 to 12.