CN116244173A - System test method, device, equipment and computer readable storage medium - Google Patents

System test method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116244173A
CN116244173A CN202211564926.4A CN202211564926A CN116244173A CN 116244173 A CN116244173 A CN 116244173A CN 202211564926 A CN202211564926 A CN 202211564926A CN 116244173 A CN116244173 A CN 116244173A
Authority
CN
China
Prior art keywords
test
result
positioning
target
test case
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.)
Pending
Application number
CN202211564926.4A
Other languages
Chinese (zh)
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.)
Beijing SoundAI Technology Co Ltd
Original Assignee
Beijing SoundAI Technology 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 Beijing SoundAI Technology Co Ltd filed Critical Beijing SoundAI Technology Co Ltd
Priority to CN202211564926.4A priority Critical patent/CN116244173A/en
Publication of CN116244173A publication Critical patent/CN116244173A/en
Pending legal-status Critical Current

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/3684Test management for test design, e.g. generating new test cases
    • 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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure relates to a system testing method, apparatus, device, and computer-readable storage medium. The method and the device have the advantages that the test function of the test case and the expected result of the tested function under normal conditions are clarified by acquiring the test case and the expected result of the test case; positioning a target tested system, definitely determining the target tested system to be tested, and analyzing a test case; the target tested system is tested according to the test cases to obtain a test result, so that the target tested system is more convenient to test and more complicated tests are conveniently operated; and comparing the expected result with the test result, judging whether the test of the target tested system is successful or not, and obtaining a judgment result, thereby avoiding repeated manual test in the prior art, reducing the test cost, reducing the error rate, improving the test efficiency and ensuring the reusability of the test.

Description

