CN109471805B - Resource testing method and device, storage medium and electronic equipment - Google Patents

Resource testing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109471805B
CN109471805B CN201811353785.5A CN201811353785A CN109471805B CN 109471805 B CN109471805 B CN 109471805B CN 201811353785 A CN201811353785 A CN 201811353785A CN 109471805 B CN109471805 B CN 109471805B
Authority
CN
China
Prior art keywords
resource
tested
image
result
resource data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811353785.5A
Other languages
Chinese (zh)
Other versions
CN109471805A (en
Inventor
陈立
蒋珺
汪承佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811353785.5A priority Critical patent/CN109471805B/en
Publication of CN109471805A publication Critical patent/CN109471805A/en
Application granted granted Critical
Publication of CN109471805B publication Critical patent/CN109471805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The embodiment of the invention relates to a resource testing method and a device, belonging to the technical field of software testing, wherein the method comprises the following steps: acquiring a resource to be tested, and comparing an image to be tested of the resource to be tested with an original image corresponding to the image to be tested to obtain a comparison result; judging whether the image to be tested of the resource to be tested is consistent with an expected result or not according to the comparison result; if the image to be tested is consistent with the expected result, the resource data of the resource to be tested is changed to obtain changed resource data; rendering the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed data resource. The method solves the problem of low accuracy of the test result caused by manual testing in the prior art, improves the accuracy of the test result, and greatly improves the efficiency of verifying the correctness of the resource.

Description

Resource testing method and device, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of software testing, in particular to a resource testing method, a resource testing device, a computer readable storage medium and electronic equipment.
Background
With the development of online games and the increase of game users, the requirement of the users on the exquisite degree of game pictures is higher and higher; therefore, almost all game items require art resource testing. Moreover, the art resource test is also an abstract test, so that the method greatly depends on the naked eye to identify whether the rendering of the art resource is correct, and the manual resource regression test can cause a large amount of cost consumption and cannot obtain a test result in time.
In the existing art test resource test scheme, most of the resources are checked one by one in a game by naked eyes, and the resources are judged to have no errors according to experience and feeling. Referring to fig. 1, a tester needs to use game instructions to display resources to be tested in a game, and then observe whether the resources are correct one by one.
However, the above solution has the following disadvantages: on one hand, if the resources are inspected by naked eyes, a tester only judges whether the resources have problems according to past experience; if the new tester of the product or the tester is tired, errors can be easily caused, so that the accuracy of the test result is low; on the other hand, problems existing in art resources are hidden sometimes, and the traditional test scheme is easy to miss, so that the accuracy of the test result is low; on the other hand, the data (such as size, number, type) of the game resource cannot be effectively associated with the appearance of the actual resource. The data of the resources can not be directly seen when the actual sample is seen in the game, so that the workload of testers is large, and the testing efficiency is reduced; further, the art resources involve subjective problems, such as the set of clothing appearing as a sleeve of a little longer, which makes the weapon appear to be too dark in color; therefore, in the traditional test method, because a public display platform is not available, if problems of reproduction and positioning are needed, various kinds of work are always added, such as building an internal environment, reproducing error scenes and the like, so that communication between testers and developers is difficult, and the development speed is further reduced; furthermore, when there are many test cases, a lot of time is consumed for testing, which increases the testing difficulty and further reduces the testing efficiency.
Therefore, it is desirable to provide a new resource testing method and apparatus.
It is to be noted that the information invented in the above background section is only for enhancing the understanding of the background of the present invention, and therefore, may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present invention is directed to a resource testing method, a resource testing apparatus, a computer-readable storage medium, and an electronic device, which overcome at least some of the problems of the related art, such as the limitations and disadvantages of the related art, that the accuracy of the test result is low.
According to an aspect of the present disclosure, there is provided a resource testing method, including:
acquiring a resource to be tested, and comparing a to-be-tested image of the resource to be tested with an original image corresponding to the to-be-tested image to obtain a comparison result;
judging whether the image to be tested of the resource to be tested is consistent with an expected result or not according to the comparison result;
if the image to be tested is inconsistent with the expected result, the resource data of the resource to be tested is changed to obtain changed resource data;
rendering the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed data resource.
In an exemplary embodiment of the present disclosure, comparing the to-be-tested image of the to-be-tested resource with the original image corresponding to the to-be-tested image to obtain a comparison result includes:
calculating the difference between the to-be-tested image of the to-be-tested resource and the original image corresponding to the to-be-tested image to obtain a difference calculation result;
and generating the comparison result according to the difference calculation result.
In an exemplary embodiment of the present disclosure, determining whether the to-be-tested image of the to-be-tested resource is consistent with the expected result according to the comparison result includes:
and judging whether the image to be tested is consistent with an expected result or not according to whether the difference calculation result is larger than a preset difference value or not.
In an exemplary embodiment of the disclosure, determining whether the to-be-tested image is consistent with an expected result according to whether the difference calculation result is greater than a preset difference value includes:
dividing the image to be tested into a plurality of areas;
correspondingly marking the difference calculation results in each region to obtain a plurality of marked images;
and judging whether the difference value of each marked image is consistent with an expected result or not according to whether the difference value of each marked image is larger than the preset difference value or not.
In an exemplary embodiment of the present disclosure, if the image to be tested and the expected result are not consistent, the modifying the resource data of the resource to be tested to obtain modified resource data includes:
and if the marked image is inconsistent with the expected result, modifying the resource data corresponding to the marked image to obtain modified resource data.
In an exemplary embodiment of the present disclosure, modifying the resource data corresponding to the tag image to obtain modified resource data includes:
identifying tagged images that are inconsistent with the expected result;
and changing the resource data corresponding to the marked image containing the identifier to obtain changed resource data.
In an exemplary embodiment of the present disclosure, after acquiring the resource to be tested, the resource testing method further includes:
generating a test case according to the resource to be tested;
judging whether the test case exists in an ignore case library or not;
and if the test case exists in the ignore case library, reacquiring the resource to be tested.
According to an aspect of the present disclosure, there is provided a resource testing apparatus including:
the comparison module is used for acquiring a resource to be tested and comparing a to-be-tested image of the resource to be tested with an original image corresponding to the to-be-tested image to obtain a comparison result;
the judging module is used for judging whether the to-be-tested image of the to-be-tested resource is consistent with an expected result or not according to the comparison result;
the changing module is used for changing the resource data of the resource to be tested to obtain changed resource data if the image to be tested is inconsistent with the expected result;
and the display module is used for rendering the image to be tested by using the changed resource data to obtain a rendering result and correspondingly displaying the rendering result and the changed data resource.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a resource testing method as described in any one of the above.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any of the above described resource testing methods via execution of the executable instructions.
The embodiment of the invention provides a resource testing method and a resource testing device, wherein a comparison result is obtained by comparing an image to be tested with an original image; when the image to be tested is judged to be inconsistent with the expected result, the resource data of the resource to be tested is changed to obtain changed resource data; finally, rendering the attempted image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed data resource; on one hand, a comparison result is obtained by comparing the to-be-tested image of the to-be-tested resource with the original image corresponding to the to-be-tested image, and whether the to-be-tested image of the to-be-tested resource is consistent with the expected result is judged according to the comparison result, so that the problem of low accuracy of the test result caused by manual testing in the prior art is solved, and the accuracy of the test result is improved; on the other hand, the rendering result and the changed data resource are correspondingly displayed, so that the problems of low development efficiency and low testing efficiency caused by the fact that the rendering result and the changed resource data cannot be correspondingly displayed in the prior art are avoided, the development efficiency is improved, and the testing efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 schematically shows an example view of a virtual scene.
FIG. 2 schematically illustrates an example diagram of a resource test.
Fig. 3 schematically shows a flow chart of a resource testing method.
FIG. 4 schematically illustrates a flow chart of a method of determining whether the image to be tested is consistent with an expected result.
Fig. 5 schematically shows an example of an image to be tested.
Figure 6 schematically shows another example of an image to be tested.
Fig. 7 schematically shows an example of image display of a view to be measured.
FIG. 8 schematically illustrates a flow chart of another resource testing method.
Fig. 9 schematically shows a block diagram of a resource testing arrangement.
Fig. 10 schematically shows an exemplary diagram of an electronic device for implementing the resource testing method described above.
Fig. 11 schematically illustrates a computer-readable storage medium for implementing the resource testing method described above.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the invention.
Furthermore, the drawings are merely schematic illustrations of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In a resource testing method, the data-based review of the game resource (such as picture size, resolution, picture reference, etc.) can be performed according to some tools and rules; or using some tools to extract the binary file diff of the resource, specifically referring to fig. 2, in this way, the modification of the resource can be seen, and the modified content of the text version can also be seen. However, with this method, on one hand, the data (such as size, number, type) of game resources cannot be effectively associated with the actual resource; in the system, only cold data can be seen, and the appearance of actual resources cannot be seen; on the other hand, only the modification condition of the resource can be seen, and whether the modification of the resource is correct or not cannot be automatically judged.
In the present exemplary embodiment, a resource testing method is first provided, which may be run on a server, a server cluster, a cloud server, or the like; and can also operate with the device terminal; of course, those skilled in the art may also operate the method of the present invention on other platforms as needed, and this is not particularly limited in this exemplary embodiment. Referring to fig. 3, the resource testing method may include the steps of:
s310, acquiring a resource to be tested, and comparing a to-be-tested image of the resource to be tested with an original image corresponding to the to-be-tested image to obtain a comparison result.
And S320, judging whether the to-be-tested image of the to-be-tested resource is consistent with an expected result according to the comparison result.
And S330, if the image to be tested is inconsistent with the expected result, modifying the resource data of the resource to be tested to obtain modified resource data.
Step S340, rendering the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed data resource.
In the resource testing method, on one hand, the comparison result is obtained by comparing the to-be-tested image of the to-be-tested resource with the original image corresponding to the to-be-tested image, and then whether the to-be-tested image of the to-be-tested resource is consistent with the expected result is judged according to the comparison result, so that the problem of low accuracy of the test result caused by manual testing in the prior art is solved, and the accuracy of the test result is improved; on the other hand, the rendering result and the changed data resource are correspondingly displayed, so that the problems of low development efficiency and low testing efficiency caused by the fact that the rendering result and the changed resource data cannot be correspondingly displayed in the prior art are avoided, the development efficiency is improved, and the testing efficiency is improved.
Hereinafter, each step in the above-described resource testing method in the present exemplary embodiment will be explained and explained in detail with reference to the drawings.
In step S310, a resource to be tested is obtained, and a comparison result is obtained by comparing a to-be-tested image of the resource to be tested with an original image corresponding to the to-be-tested image.
In the present exemplary embodiment, first, a resource to be tested is acquired from a client without starting a game client; the resource to be tested can comprise an image to be tested and resource data corresponding to the image to be tested; the client may include a mobile terminal device (e.g., a mobile phone or a tablet computer, or a PC, etc.), or may include a desktop computer, etc., which is not limited in this example; furthermore, after the resource to be tested is obtained, a to-be-tested image of the resource to be tested and an original image corresponding to the to-be-tested image need to be compared to obtain a comparison result. Among them, can include: calculating the difference between the to-be-tested image of the to-be-tested resource and the original image corresponding to the to-be-tested image to obtain a difference calculation result; and generating the comparison result according to the difference calculation result. In detail:
firstly, difference calculation is carried out on an image to be tested of a resource to be tested and an original image corresponding to the image to be tested to obtain a difference calculation result; the original image corresponding to the image to be tested can be obtained from a database; furthermore, the difference calculation can be performed by automatically checking the image to be tested and the original image corresponding to the image to be tested through an intelligent image comparison method, so as to obtain the difference calculation result. Then, when a difference calculation result is obtained, a comparison result can be generated according to the difference calculation result. The comparison result may include pixels, RGB staining schemes, contrast, and the like, which is not limited in this example.
In step S320, it is determined whether the to-be-tested image of the to-be-tested resource is consistent with the expected result according to the comparison result.
In this exemplary embodiment, determining whether the to-be-tested image of the to-be-tested resource is consistent with the expected result according to the comparison result may include: and judging whether the image to be tested is consistent with an expected result or not according to whether the difference calculation result is larger than a preset difference value or not. Specifically, referring to fig. 4, determining whether the to-be-tested image is consistent with the expected result according to whether the difference calculation result is greater than a preset difference value may include steps S410 to S430. Wherein:
in step S410, the image to be tested is divided into a plurality of regions.
In step S420, the difference calculation result is correspondingly marked in each region, so as to obtain a plurality of marked images.
In step S430, it is determined whether the difference value of each of the labeled images is greater than the preset difference value, and whether the labeled image is consistent with the expected result.
Next, steps S410 to S430 will be explained and explained. Firstly, dividing an image to be tested into a plurality of areas; for example, the image to be tested may be divided into 16 parts in total, 1-16 as shown in FIG. 5; then correspondingly marking the difference calculation results in each area to obtain a plurality of marked images; finally, judging whether the difference value of each marked image is consistent with an expected result or not according to whether the difference value of each marked image is larger than a preset difference value or not; for example, the difference of each block can be compared by pixel in regions, and then whether the block is consistent with the expected result or not is judged according to the comparison result; if the difference is small (less than the preset difference value) and is acceptable to the user, the block is automatically semi-transparent (the Alpha channel of the block is set to be transparent).
In step S330, if the image to be tested is inconsistent with the expected result, the resource data of the resource to be tested is modified to obtain modified resource data.
In this exemplary embodiment, if the image to be tested is inconsistent with the expected result, the resource data of the resource to be tested may be modified to obtain modified resource data, which specifically includes: and if the marked image is inconsistent with the expected result, modifying the resource data corresponding to the marked image to obtain modified resource data. Wherein, modifying the resource data corresponding to the marked image to obtain modified resource data may include: identifying tagged images that are inconsistent with the expected result; and changing the resource data corresponding to the marked image containing the identifier to obtain changed resource data. For example:
for example, if the block is judged to be very different, the module is highlighted (a specific example diagram can refer to fig. 6), and is automatically framed by a square frame; furthermore, the resource data corresponding to the highlighted and framed part can be changed, and then changed resource data of each part can be obtained. By the method, the change amount of the resource data is reduced, and the change speed is improved.
In step S340, rendering the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed data resource.
In the present exemplary embodiment, after the modified resource data is obtained, the modified resource data may be used to render the image to be tested and obtain a rendering result corresponding to the modified resource data; then, correspondingly displaying the rendering result and the changed data resource; reference may be made in particular to fig. 7. Furthermore, the platform display mode can facilitate communication of art, plans, programs and QA, and can look at the rendering result of the platform to search for problems and carry out corresponding repair. And key information of resources can be simultaneously output on the platform, so that data (such as size, number and type) of game resources and the appearance of actual resources form effective association, and the testing and changing speed is greatly improved.
Further, in order to improve the comparison speed, referring to fig. 8, the resource testing method may further include steps S810 to S830. Wherein:
in step S810, a test case is generated according to the resource to be tested.
In step S820, it is determined whether the test case exists in the ignore case library.
In step S830, if the test case exists in the ignore case library, the resource to be tested is obtained again.
Hereinafter, steps S810 to S830 will be explained and explained in detail. Firstly, generating a test case according to a resource to be tested; for example, when a new set of mid-autumn fashion is required in the mid-autumn festival of the game, all characters in the game need to be put on the set of fashion for testing; further, the system can specify the corresponding art branch, then freely combine the test cases (for example, freely combine roles, fashion, actions, and the like), and select the test strength (for example, the model is multi-oriented, a plurality of action frames, and the like); then, judging whether the test case exists in an ignore case library or not; the neglected case library is generated according to the conventional test cases, in order to reduce repeated neglect operations, the neglected case library is established, and each neglected case is recorded in the neglected case library, so that the neglected case library can be compared at the same time in the next comparison, the same misjudgment cannot occur for 2 times, the change times are reduced, the test efficiency is improved, and the development efficiency is also improved; further, if the test case exists in the ignore case library, the resource to be tested can be obtained again, and then whether a new test resource exists in the ignore case library or not is judged; if the test case does not exist in the ignore case library, the resource to be tested can be tested.
Further, the generation of the ignore case base is explained and illustrated. The generation of the ignore case base may include the steps of:
step S10, carrying out similarity check on the new version screenshot of the resource to be tested and the correct template corresponding to the new version screenshot; if the checking result is a mismatched screenshot, a neglected case corresponding to the new screenshot can be generated;
step S20, storing the ignore case to the ignore template database; judging whether an ignoring template which is the same as the ignoring use case exists in an ignoring template database; if yes, merging the data; if not, marking the neglected case as an error case;
step S30, manually screening the neglected template marked as the error case, and judging whether the neglected template database has the neglected template which can be combined with the neglected case again; through the step, the number of the ignored cases in the template database can be greatly reduced, the burden of ignoring the template database is reduced, and the speed of the step S10 is improved.
Step S40, if existing, merging the data; if not, the data is reported to a tester for manual processing.
In the exemplary embodiment of the present disclosure, after the solution is used, since the solution automatically highlights the image difference portion, frames the image difference portion, and transparentizes the image similarity portion. The user can easily see the difference part at a glance. Furthermore, the scheme is based on image recognition, all art resources are visualized, so that the test workload is greatly reduced, and after a test case is configured on a webpage, the user can do other things and automatically notify after the scanning is finished. And the communication cost is greatly saved, and QA, art, plan and program can all see the actual effect of the resources in the game on the same platform. In addition, after the resource is modified by the art, the new effect displayed by the resource in the game can be seen immediately through the system, and the game client does not need to be started frequently to view.
The present disclosure also provides a resource testing device. Referring to fig. 9, the resource testing apparatus may include an comparing module 910, a first determining module 920, a changing module 930, and a displaying module 940. Wherein:
the comparison module 910 may be configured to obtain a resource to be tested, and compare an image to be tested of the resource to be tested with an original image corresponding to the image to be tested to obtain a comparison result;
the first determining module 920 may be configured to determine whether the to-be-tested image of the to-be-tested resource is consistent with an expected result according to the comparison result;
the modification module 930 may be configured to modify the resource data of the resource to be tested to obtain modified resource data if the image to be tested is inconsistent with the expected result;
the display module 940 may be configured to render the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly display the rendering result and the changed data resource.
In an exemplary embodiment of the present disclosure, comparing an image to be tested of the resource to be tested with an original image corresponding to the image to be tested to obtain a comparison result includes:
calculating the difference between the to-be-tested image of the to-be-tested resource and the original image corresponding to the to-be-tested image to obtain a difference calculation result;
and generating the comparison result according to the difference calculation result.
In an example embodiment of the present disclosure, the determining whether the to-be-tested image of the to-be-tested resource is consistent with the expected result according to the comparison result includes:
and judging whether the image to be tested is consistent with an expected result or not according to whether the difference calculation result is larger than a preset difference value or not.
In an example embodiment of the present disclosure, determining whether the to-be-tested image is consistent with an expected result according to whether the difference calculation result is greater than a preset difference value includes:
dividing the image to be tested into a plurality of areas;
correspondingly marking the difference calculation results in each region to obtain a plurality of marked images;
and judging whether the difference value of each marked image is consistent with an expected result or not according to whether the difference value of each marked image is larger than the preset difference value or not.
In an example embodiment of the present disclosure, if the image to be tested and the expected result are not consistent, the modifying the resource data of the resource to be tested to obtain modified resource data includes:
and if the marked image is inconsistent with the expected result, modifying the resource data corresponding to the marked image to obtain modified resource data.
In an example embodiment of the present disclosure, modifying the resource data corresponding to the marked image to obtain modified resource data includes:
identifying tagged images that are inconsistent with the expected result;
and changing the resource data corresponding to the marked image containing the identifier to obtain changed resource data.
In an example embodiment of the present disclosure, the resource testing apparatus further includes:
the test case generation module can be used for generating a test case according to the resource to be tested;
the second judging module can be used for judging whether the test case exists in the neglected case library or not;
the obtaining module may be configured to obtain the resource to be tested again if the test case exists in the ignore case library.
The specific details of each module in the resource testing apparatus have been described in detail in the corresponding resource testing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit according to an embodiment of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present invention are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, and may also be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiment of the present invention.
In an exemplary embodiment of the present invention, there is also provided an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Accordingly, various aspects of the present invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1000 according to this embodiment of the invention is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, and a bus 1030 that couples various system components including the memory unit 1020 and the processing unit 1010.
Wherein the storage unit stores program code that is executable by the processing unit 1010 to cause the processing unit 1010 to perform steps according to various exemplary embodiments of the present invention as described in the "exemplary methods" section above in this specification. For example, the processing unit 1010 may perform step S310 as shown in fig. 3: acquiring a resource to be tested, and comparing an image to be tested of the resource to be tested with an original image corresponding to the image to be tested to obtain a comparison result; s320: judging whether the to-be-tested image of the to-be-tested resource is consistent with an expected result or not according to the comparison result; step S330: if the image to be tested is inconsistent with the expected result, the resource data of the resource to be tested is changed to obtain changed resource data; step S340: rendering the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed data resource.
The storage unit 1020 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)10201 and/or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203.
The memory unit 1020 may also include a program/utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1030 may be any one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, and a local bus using any of a variety of bus architectures.
The electronic device 1000 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 1050. Also, the electronic device 1000 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1060. As shown, the network adapter 1060 communicates with the other modules of the electronic device 1000 over the bus 1030. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present invention.
In an exemplary embodiment of the present invention, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 11, a program product 1100 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily appreciated that the processes illustrated in the above figures are not intended to indicate or limit the temporal order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (7)

