CN117033253A - Interface testing method and device, electronic equipment and storage medium - Google Patents
Interface testing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117033253A CN117033253A CN202311305322.2A CN202311305322A CN117033253A CN 117033253 A CN117033253 A CN 117033253A CN 202311305322 A CN202311305322 A CN 202311305322A CN 117033253 A CN117033253 A CN 117033253A
- Authority
- CN
- China
- Prior art keywords
- interface
- display information
- test
- target
- interface display
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 205
- 238000000034 method Methods 0.000 claims abstract description 34
- 238000012549 training Methods 0.000 claims description 27
- 238000006243 chemical reaction Methods 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 13
- 238000010998 test method Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 description 9
- 238000011161 development Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 241000282414 Homo sapiens Species 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000013519 translation Methods 0.000 description 5
- 210000004556 brain Anatomy 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000010076 replication Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
- G06N3/0455—Auto-encoder networks; Encoder-decoder networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Biomedical Technology (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the application provides an interface testing method, an interface testing device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a test request, wherein the test request at least comprises a target item name and a target interface identifier corresponding to the target item name; according to the target interface identification, interface display information corresponding to the target interface identification is determined, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface; generating a test case corresponding to the interface display information according to the interface display information; the test cases corresponding to the interface display information are displayed on the front-end interface, and the generated test cases are displayed on the front-end interface, so that the test period can be reduced and the labor consumption can be reduced by automatically generating the test cases.
Description
Technical Field
The present application relates to the field of testing technologies, and in particular, to an interface testing method, an apparatus, an electronic device, and a storage medium.
Background
With the continuous development of internet technology, many functions in the internet are realized by means of interfaces, such as uploading data, acquiring resources, and the like. Personnel at different stages all need to test the functions realized by the interfaces locally, and currently, interface request tools such as postman are adopted to check the returned contents, but the whole test flow needs to check the related information of the interfaces through the document addresses of the interfaces and copy the related information of the interfaces to the responding test tools for testing, if the number of the interfaces to be tested is large, the test period is long, the labor cost consumption is also large, the test period can be reduced in the interface test process, the labor consumption can be reduced, and the problem which needs to be solved urgently at present is solved.
Disclosure of Invention
An object of some embodiments of the present application is to provide an interface testing method, an apparatus, an electronic device, and a storage medium, by receiving a testing request, where the testing request includes at least a target item name and a target interface identifier corresponding to the target item name through the technical solution of the embodiments of the present application; determining interface display information corresponding to the target interface identifier according to the target interface identifier, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface; generating a test case corresponding to the interface display information according to the interface display information; in the embodiment of the application, the interface display information corresponding to the target interface identification is determined according to the target interface identification by acquiring the target interface identification in the test request, so as to generate the test case corresponding to the interface display information, and the generated test case can be displayed on the front end interface.
In a first aspect, some embodiments of the present application provide an interface testing method, including:
receiving a test request, wherein the test request at least comprises a target item name and a target interface identifier corresponding to the target item name;
determining interface display information corresponding to the target interface identifier according to the target interface identifier, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface;
generating a test case corresponding to the interface display information according to the interface display information;
and displaying the test cases corresponding to the interface display information on the front-end interface.
According to the method and the device for testing the interface, the interface display information corresponding to the target interface identification is determined according to the target interface identification in the test request, so that the test case corresponding to the interface display information is generated, the generated test case can be displayed on the front-end interface, the test period can be shortened, and the labor consumption can be reduced through automatic generation of the test case.
Optionally, the generating, according to the interface display information, a test case corresponding to the interface display information includes:
and generating a test case corresponding to the interface display information according to the request mode of the interface, the access address and the interface parameter by adopting a generation type pre-training conversion model.
According to some embodiments of the application, by adopting the generation type pre-training conversion model, according to the request mode of the interface, the access address and the interface parameter, the test cases corresponding to the interface display information are generated, the test cases corresponding to different interface display information can be automatically generated, and the generation efficiency of the test cases is improved.
Alternatively, the identification information of the target item name is obtained through python3+requests.
According to some embodiments of the application, the identification information of the target project name obtained through python3+requests can be used for performing regression test of the on-line interface function, and also can be used for periodically inspecting the running condition of the on-line environment interface, so that the problem of the on-line environment interface can be found out in time and solved, and meanwhile, the framework can reduce the work of automatic operation of the interface and improve the test efficiency.
Optionally, displaying, on the front-end interface, a test case corresponding to the interface display information, including:
and performing one or more test cases corresponding to the interface display information on the front-end interface through an interface of the generated pre-training conversion model.
According to some embodiments of the application, through generating the interface of the pre-training conversion model, one or more test cases corresponding to the interface display information are performed on the front-end interface, GPT is different from a small model which is focused on a specific task such as go playing or machine translation, and the AI large model is more similar to the brain of a human being, has two properties of large-scale and pre-training, can be pre-trained on massive general data, and can greatly improve generalization, universality and practicability of AI.
Optionally, the method further comprises:
and copying the displayed one or more test cases to obtain the copied test cases.
According to some embodiments of the application, the displayed one or more test cases are copied for testing the interfaces, so that independent test case writing is not needed for each interface, and the test efficiency of the test cases is improved.
Optionally, the method further comprises:
and modifying the interface display information.
In some embodiments of the present application, after the interface display information is obtained, the interface display information may be modified to perform secondary development.
In a second aspect, some embodiments of the present application provide an interface testing apparatus, comprising:
the receiving module is used for receiving a test request, wherein the test request at least comprises a target project name and a target interface identifier corresponding to the target project name;
the determining module is used for determining interface display information corresponding to the target interface identifier according to the target interface identifier, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface;
the generating module is used for generating a test case corresponding to the interface display information according to the interface display information;
and the display module is used for displaying the test cases corresponding to the interface display information on the front-end interface.
According to the method and the device for testing the interface, the interface display information corresponding to the target interface identification is determined according to the target interface identification in the test request, so that the test case corresponding to the interface display information is generated, the generated test case can be displayed on the front-end interface, the test period can be shortened, and the labor consumption can be reduced through automatic generation of the test case.
Optionally, the generating module is configured to:
and generating a test case corresponding to the interface display information according to the request mode of the interface, the access address and the interface parameter by adopting a generation type pre-training conversion model.
According to some embodiments of the application, by adopting the generation type pre-training conversion model, according to the request mode of the interface, the access address and the interface parameter, the test cases corresponding to the interface display information are generated, the test cases corresponding to different interface display information can be automatically generated, and the generation efficiency of the test cases is improved.
Alternatively, the identification information of the target item name is obtained through python3+requests.
According to some embodiments of the application, the identification information of the target project name obtained through python3+requests can be used for performing regression test of the on-line interface function, and also can be used for periodically inspecting the running condition of the on-line environment interface, so that the problem of the on-line environment interface can be found out in time and solved, and meanwhile, the framework can reduce the work of automatic operation of the interface and improve the test efficiency.
Optionally, the display module is configured to:
and performing one or more test cases corresponding to the interface display information on the front-end interface through an interface of the generated pre-training conversion model.
According to some embodiments of the application, through generating the interface of the pre-training conversion model, one or more test cases corresponding to the interface display information are performed on the front-end interface, GPT is different from a small model which is focused on a specific task such as go playing or machine translation, and the AI large model is more similar to the brain of a human being, has two properties of large-scale and pre-training, can perform pre-training on massive general data, and can greatly improve generalization, universality and practicability of artificial intelligence.
Optionally, the apparatus further comprises a replication module for:
and copying the displayed one or more test cases to obtain the copied test cases.
According to some embodiments of the application, the displayed one or more test cases are copied for testing the interfaces, so that independent test case writing is not needed for each interface, and the test efficiency of the test cases is improved.
Optionally, the apparatus further comprises a modification module for:
and modifying the interface display information.
In some embodiments of the present application, after the interface display information is obtained, the interface display information may be modified to perform secondary development.
In a third aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the interface testing method according to any of the embodiments of the first aspect.
In a fourth aspect, some embodiments of the application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the interface testing method according to any of the embodiments of the first aspect.
In a fifth aspect, some embodiments of the present application provide a computer program product, the computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the interface testing method according to any of the embodiments of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings that are required to be used in some embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be construed as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
Fig. 1 is a flow chart of an interface testing method according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for testing an interface according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a selection page of item names according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a selection page of another item name according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an interface testing device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of some embodiments of the present application will be described below with reference to the drawings in some embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
With the continuous development of internet technology, many functions in the internet are realized by means of interfaces, such as uploading data, acquiring resources, and the like. The personnel at different stages need to test the functions realized by the interfaces separately at the local place, and currently, interface request tools such as postman are adopted to check the returned contents, but the whole test flow needs to check the related information of the interfaces through the interface document addresses and copy the related information to the responding test tools for testing, if the number of the interfaces to be tested is large, the test period is long, and the labor cost is also high, therefore, some embodiments of the application provide an interface test method, which receives the test request, wherein the test request at least comprises the target item name and the target interface identifier corresponding to the target item name; according to the target interface identification, interface display information corresponding to the target interface identification is determined, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface; generating a test case corresponding to the interface display information according to the interface display information; in the embodiment of the application, the interface display information corresponding to the target interface identification is determined according to the target interface identification by acquiring the target interface identification in the test request, so as to generate the test case corresponding to the interface display information, and the generated test case can be displayed on the front end interface.
As shown in fig. 1, an embodiment of the present application provides an interface testing method, which includes:
s101, receiving a test request, wherein the test request at least comprises a target project name and a target interface identifier corresponding to the target project name;
specifically, in the embodiment of the application, a user can select a target item name and a target interface identifier corresponding to the target item name on an interface for receiving a test request, and in a specific application, by developing a plurality of large items, each large item corresponds to a plurality of small items, each small item corresponds to a plurality of interfaces, and the user can select an interface to be tested, namely the terminal equipment acquires the target interface identifier.
S102, determining interface display information corresponding to a target interface identifier according to the target interface identifier, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface;
the target interface identifier may be an interface ID, and the terminal device may obtain, according to the target interface identifier, interface display information corresponding to the target interface identifier, where the interface display information includes at least a request mode, an access address, an interface parameter, and a return content of the interface.
S103, generating a test case corresponding to the interface display information according to the interface display information;
specifically, after the terminal device obtains the interface display information, the terminal device processes the interface display information by adopting the GPT to generate test cases corresponding to the interface display information, wherein the number of the test cases can be set according to the needs, and the embodiment of the application is not particularly limited.
S104, displaying the test cases corresponding to the interface display information on the front-end interface.
Specifically, after the terminal device obtains the test case corresponding to the target interface identifier, the terminal device displays the test case corresponding to the interface display information on the front end interface through the GPT.
According to the method and the device for testing the interface, the interface display information corresponding to the target interface identification is determined according to the target interface identification in the test request, so that the test case corresponding to the interface display information is generated, the generated test case can be displayed on the front-end interface, the test period can be shortened, and the labor consumption can be reduced through automatic generation of the test case.
The interface test method provided by the embodiment of the application is further described in a further embodiment of the application.
Optionally, generating the test case corresponding to the interface display information according to the interface display information includes:
and generating a test case corresponding to the interface display information according to the request mode, the access address and the interface parameters of the interface by adopting a generating pre-training conversion model.
In the embodiment of the application, the terminal equipment adopts a ChatGPT generation type pre-training conversion model, and generates the test case corresponding to the interface display information according to the request, the access address and the interface parameter of the interface.
The ChatGPT is a natural language processing tool driven by artificial intelligence technology, can generate answers based on modes and statistical rules seen in a Pre-training stage, can interact according to the Chat context, can Chat and communicate like human beings, and can even complete the tasks of writing mails, video scripts, texts, translation, codes, writing papers and the like.
According to the method and the device for generating the test cases, the generation type pre-training conversion model is adopted, the test cases corresponding to the interface display information are generated according to the request mode, the access address and the interface parameters of the interface, the test cases corresponding to different interface display information can be automatically generated, and the generation efficiency of the test cases is improved.
Alternatively, the identification information of the target item name is obtained by python3+requests.
The requests module of Python can be used to construct and send various types of HTTP requests. The requests module provides a variety of HTTP request methods, such as GET, POST, PUT, DELETE, etc., to meet different needs.
In addition to the basic request method, the requests module allows us to attach additional request parameters such as request header, query parameters, timeout settings, etc., which can further customize the client request to meet specific needs, as follows:
request header for adding #
headers = {'User-Agent': 'Mozilla/5.0'}
response = requests.get('https://api.example.com/data', headers=headers)
Add query parameters #
params = {'key': 'value'}
response = requests.get('https://api.example.com/search', params=params)
# set timeout time
response = requests.get('https://api.example.com/data', timeout=5)
Therefore, the importance and the practicability of the requests module in the HTTP request provide a simple and easy-to-use method, and can be used for constructing and sending various HTTP requests and acquiring response results.
Using the requests module, requests GET, POST, PUT, DELETE, etc. can be easily sent with the addition of request parameters such as request header, query parameters, timeout settings, etc.
According to some embodiments of the application, the identification information of the target project name obtained through python3+requests can be used for performing regression test of the on-line interface function, and also can be used for periodically inspecting the running condition of the on-line environment interface, so that the problem of the on-line environment interface can be found out in time and solved, and meanwhile, the framework can reduce the work of automatic operation of the interface and improve the test efficiency.
Optionally, displaying the test case corresponding to the interface display information on the front-end interface includes:
and performing one or more test cases corresponding to the interface display information on the front-end interface through an interface of the generated pre-training conversion model.
Specifically, in the embodiment of the application, the back end of the terminal equipment generates one or more test cases corresponding to interface display information under the pre-training conversion model GPT framework, and sends the test cases from the back end to the front end, and the front end displays the test cases through the GPT.
According to some embodiments of the application, one or more test cases corresponding to interface display information are performed on a front-end interface through an interface of a generated pre-training conversion model, GPT is different from a small model which is focused on a specific task such as go playing or machine translation, and an AI large model is more similar to a human brain, has two properties of large-scale and pre-training, can be pre-trained on massive general data, and can greatly improve generalization, universality and practicability of the AI.
Optionally, the method further comprises:
and copying the displayed one or more test cases to obtain the copied test cases.
Specifically, the user can copy the generated test cases in the generated test cases, so that interface tests are performed, and the user does not need to write the test cases for each interface independently. According to some embodiments of the application, the displayed one or more test cases are copied for testing the interfaces, so that independent test case writing is not needed for each interface, and the test efficiency of the test cases is improved.
Optionally, the method further comprises: and modifying the interface display information.
Specifically, the user can modify the interface display information on the interface of the interface display information, so that different test requirements can be met, and manual writing workload is reduced.
In some embodiments of the present application, after the interface display information is obtained, the interface display information may be modified to perform secondary development.
Fig. 2 is a flow chart of another method for testing an interface according to an embodiment of the present application, where the method for testing an interface at least includes:
1. and acquiring a user identifier of a first token (unique user certificate) after logging in through an account number and a password of the YAPI platform.
Different account passwords are set for users with different authorities, so that the security of data processing is improved when different items are polymerized.
2. Adding the unique item identifier token acquired after login by using python3+requests, and requesting an interface list of each item group;
as shown in fig. 3, a plurality of item names, such as item 1, item 2, item 3, and item 4, are displayed on the display interface of the terminal device, and under each item, there are also sub-items, such as item 1 including sub-item 11, sub-item 12, sub-item 13, and sub-item 14, each corresponding to an interface list, wherein the interface list includes API-IDs of a plurality of interfaces, as shown in fig. 4.
3. And (3) requesting an interface detail page by using the API-ID in the interface list acquired in the step (2) to acquire the detailed information of the interface. Such as the request mode, address, parameters, and returned content of the interface.
And the terminal equipment acquires the interface ID in the interface list, requests the interface detail page, and obtains interface detailed information corresponding to the interface ID, namely interface display information, such as a request mode, an address, parameters and returned content of the interface.
And selecting corresponding development project departments, interface groups and interface actual names according to actual conditions, and acquiring interface detailed information.
The interface information is confirmed and secondary modifications (interface parameters) can be made to the requested content.
4. And the terminal equipment returns all the acquired interface display information corresponding to all the interface IDs to the front end of the terminal equipment through the fastpi framework, and the front end of the terminal equipment generates a test case by adopting GPT according to the interface display information.
In the process of generating the test cases, the number of the generated test cases can be selected to default to 10;
5. the front end of the terminal equipment displays the acquired interface information by using a vue +element+admin front end frame, and sends the interface information to the rear end of the terminal equipment after the corresponding interface information is selected.
6. The back end of the terminal equipment obtains interface display information, and parameter information of the interface is sent to the chatgpt interface through chatgpt (namely GPT) generation.
7. And finally, the returned content of chatgpt is presented on the front-end page.
After the front end interface of the terminal equipment displays the test cases, the generated test cases can be clicked, and the generated test cases can be checked at the lower part. Clicking copy can copy the specific content of the test case.
It should be noted that, in this embodiment, each of the embodiments may be implemented separately, or may be implemented in any combination without conflict, without limiting the application.
Another embodiment of the present application provides an interface testing apparatus, configured to execute the interface testing method provided in the foregoing embodiment.
Fig. 5 is a schematic structural diagram of an interface testing device according to an embodiment of the present application. The interface testing device comprises a receiving module 501, a determining module 502, a generating module 503 and a display module 504, wherein:
the receiving module 501 is configured to receive a test request, where the test request includes at least a target item name and a target interface identifier corresponding to the target item name;
the determining module 502 is configured to determine, according to the target interface identifier, interface display information corresponding to the target interface identifier, where the interface display information includes at least a request mode, an access address, an interface parameter, and a return content of the interface;
the generating module 503 is configured to generate a test case corresponding to the interface display information according to the interface display information;
the display module 504 is used for displaying the test cases corresponding to the interface display information on the front-end interface.
The specific manner in which the individual modules perform the operations of the apparatus of this embodiment has been described in detail in connection with embodiments of the method and will not be described in detail herein.
According to the method and the device for testing the interface, the interface display information corresponding to the target interface identification is determined according to the target interface identification in the test request, so that the test case corresponding to the interface display information is generated, the generated test case can be displayed on the front-end interface, the test period can be shortened, and the labor consumption can be reduced through automatic generation of the test case. The interface testing device provided by the embodiment of the application is further described in a further embodiment.
Optionally, the generating module is configured to:
and generating a test case corresponding to the interface display information according to the request mode, the access address and the interface parameters of the interface by adopting a generating pre-training conversion model.
According to the method and the device for generating the test cases, the generation type pre-training conversion model is adopted, the test cases corresponding to the interface display information are generated according to the request mode, the access address and the interface parameters of the interface, the test cases corresponding to different interface display information can be automatically generated, and the generation efficiency of the test cases is improved.
Alternatively, the identification information of the target item name is obtained by python3+requests.
According to some embodiments of the application, the identification information of the target project name obtained through python3+requests can be used for performing regression test of the on-line interface function, and also can be used for periodically inspecting the running condition of the on-line environment interface, so that the problem of the on-line environment interface can be found out in time and solved, and meanwhile, the framework can reduce the work of automatic operation of the interface and improve the test efficiency.
Optionally, the display module is configured to:
and performing one or more test cases corresponding to the interface display information on the front-end interface through an interface of the generated pre-training conversion model.
According to some embodiments of the application, one or more test cases corresponding to interface display information are performed on a front-end interface through an interface of a generated pre-training conversion model, GPT is different from a small model which is focused on a specific task such as go playing or machine translation, and an AI large model is more similar to a human brain, has two properties of large-scale and pre-training, can be pre-trained on massive general data, and can greatly improve generalization, universality and practicability of the AI.
Optionally, the apparatus further comprises a replication module for:
and copying the displayed one or more test cases to obtain the copied test cases.
According to some embodiments of the application, the displayed one or more test cases are copied for testing the interfaces, so that independent test case writing is not needed for each interface, and the test efficiency of the test cases is improved.
Optionally, the apparatus further comprises a modification module for:
and modifying the interface display information.
In some embodiments of the present application, after the interface display information is obtained, the interface display information may be modified to perform secondary development. The specific manner in which the individual modules perform the operations of the apparatus of this embodiment has been described in detail in connection with embodiments of the method and will not be described in detail herein.
It should be noted that, in this embodiment, each of the embodiments may be implemented separately, or may be implemented in any combination without conflict, without limiting the application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, can implement the operations of the method corresponding to any of the interface test methods provided in the above embodiments.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program can realize the operation of the method corresponding to any embodiment in the interface test method provided by the embodiment when being executed by a processor.
As shown in fig. 6, some embodiments of the present application provide an electronic device 600, the electronic device 600 comprising: memory 610, processor 620, and a computer program stored on memory 610 and executable on processor 620, wherein processor 620, when reading the program from memory 610 and executing the program via bus 630, may implement the method of any of the embodiments as included in the interface test method described above.
The processor 620 may process the digital signals and may include various computing structures. Such as a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements a combination of instruction sets. In some examples, the processor 620 may be a microprocessor.
Memory 610 may be used for storing instructions to be executed by processor 620 or data related to execution of the instructions. Such instructions and/or data may include code to implement some or all of the functions of one or more of the modules described in embodiments of the present application. The processor 620 of the disclosed embodiments may be configured to execute instructions in the memory 610 to implement the methods shown above. Memory 610 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memory known to those skilled in the art.
The above embodiments of the present application are only examples, and are not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely illustrative embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the technical scope of the present application, and the application should be covered. Therefore, the protection scope of the application is subject to the protection scope of the claims.
It is noted that 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.
Claims (10)
1. An interface testing method, the method comprising:
receiving a test request, wherein the test request at least comprises a target item name and a target interface identifier corresponding to the target item name;
determining interface display information corresponding to the target interface identifier according to the target interface identifier, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface;
generating a test case corresponding to the interface display information according to the interface display information;
and displaying the test cases corresponding to the interface display information on the front-end interface.
2. The interface testing method according to claim 1, wherein the generating a test case corresponding to the interface display information according to the interface display information includes:
and generating a test case corresponding to the interface display information according to the request mode of the interface, the access address and the interface parameter by adopting a generation type pre-training conversion model.
3. The interface test method according to claim 1, wherein the identification information of the target item name is obtained through python3+ requests.
4. The interface testing method according to claim 1, wherein displaying the test case corresponding to the interface display information on the front-end interface comprises:
and performing one or more test cases corresponding to the interface display information on the front-end interface through an interface of the generated pre-training conversion model.
5. The interface testing method of claim 4, further comprising:
and copying the displayed one or more test cases to obtain the copied test cases.
6. The interface testing method of claim 1, further comprising:
and modifying the interface display information.
7. An interface testing apparatus, the apparatus comprising:
the receiving module is used for receiving a test request, wherein the test request at least comprises a target project name and a target interface identifier corresponding to the target project name;
the determining module is used for determining interface display information corresponding to the target interface identifier according to the target interface identifier, wherein the interface display information at least comprises a request mode, an access address, interface parameters and returned contents of an interface;
the generating module is used for generating a test case corresponding to the interface display information according to the interface display information;
and the display module is used for displaying the test cases corresponding to the interface display information on the front-end interface.
8. The interface testing apparatus of claim 7, wherein the generating module is configured to:
and generating a test case corresponding to the interface display information according to the request mode of the interface, the access address and the interface parameter by adopting a generation type pre-training conversion model.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor is configured to implement the interface testing method of any one of claims 1-6 when the program is executed by the processor.
10. A computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, wherein the program, when executed by a processor, implements the interface testing method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311305322.2A CN117033253A (en) | 2023-10-10 | 2023-10-10 | Interface testing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311305322.2A CN117033253A (en) | 2023-10-10 | 2023-10-10 | Interface testing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117033253A true CN117033253A (en) | 2023-11-10 |
Family
ID=88623142
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311305322.2A Pending CN117033253A (en) | 2023-10-10 | 2023-10-10 | Interface testing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117033253A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117493198A (en) * | 2023-11-15 | 2024-02-02 | 北京安锐卓越信息技术股份有限公司 | Method, device and medium for automatically writing test cases |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138461A (en) * | 2015-09-23 | 2015-12-09 | 网易(杭州)网络有限公司 | Interface testing method and device for application program |
CN111708703A (en) * | 2020-06-18 | 2020-09-25 | 深圳前海微众银行股份有限公司 | Test case set generation method, device, equipment and computer readable storage medium |
CN112527630A (en) * | 2020-11-18 | 2021-03-19 | 平安消费金融有限公司 | Test case generation method and device, computer equipment and storage medium |
WO2021208423A1 (en) * | 2020-04-14 | 2021-10-21 | 艾瑞思检测技术(苏州)有限公司 | Display card interface machine testing method based on pca learning |
CN114138675A (en) * | 2021-12-23 | 2022-03-04 | 广州太平洋电脑信息咨询有限公司 | Interface test case generation method and device, electronic equipment and storage medium |
CN115145812A (en) * | 2022-06-28 | 2022-10-04 | 北京百度网讯科技有限公司 | Test case generation method and device, electronic equipment and storage medium |
US20230267073A1 (en) * | 2020-07-31 | 2023-08-24 | Telefonaktiebolaget Lm Ericsson (Publ) | Machine-learning based software testing technique |
-
2023
- 2023-10-10 CN CN202311305322.2A patent/CN117033253A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138461A (en) * | 2015-09-23 | 2015-12-09 | 网易(杭州)网络有限公司 | Interface testing method and device for application program |
WO2021208423A1 (en) * | 2020-04-14 | 2021-10-21 | 艾瑞思检测技术(苏州)有限公司 | Display card interface machine testing method based on pca learning |
CN111708703A (en) * | 2020-06-18 | 2020-09-25 | 深圳前海微众银行股份有限公司 | Test case set generation method, device, equipment and computer readable storage medium |
WO2021253904A1 (en) * | 2020-06-18 | 2021-12-23 | 深圳前海微众银行股份有限公司 | Test case set generation method, apparatus and device, and computer readable storage medium |
US20230267073A1 (en) * | 2020-07-31 | 2023-08-24 | Telefonaktiebolaget Lm Ericsson (Publ) | Machine-learning based software testing technique |
CN112527630A (en) * | 2020-11-18 | 2021-03-19 | 平安消费金融有限公司 | Test case generation method and device, computer equipment and storage medium |
CN114138675A (en) * | 2021-12-23 | 2022-03-04 | 广州太平洋电脑信息咨询有限公司 | Interface test case generation method and device, electronic equipment and storage medium |
CN115145812A (en) * | 2022-06-28 | 2022-10-04 | 北京百度网讯科技有限公司 | Test case generation method and device, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117493198A (en) * | 2023-11-15 | 2024-02-02 | 北京安锐卓越信息技术股份有限公司 | Method, device and medium for automatically writing test cases |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11188297B2 (en) | Automatic spoken dialogue script discovery | |
US11899681B2 (en) | Knowledge graph building method, electronic apparatus and non-transitory computer readable storage medium | |
US7899694B1 (en) | Generating solutions to problems via interactions with human responders | |
US9299041B2 (en) | Obtaining data from unstructured data for a structured data collection | |
US7992127B2 (en) | Method and system of encapsulating web site transactions for computer-aided generation of web services | |
US8904493B1 (en) | Image-based challenge-response testing | |
US20140330890A1 (en) | Context-Driven Application Information Access and Knowledge Sharing | |
EP2369480A2 (en) | Mashup infrastructure with learning mechanism | |
CN110825618B (en) | Method and related device for generating test case | |
US8756178B1 (en) | Automatic event categorization for event ticket network systems | |
US9213757B2 (en) | Content creation | |
US20210406913A1 (en) | Metric-Driven User Clustering for Online Recommendations | |
US20240111498A1 (en) | Apparatus, Device, Method and Computer Program for Generating Code using an LLM | |
CN102004794A (en) | Search engine system and implementation method thereof | |
CN106095766A (en) | Use selectivity again to talk and correct speech recognition | |
CN117033253A (en) | Interface testing method and device, electronic equipment and storage medium | |
Muslim et al. | A rule-based indicator definition tool for personalized learning analytics | |
WO2019217214A1 (en) | Personal history recall | |
JP2004178263A (en) | Web server, web server with function of java servlet, and computer program | |
Leeper | Crowdsourced data preprocessing with R and Amazon Mechanical Turk | |
CN113392200A (en) | Recommendation method and device based on user learning behaviors | |
CN113656719B (en) | Data rendering method, system, electronic device and storage medium | |
CN114491210A (en) | Data acquisition method and device based on web crawler | |
CN113672497A (en) | Method, device and equipment for generating non-buried point event and storage medium | |
CN112148194A (en) | Data statistical information input method and system and computer readable 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20231110 |
|
RJ01 | Rejection of invention patent application after publication |