System test method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a system testing method, apparatus, device, and computer readable storage medium.
Background
Global Wide area network (Web) testing is part of system testing and is a type of testing for Web applications. Since Web applications are closely related to users and Web applications typically need to withstand a large number of operations for a long time, the functions of the Web applications must be reliably verified.
In general, errors in the terminal and server programs can be found through Web testing, and the errors are corrected in time, so that the quality of the Web application is ensured.
However, web testing requires a tester to manually operate to find defects in the system, and requires repeated manual regression testing, which is expensive and prone to error.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a system testing method, apparatus, device and computer readable storage medium to improve testing efficiency.
In a first aspect, an embodiment of the present disclosure provides a system testing method, including:
acquiring a test case and an expected result of the test case;
positioning a target tested system and analyzing the test case;
testing the target tested system according to the test case to obtain a test result;
and comparing the expected result with the test result, judging whether the test of the target tested system is successful, and obtaining a judgment result.
In some embodiments, obtaining test cases and expected results of the test cases includes:
making a test plan;
downloading a test template according to the test plan;
generating the test case according to the test template;
and obtaining the expected result of the test case according to the test case.
In some embodiments, a positioning target system under test includes:
the target measured system is positioned by using an element positioning method, wherein the element positioning is to position the element through element information or an element hierarchical structure.
In some embodiments, the element localization method includes at least one of: identification number positioning, name attribute positioning, class name attribute positioning, tag name positioning, hyperlink tag positioning, path positioning, CSS positioning.
In some embodiments, after parsing the test case, the method further comprises:
setting the test time of the test case;
correspondingly, the target tested system is tested according to the test case to obtain a test result, which comprises the following steps:
and testing the target tested system according to the test case and the test time to obtain a test result.
In some embodiments, the test results include: the test result is the same as the expected result, the test result is different from the expected result, and the test result is absent;
and comparing the expected result with the test result to judge whether the test of the target tested system is successful or not, and obtaining a judgment result, wherein the judgment result comprises the following steps:
if the judging result is the same as the expected result, the target tested system is successfully tested;
and if the judging result is that the test result is different from the expected result or the test result is not available, the test of the target tested system fails.
In some embodiments, before testing the target system under test according to the test case, the method further comprises:
setting a contact way of a user;
correspondingly, comparing the expected result with the test result, judging whether the test of the target tested system is successful, and after the judgment result is obtained, the method further comprises:
and notifying the user through the contact way, and generating a test report according to the test result and the judgment result.
In a second aspect, embodiments of the present disclosure provide a system testing apparatus, including:
the acquisition module is used for acquiring the test case and the expected result of the test case;
the positioning module is used for positioning a target tested system and analyzing the test case;
the test module is used for testing the target tested system according to the test case to obtain a test result;
and the judging module is used for comparing the expected result with the test result to judge whether the test of the target tested system is successful or not, so as to obtain a judging result.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement the method of the first aspect.
The system testing method, the device, the equipment and the computer readable storage medium provided by the embodiment of the disclosure are used for determining the testing function of the testing case and the expected result of the tested function under the normal condition by acquiring the testing case and the expected result of the testing case; positioning a target tested system, definitely determining the target tested system to be tested, and analyzing a test case; the target tested system is tested according to the test cases to obtain a test result, so that the target tested system is more convenient to test and more complicated tests are conveniently operated; and comparing the expected result with the test result, judging whether the test of the target tested system is successful or not, and obtaining a judgment result, thereby avoiding repeated manual test in the prior art, reducing the test cost, reducing the error rate, improving the test efficiency and ensuring the reusability of the test.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a system test method provided by an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an application scenario provided in an embodiment of the present disclosure;
FIG. 3 is a flow chart of a system test method according to another embodiment of the present disclosure;
FIG. 4 is a flow chart of a system test method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a system testing device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Global Wide area network (Web) testing is part of system testing and is a type of testing for Web applications. Since Web applications are closely related to users and Web applications typically need to withstand a large number of operations for a long time, the functions of the Web applications must be reliably verified.
In general, errors in the terminal and server programs can be found through Web testing, and the errors are corrected in time, so that the quality of the Web application is ensured.
However, since the Web has characteristics of distribution, isomerism, concurrency, and the like, which are irrelevant to the platform, the Web test is much more complicated than the general program. web testing requires manual operation by a tester to discover defects in the system, and repeated manual regression testing is required, which is costly and prone to error. In view of this problem, embodiments of the present disclosure provide a system testing method, which is described below in connection with specific embodiments.
Fig. 1 is a flowchart of a system test method according to an embodiment of the present disclosure. The method can be executed by a system testing device, the system testing device can be implemented in a software and/or hardware mode, the system testing device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically comprises a mobile phone, a computer or a tablet computer. In addition, the method may be applied to an application scenario shown in fig. 2, where the application scenario includes a target measured system 21 and a terminal 22, the terminal 22 may be an electronic device, and the target measured system 21 may be disposed in a server. It can be appreciated that the system testing method provided by the embodiment of the present disclosure may also be applied in other scenarios.
The system testing method shown in fig. 1 is described below in connection with the application scenario shown in fig. 2, and may be performed by the terminal 22 in fig. 2, for example. The method comprises the following specific steps:
s101, acquiring a test case and an expected result of the test case.
Test Case (Test Case) refers to the description of a specific software product for testing tasks, and reflects testing schemes, methods, technologies and strategies. The content of the method comprises a test target, a test environment, input data, a test step, an expected result, a test script and the like, and finally a document is formed. Briefly, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular goal to verify that a particular software requirement is met. The test case mainly comprises four contents: use case title, preconditions, test procedure and expected result. The use case title mainly describes testing a function; the precondition is that the use case title needs to meet the condition; the testing step mainly describes the operation steps of the use case; the expected results refer to meeting the expected (development specification, requirements document, user requirements, etc.) requirements. The test cases do not contain actual results, and before the test cases are generated, only when the test cases are tested, the test results are generated, so that the test results cannot be generated synchronously with the test cases. The test result exists in a BUG document, which is a report document generated after the test case is tested.
After the user logs in the test system in the terminal 22 by inputting the account number and password, the terminal 22 obtains a test case and an expected result of the test case, wherein the test case comprises a test target, a test environment, input data, a test step, a test script and the like.
S102, positioning a target tested system and analyzing the test case.
The terminal 22 locates the target system 21 to be tested and analyzes the test cases.
S103, testing the target tested system according to the test case to obtain a test result.
The terminal 22 tests the target system under test 21 according to the test cases to obtain test results. It will be appreciated that the target system under test 21 is the object to be tested by the test system in the terminal 22 described above, i.e. the test system in the terminal 22 tests the target system under test.
S104, comparing the expected result with the test result, judging whether the test of the target tested system is successful, and obtaining a judgment result.
The terminal 22 compares the expected result with the test result to determine whether the test of the target system under test 21 is successful, and obtains a determination result.
According to the embodiment of the disclosure, the test function of the test case and the expected result of the tested function under normal conditions are defined by acquiring the test case and the expected result of the test case; positioning a target tested system, definitely determining the target tested system to be tested, and analyzing a test case; the target tested system is tested according to the test cases to obtain a test result, so that the target tested system is more convenient to test and more complicated tests are conveniently operated; and comparing the expected result with the test result, judging whether the test of the target tested system is successful or not, and obtaining a judgment result, thereby avoiding repeated manual test in the prior art, reducing the test cost, reducing the error rate, improving the test efficiency and ensuring the reusability of the test.
In some embodiments, obtaining test cases and expected results of the test cases includes: making a test plan; downloading a test template according to the test plan; generating the test case according to the test template; and obtaining the expected result of the test case according to the test case.
The terminal 22 makes a test plan according to a target to be tested, for example, the target to be tested may be UI automation, and the test template may be a template of a test case, including an exl table, or the like, according to the test plan to simulate clicking a button to download the test template. According to the test template, the test case is compiled according to the identity identification number, the name attribute, the class name attribute, the label name, the hyperlink label, the path, the CSS and the like, and the test case is generated after the test case is compiled, so that the expected result of the test case is obtained, and the test case and the expected result of the test case are uploaded to a test system.
According to the embodiment of the disclosure, by specifically describing how to obtain the test case and the expected result of the test case, the source and the test target of the test case are defined, frequent configuration and modification of tool parameters are avoided, a test script and a secondary development test tool of a maintenance tool are not needed, labor cost is reduced, and the efficiency of system test is improved.
In some embodiments, a positioning target system under test includes: the target measured system is positioned by using an element positioning method, wherein the element positioning is to position the element through element information or an element hierarchical structure.
Element localization is the localization of an element by element information or an element hierarchy. The terminal 22 can locate the target system under test by means of element location methods, definitely the system that needs to be tested.
Optionally, the element positioning method includes at least one of the following: identification number positioning, name attribute positioning, class name attribute positioning, tag name positioning, hyperlink tag positioning, path positioning, CSS positioning.
The element positioning method comprises at least one of the following steps: identification number (Identity document, id) location, name attribute (name) location, class name attribute (class_name) location, tag name (tag_name) location, hyperlink label (link_text, partial link_text) location, path (XML Path Language, XPath) location, CSS location. That is, the element positioning may be performed according to one or more of the element positioning methods, the element positioning may be performed according to id positioning and link_text positioning, the element positioning may be performed according to name positioning, class_name positioning and tag_name positioning, and in particular, several positioning methods may be determined according to actual situations. It can be understood that the element has a name attribute and can be located by the name, if the element does not have the name attribute, the element cannot be located by using the name, and other locating methods are the same, which is not repeated in this embodiment.
Specifically, the id is unique just like the identification card number of each person, in web testing, the id value of an element can be used to distinguish between different elements, and then the element is located by its id attribute. id positioning method: element = driver.
Specifically, name positioning is to position an element according to an element name attribute. The name positioning method comprises the following steps: element = driver.
Specifically, class_name positioning is to position an element according to an element class attribute value. The style of an element is defined in the hypertext markup language by using class. If the class_name has multiple attribute values, only one of them can be used. The method for locating class_name comprises the following steps: element=driver.
Specifically, tag_name positioning is to position an element by tag name, such as a < a >: a tag. the tag_name positioning method comprises the following steps: element = driver.
Specifically, the positioning of the hyperlink label includes precise positioning (link_text) of the hyperlink label and partial positioning (partial_link_text) of the hyperlink label, and in the precise positioning method, the complete hyperlink text content must be filled in; partial positioning requires only filling in part of the text content of the hyperlink element.
Specifically, XPath positioning is to traverse elements in an XML document, thereby positioning the elements. XPath positioning includes absolute path positioning and relative path positioning.
Specifically, the CSS positioning is also CSS position positioning, including static positioning (static), relative positioning (relative), absolute positioning (absolute), fixed positioning (fixed), and viscous positioning (stick).
According to the embodiment of the disclosure, the element positioning method is used for positioning the target tested system, and the element positioning method is specifically described, so that the target tested system can be accurately positioned, and the accuracy of system testing is improved.
In some embodiments, after parsing the test case, the method further comprises: setting the test time of the test case;
the terminal 22 sets the test time for the target tested system by the test case, for example, after the test time is half an hour, 14:00, etc., namely, the timing is carried out for the test of the target tested system, namely, after 30min, 14:00, etc.
Correspondingly, the target tested system is tested according to the test case to obtain a test result, which comprises the following steps: and testing the target tested system according to the test case and the test time to obtain a test result.
Specifically, the target tested system is tested according to the test case and the test time, that is, when the test time arrives, for example, when the test time is 14:00, at time to 14:00, testing the target tested system through the test case, and obtaining a test result after a period of time, wherein the test result is the actual result of the test case.
According to the embodiment of the disclosure, the timing of testing the target tested system is achieved by setting the test time of the test case, so that the target tested system is prevented from being tested suddenly in the use stage, and the flexibility of the system test method is improved.
In some embodiments, the determination result includes: the test result is the same as the expected result, the test result is different from the expected result, and the test result is absent;
and comparing the expected result with the test result to judge whether the test of the target tested system is successful or not, and obtaining a judgment result, wherein the judgment result comprises the following steps: if the judging result is that the test result is the same as the expected result, the target tested system is tested successfully; and if the judging result is that the test result is different from the expected result or the test result is not available, the test of the target tested system fails.
Specifically, if the judgment result is that the test result is the same as the expected result, the terminal 22 determines that the test of the target tested system 21 is successful; if the test result is different from the expected result or there is no test result, the terminal 22 determines that the test of the target system under test 21 fails, and after modifying the target system under test, the terminal 22 needs to retest the target system under test 21.
The embodiment of the disclosure specifically describes that if the judging result is that the testing result is the same as the expected result, the target tested system is tested successfully; if the judging result is different from the expected result or no test result, the test of the target tested system fails, the test result of the target tested system is determined, and the reliability of the system test method is improved.
In some embodiments, before testing the target system under test according to the test case, the method further comprises: setting a contact way of a user;
the terminal 22 sets the contact information of the user, including the mobile phone number, micro signal, mailbox, etc.
Correspondingly, comparing the expected result with the test result, judging whether the test of the target tested system is successful, and after the judgment result is obtained, the method further comprises: and notifying the user through the contact way, and generating a test report according to the test result and the judgment result.
The terminal 22 notifies the user through the contact manner, and the specific notification manner is smart phone, short message, micro message, mail, etc., and generates a test report according to the test result and the judgment result, and the user can log in the test system of the terminal to check the test report. It will be appreciated that the user may also log into the test system of the terminal 22 at any time to view the test progress.
According to the embodiment of the disclosure, the user is notified after the judgment result is obtained by setting the user contact mode, the test report is generated, and the user can conveniently check the test report. The user is prevented from waiting for the judging result, and the flexibility of the system testing method is further improved.
Fig. 3 is a flowchart of a system testing method according to another embodiment of the present disclosure, as shown in fig. 3, the method includes the following steps:
s301, making a test plan.
The terminal 22 formulates a test plan based on the object under test, which may be UI automation, for example.
S302, downloading a test template according to the test plan.
The terminal 22 downloads a test template, which may specifically be a template of a test case, including an exl table, etc., according to the test plan simulation click button.
S303, generating the test case according to the test template.
The terminal 22 writes the test case according to the test template, and according to the characteristics, the test case can be generated after the test case is written according to the identification number, the name attribute, the class name attribute, the label name, the hyperlink label, the path, the CSS and the like.
S304, obtaining expected results of the test cases according to the test cases.
The terminal 22 obtains the expected result of the test case according to the test case, and uploads the test case and the expected result of the test case to the test system.
S305, positioning a target tested system by using an element positioning method, wherein the element positioning is to position the element through element information or an element hierarchical structure.
Element localization is the localization of an element by element information or an element hierarchy. The terminal 22 can locate the target system under test by means of element location methods, definitely the system that needs to be tested.
Optionally, the element positioning method includes at least one of: identification number (Identity document, id) location, name attribute (name) location, class name attribute (class_name) location, tag name (tag_name) location, hyperlink label (link_text, partial link_text) location, path (XML Path Language, XPath) location, CSS location.
Specifically, the id is unique just like the identification card number of each person, in web testing, the id value of an element can be used to distinguish between different elements, and then the element is located by its id attribute. id positioning method: element = driver.
Specifically, name positioning is to position an element according to an element name attribute. The name positioning method comprises the following steps: element = driver.
Specifically, class_name positioning is to position an element according to an element class attribute value. The style of an element is defined in the hypertext markup language by using class. If the class_name has multiple attribute values, only one of them can be used. The method for locating class_name comprises the following steps: element=driver.
Specifically, tag_name positioning is to position an element by tag name, such as a < a >: a tag. the tag_name positioning method comprises the following steps: element = driver, find_element_by_name ("signature").
Specifically, the positioning of the hyperlink label includes precise positioning (link_text) of the hyperlink label and partial positioning (partial_link_text) of the hyperlink label, and in the precise positioning method, the complete hyperlink text content must be filled in; partial positioning requires only filling in part of the text content of the hyperlink element.
Specifically, XPath positioning is to traverse elements in an XML document, thereby positioning the elements. XPath positioning includes absolute path positioning and relative path positioning.
Specifically, the CSS positioning is also CSS position positioning, including static positioning (static), relative positioning (relative), absolute positioning (absolute), fixed positioning (fixed), and viscous positioning (stick).
S306, analyzing the test case.
The terminal 22 analyzes the test cases.
S307, setting a contact way of the user and setting the test time of the test case.
The terminal 22 sets the contact information of the user, including the mobile phone number, micro signal, mailbox, etc. The terminal 22 sets the test time for the target tested system by the test case, for example, after the test time is half an hour, 14:00, etc., namely, the timing is carried out for the test of the target tested system, namely, after 30min, 14:00, etc.
S308, testing the target tested system according to the test case and the test time to obtain a test result.
And testing the target tested system according to the test case and the test time, namely, when the test time arrives, for example, when the test time is 14:00, at time to 14:00, testing the target tested system through the test case, and obtaining a test result after a period of time, wherein the test result is the actual result of the test case.
S309, comparing the expected result with the test result, judging whether the test of the target tested system is successful, and obtaining a judgment result.
Specifically, the implementation procedures and principles of S309 and S104 are consistent, and will not be described herein.
S310, notifying the user through the contact way, and generating a test report according to the test result and the judgment result.
The terminal 22 notifies the user through the contact manner, and the specific notification manner is smart phone, short message, micro message, mail, etc., and generates a test report according to the test result and the judgment result, and the user can log in the test system of the terminal to check the test report. It will be appreciated that the user may also log into the test system of the terminal 22 at any time to view the test progress.
According to the embodiment of the disclosure, the test case is separated from the web test code, so that the maintenance of test data is convenient, the test progress is supported to be checked, the timing can be set, the user can be notified by a short message after the test case is executed, the efficiency and accuracy of web test are improved, and a large amount of manpower time is saved.
FIG. 4 is a flowchart of a system test method according to another embodiment of the present disclosure, where a user logs in to a test system, and after the test system inputs a correct account number and a password, the test system logs in to the test system, creates a test plan by clicking a button to create a test plan, and after the test plan creation is completed, a test case template of the test plan may be downloaded; the method comprises the steps of locating a target tested system through an element locating method, compiling a test case through the test case template, uploading the test case to the test system after the test case is compiled, receiving the test case by the test system, analyzing the test case, configuring a user contact mode in system setting by a user after analyzing the test case, executing test on the target tested system through the test case at set time, checking the execution progress of the test case at any time by the user in the process of executing the test, generating a test report after the test case is executed, notifying the user through the user contact mode, and logging in the test system to check the test report by the user.
Fig. 5 is a schematic structural diagram of a system testing device according to an embodiment of the disclosure. The system testing device may be a terminal as described in the above embodiments, or the system testing device may be a part or assembly in the terminal. The system testing device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the system testing method, as shown in fig. 5, where the system testing device 50 includes: the device comprises an acquisition module 51, a positioning module 52, a testing module 53 and a judging module 54; the acquiring module 51 is configured to acquire a test case and an expected result of the test case; the positioning module 52 is used for positioning a target tested system and analyzing the test case; the test module 53 is configured to test the target tested system according to the test case, so as to obtain a test result; and the judging module 54 is configured to compare the expected result with the test result, judge whether the test of the target tested system is successful, and obtain a judgment result.
Optionally, the obtaining module 51 is further configured to make a test plan; downloading a test template according to the test plan; generating the test case according to the test template; and obtaining the expected result of the test case according to the test case.
Optionally, the positioning module 52 is further configured to position the target measured system using an element positioning method, where the element is positioned by element information or an element hierarchy.
Optionally, the element positioning method includes at least one of the following: identification number positioning, name attribute positioning, class name attribute positioning, tag name positioning, hyperlink tag positioning, path positioning, CSS positioning.
Optionally, the system testing device 50 further includes: the setting module is used for setting the test time of the test case; and the test module 53 is further configured to test the target tested system according to the test case and the test time, so as to obtain a test result.
Optionally, the judging result includes: the test result is the same as the expected result, the test result is different from the expected result, and the test result is absent; the judging module 54 is further configured to, if the judging result is that the test result is the same as the expected result, successfully test the target tested system; and if the judging result is that the test result is different from the expected result or the test result is not available, the test of the target tested system fails.
Optionally, the setting module is further configured to set a contact way of the user; the system testing device 50 further includes: and the generation module is used for notifying the user through the contact way and generating a test report according to the test result and the judgment result.
The system testing device of the embodiment shown in fig. 5 may be used to implement the technical solution of the embodiment of the system testing method, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device may be a terminal as described in the above embodiments. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the system test method, as shown in fig. 6, the electronic device 60 includes: a memory 61, a processor 62, computer programs and a communication interface 63; wherein the computer program is stored in the memory 61 and configured to be executed by the processor 62 for the system test method as described above.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the system testing method described in the above embodiment.
Furthermore, the disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implements a system test method as described above.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this disclosure, a computer-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. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
acquiring a test case and an expected result of the test case;
positioning a target tested system and analyzing the test case;
testing the target tested system according to the test case to obtain a test result;
and comparing the expected result with the test result, judging whether the test of the target tested system is successful, and obtaining a judgment result.
In addition, the electronic device may also perform other steps in the system test method as described above.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A system testing method, the method comprising:
acquiring a test case and an expected result of the test case;
positioning a target tested system and analyzing the test case;
testing the target tested system according to the test case to obtain a test result;
and comparing the expected result with the test result, judging whether the test of the target tested system is successful, and obtaining a judgment result.
2. The method of claim 1, wherein obtaining test cases and expected results of the test cases comprises:
making a test plan;
downloading a test template according to the test plan;
generating the test case according to the test template;
and obtaining the expected result of the test case according to the test case.
3. The method of claim 2, wherein locating the target system under test comprises:
the target measured system is positioned by using an element positioning method, wherein the element positioning is to position the element through element information or an element hierarchical structure.
4. A method according to claim 3, wherein the element locating method comprises at least one of: identification number positioning, name attribute positioning, class name attribute positioning, tag name positioning, hyperlink tag positioning, path positioning, CSS positioning.
5. The method of claim 1, wherein after parsing the test case, the method further comprises:
setting the test time of the test case;
correspondingly, the target tested system is tested according to the test case to obtain a test result, which comprises the following steps:
and testing the target tested system according to the test case and the test time to obtain a test result.
6. The method of claim 1, wherein the test results comprise: the test result is the same as the expected result, the test result is different from the expected result, and the test result is absent;
and comparing the expected result with the test result to judge whether the test of the target tested system is successful or not, and obtaining a judgment result, wherein the judgment result comprises the following steps:
if the judging result is the same as the expected result, the target tested system is successfully tested;
and if the judging result is that the test result is different from the expected result or the test result is not available, the test of the target tested system fails.
7. The method of claim 1, wherein prior to testing the target system under test according to the test case, the method further comprises:
setting a contact way of a user;
correspondingly, comparing the expected result with the test result, judging whether the test of the target tested system is successful, and after the judgment result is obtained, the method further comprises:
and notifying the user through the contact way, and generating a test report according to the test result and the judgment result.
8. A system testing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the test case and the expected result of the test case;
the positioning module is used for positioning a target tested system and analyzing the test case;
the test module is used for testing the target tested system according to the test case to obtain a test result;
and the judging module is used for comparing the expected result with the test result to judge whether the test of the target tested system is successful or not, so as to obtain a judging result.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202211564926.4A 2022-12-07 2022-12-07 System test method, device, equipment and computer readable storage medium Pending CN116244173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211564926.4A CN116244173A (en) 2022-12-07 2022-12-07 System test method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211564926.4A CN116244173A (en) 2022-12-07 2022-12-07 System test method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116244173A true CN116244173A (en) 2023-06-09