1. A method for resource testing, comprising:
acquiring resources to be tested, automatically checking an image to be tested and an original image corresponding to the image to be tested by an intelligent image comparison method to obtain a difference calculation result, and obtaining a comparison result according to the difference calculation result; the resource to be tested is a game resource, and is obtained from a client under the condition that a game client is not started; the comparison result comprises specific pixels, an RGB staining scheme and a contrast ratio;
dividing the image to be tested into a plurality of areas; correspondingly marking the difference calculation results obtained according to the image to be tested and the original image in each region to obtain a plurality of marked images; judging whether the difference value of each marked image is consistent with an expected result or not according to whether the difference value of each marked image is larger than a preset difference value or not;
if the image to be tested is inconsistent with the expected result, the resource data of the resource to be tested is changed to obtain changed resource data;
rendering the image to be tested by using the changed resource data to obtain a rendering result, and correspondingly displaying the rendering result and the changed resource data.
2. The resource testing method of claim 1, wherein if the image to be tested and the expected result are not consistent, modifying the resource data of the resource to be tested to obtain modified resource data comprises:
and if the marked image is inconsistent with the expected result, modifying the resource data corresponding to the marked image to obtain modified resource data.
3. The resource testing method of claim 2, wherein modifying the resource data corresponding to the label image to obtain modified resource data comprises:
identifying tagged images that are inconsistent with the expected result;
and changing the resource data corresponding to the marked image containing the identifier to obtain changed resource data.
4. The resource testing method according to any one of claims 1 to 3, wherein after acquiring the resource to be tested, the resource testing method further comprises:
generating a test case according to the resource to be tested;
judging whether the test case exists in an ignore case library or not;
and if the test case exists in the ignore case library, reacquiring the resource to be tested.
5. A resource testing apparatus, comprising:
the comparison module is used for acquiring resources to be tested, automatically checking an image to be tested and an original image corresponding to the image to be tested by an intelligent image comparison method to obtain a difference calculation result, and obtaining a comparison result according to the difference calculation result; the resource to be tested is a game resource, and the resource to be tested is obtained from a client under the condition that a game client is not started; the comparison result comprises specific pixels, an RGB staining scheme and a contrast ratio;
the judging module is used for dividing the image to be tested into a plurality of areas; correspondingly marking the difference calculation results obtained according to the image to be tested and the original image in each region to obtain a plurality of marked images; judging whether the difference value of each marked image is consistent with an expected result or not according to whether the difference value of each marked image is larger than a preset difference value or not;
the changing module is used for changing the resource data of the resource to be tested to obtain changed resource data if the image to be tested is inconsistent with the expected result;
and the display module is used for rendering the image to be tested by using the changed resource data to obtain a rendering result and correspondingly displaying the rendering result and the changed resource data.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the resource testing method according to any one of claims 1 to 4.
7. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the resource testing method of any of claims 1-4 via execution of the executable instructions.
CN201811353785.5A 2018-11-14 2018-11-14 Resource testing method and device, storage medium and electronic equipment Active CN109471805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811353785.5A CN109471805B (en) 2018-11-14 2018-11-14 Resource testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811353785.5A CN109471805B (en) 2018-11-14 2018-11-14 Resource testing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109471805A CN109471805A (en) 2019-03-15
CN109471805B true CN109471805B (en) 2022-09-30

Family

ID=65672893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811353785.5A Active CN109471805B (en) 2018-11-14 2018-11-14 Resource testing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109471805B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111863645B (en) * 2019-04-12 2022-04-08 长鑫存储技术有限公司 Machining process parameter determination method and device, storage medium and electronic equipment
CN110309074B (en) * 2019-07-03 2024-03-29 腾讯科技(深圳)有限公司 Test method and device
CN111127616B (en) * 2019-12-27 2023-09-19 珠海金山数字网络科技有限公司 Rendering verification method and device
CN113268407A (en) * 2020-02-17 2021-08-17 北京沃东天骏信息技术有限公司 Page testing method and device, computer storage medium and electronic equipment
CN113722203A (en) * 2020-05-26 2021-11-30 京东数字科技控股有限公司 Program testing method and device, electronic device and computer readable storage medium
CN112069075B (en) * 2020-09-09 2023-06-30 网易(杭州)网络有限公司 Fashionable dress test method and device for game roles and game client
CN115766845A (en) * 2022-11-21 2023-03-07 中国联合网络通信集团有限公司 Image updating processing method and device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012043062A (en) * 2010-08-16 2012-03-01 Maki Engineering:Kk Software automatic test system
CN103514090A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Method and device for testing browser
CN105868096A (en) * 2015-01-22 2016-08-17 阿里巴巴集团控股有限公司 Methods and apparatuses used for displaying web page test result in browser and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8682083B2 (en) * 2011-06-30 2014-03-25 American Express Travel Related Services Company, Inc. Method and system for webpage regression testing
JP6383799B2 (en) * 2014-03-10 2018-08-29 エスケー テックス カンパニー、リミテッド Cloud streaming server test method, apparatus and system therefor
JP6476144B2 (en) * 2016-02-02 2019-02-27 日本電信電話株式会社 Screen difference confirmation support device, screen difference confirmation support method, and program
CN107229560A (en) * 2016-03-23 2017-10-03 阿里巴巴集团控股有限公司 A kind of interface display effect testing method, image specimen page acquisition methods and device
CN106502891B (en) * 2016-10-19 2019-05-17 广州视源电子科技股份有限公司 The automatic testing method and device of user interface
US10127689B2 (en) * 2016-12-20 2018-11-13 International Business Machines Corporation Mobile user interface design testing tool

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012043062A (en) * 2010-08-16 2012-03-01 Maki Engineering:Kk Software automatic test system
CN103514090A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Method and device for testing browser
CN105868096A (en) * 2015-01-22 2016-08-17 阿里巴巴集团控股有限公司 Methods and apparatuses used for displaying web page test result in browser and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Neox引擎手机游戏通用场景性能测试平台的设计与实现;蓝贤赟;《中国优秀硕士学位论文全文数据库 信息科技辑》;20170215;I138-2554 *
远程游戏自动化测试系统的设计与实现;康怡琳;《中国优秀硕士学位论文全文数据库 信息科技辑》;20080315;I138-181 *