Family

ID=86623182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211564926.4A Pending CN116244173A (en) 2022-12-07 2022-12-07 System test method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116244173A (en)

Similar Documents

Publication Publication Date Title
US8612947B2 (en) System and method for remotely compiling multi-platform native applications for mobile devices
CN104699616B (en) The method of a kind of application test, Apparatus and system
US10698797B2 (en) Mobile application program testing method, server, terminal, and storage medium
CN111552644A (en) Micro-service architecture-based software continuous integration method
CN104077140A (en) Automatic compiling method and compiling device for continuous integration
CN108228190B (en) Persistent integration and delivery methods, systems, devices, and computer-readable storage media
CN109885480A (en) A kind of automatic interface compatibility test method and device based on debugging bridge
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN108804315B (en) Test method and device applied to dynamic development, electronic equipment and storage medium
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
CN111459509A (en) Container mirror image construction method and device and server
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN115658496A (en) Extensible Web automatic test method, system, equipment and storage medium
CN109739492B (en) Method, terminal, equipment and medium for generating script code
CN111813382A (en) Intangible asset management system and method
CN112988588B (en) Client software debugging method and device, storage medium and electronic equipment
CN112988578A (en) Automatic testing method and device
CN116244173A (en) System test method, device, equipment and computer readable storage medium
CN115599683A (en) Automatic testing method, device, equipment and storage medium
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN115934559A (en) Testing method of intelligent form testing system
CN114048134A (en) Automatic testing method and device based on POM and data driving
CN115269424A (en) Automatic regression testing method, device, equipment and storage medium for production flow
CN111950252A (en) HTTP response message format verification method, device and equipment

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