Also Published As

Publication number Publication date
CN109471805A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN109471805B (en) Resource testing method and device, storage medium and electronic equipment
US11561887B2 (en) Test script debugging using an automated testing framework and UI rendering tree
US10599399B2 (en) Mobile user interface design testing tool
CN103518393B (en) The system and method for detecting mobile communication equipment content
CN107506300B (en) User interface testing method, device, server and storage medium
US9274934B2 (en) System and method for creating change-resilient scripts
US20140359573A1 (en) Troubleshooting visuals and transient expressions in executing applications
US20060085132A1 (en) Method and system to reduce false positives within an automated software-testing environment
CN107025174A (en) For the method for the user interface abnormality test of equipment, device and readable storage media
Mahajan et al. WebSee: A tool for debugging HTML presentation failures
JP2013084259A (en) Gradual visual comparison of web browser screen
CN109918513A (en) Image processing method, device, server and storage medium
CN113018870A (en) Data processing method and device and computer readable storage medium
CN113657361A (en) Page abnormity detection method and device and electronic equipment
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN106228191A (en) A kind of control text overlength detection device and method
CN110248235B (en) Software teaching method, device, terminal equipment and medium
CN111054070A (en) Game-based commodity display method and device, terminal and storage medium
CN110826646A (en) Robot vision testing method and device, storage medium and terminal equipment
CN114666634B (en) Picture quality detection result display method, device, equipment and storage medium
CN108416759A (en) Show detection method, device and equipment, the readable medium of failure
CN115048302A (en) Front-end compatibility testing method and device, storage medium and electronic equipment
US9898444B1 (en) Image comparison for user interface testing
CN115185839A (en) Page detection method, device, equipment and medium
CN112559340A (en) Picture testing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant