CN117493175A - Test case review method, device, equipment and medium - Google Patents

Test case review method, device, equipment and medium Download PDF

Info

Publication number
CN117493175A
CN117493175A CN202311395359.9A CN202311395359A CN117493175A CN 117493175 A CN117493175 A CN 117493175A CN 202311395359 A CN202311395359 A CN 202311395359A CN 117493175 A CN117493175 A CN 117493175A
Authority
CN
China
Prior art keywords
test case
reviewed
content
test
review
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
CN202311395359.9A
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.)
Nanjing Leading Technology Co Ltd
Original Assignee
Nanjing Leading 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 Nanjing Leading Technology Co Ltd filed Critical Nanjing Leading Technology Co Ltd
Priority to CN202311395359.9A priority Critical patent/CN117493175A/en
Publication of CN117493175A publication Critical patent/CN117493175A/en
Pending legal-status Critical Current

Links

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/3676Test management for coverage analysis
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The invention provides a test case review method, a device, equipment and a medium, and relates to the technical field of intelligent review, wherein the method comprises the following steps: acquiring description information of an object tested by using a test case to be reviewed; in the description information, abnormal information which is different from the test content recorded by the test case to be reviewed is found out; converting the abnormal information into text content which accords with the writing rule of the test case to be reviewed; and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed. According to the embodiment of the invention, the test case to be reviewed can be reviewed by using the description information of the object to be tested by the test case to be reviewed and the writing rule of the test case to be reviewed, and compared with manual review, the review efficiency is improved.

Description

Test case review method, device, equipment and medium
Technical Field
The invention relates to the technical field of intelligent review, in particular to a test case review method, a test case review device, test case review equipment and a test case review medium.
Background
The test cases are the basis information of the test schemes used in the test. The test case review is an important activity of product quality control in the test process, and can find problems and defects in the test case and repair the problems and defects in the test case, so that a modified test case is obtained, and the test case review is completed.
The current use case review is performed in the form of manual review. The evaluation is divided into a preliminary evaluation in the test and a total evaluation of all relevant roles of the requirements, so that more manpower is input. And the current test industry has a plurality of overall iteration rhythms faster, and has a plurality of objective condition constraints, such as: the requirements are more and more complicated, the change is quick, the iteration is quick, the whole test period is shorter, and the manual review work is difficult to develop, so that the review efficiency is low.
Disclosure of Invention
The invention provides a test case review method, a device, equipment and a medium, which can review the test case to be reviewed by using description information of an object to be tested by the test case to be reviewed and the writing rule of the test case to be reviewed, and compared with manual review, the review efficiency is improved.
In a first aspect, an embodiment of the present invention provides a test case review method, including:
acquiring description information of an object tested by using a test case to be reviewed;
in the description information, abnormal information which is different from the test content recorded by the test case to be reviewed is found out;
converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed;
and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed.
According to the method, the description information of the object to be tested by using the test case to be evaluated can be found out at different places of the test content recorded by the test case to be evaluated, the places are converted into the content conforming to the writing rule of the test case to be evaluated, and the test case to be evaluated is updated based on the content, so that the efficiency is higher compared with the case of manually evaluating the test case to be evaluated by the mode.
In one possible implementation manner, obtaining description information of an object tested by using a test case to be reviewed includes:
obtaining an interface development document of an object tested by using a test case to be reviewed, analyzing a uniform resource locator url, an input parameter and an output parameter from the interface development document, and taking the uniform resource locator url, the input parameter and the output parameter as the description information; and/or
And acquiring a product document of an object tested by using the test case to be reviewed, analyzing key information from the product document, and taking the key information as the description information.
According to the method, the key information can be extracted through the interface development document and the product document of the object to be tested by using the test case to be evaluated, so that the content to be tested is clearer.
In one possible implementation manner, updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed includes:
if abnormal information corresponding to the text content conforming to the writing rule of the test case to be reviewed does not appear in the test content recorded by the test case to be reviewed, directly adding the text content conforming to the writing rule of the test case to be reviewed to the test case to be reviewed;
if the part of the test contents recorded by the test case to be evaluated is determined to be wrong according to the abnormal information corresponding to the text contents conforming to the writing rule of the test case to be evaluated, replacing the wrong test contents in the test case to be evaluated with the text contents conforming to the writing rule of the test case to be evaluated.
According to the method, the problems that the test case to be reviewed lacks test content or is wrong can be detected, and the text content compounded with the written rules is adopted for repairing, so that the automatic review improves the review efficiency.
In one possible implementation manner, in the description information, abnormal information different from the test content recorded by the test case to be reviewed is found, the abnormal information is converted into text content conforming to the writing rule of the test case to be reviewed, and the test case to be reviewed is updated according to the text content conforming to the writing rule of the test case to be reviewed, including:
and taking the description information, the writing rule of the test case to be reviewed and the test case to be reviewed as inputs of a language model, so that the language model is realized in the description information, finding out abnormal information which is different from the test content recorded by the test case to be reviewed, converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed, updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed, and outputting the updated test case to be reviewed through the language model.
According to the method, the language model is adopted to realize the review of the test cases to be reviewed, and the manual question-answering mechanism can automatically conduct the review.
In one possible implementation manner, after updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed, the method further includes:
if the target content is in the updated test case to be reviewed, determining that the updated test case to be reviewed is completed;
the target content is preset test content; or alternatively
The target content is the content input by the review user.
According to the method, the updated test case to be reviewed can be detected, so that the accuracy of the updated test case to be reviewed is improved in the test case to be reviewed.
In one possible implementation manner, if the target content is in the updated test case to be reviewed, determining that the review of the updated test case to be reviewed is completed, where the target content is a content input by a review user, and includes:
converting the target content into content identifiable by a language model;
taking identifiable content of the language model and the updated test case to be reviewed as input of the language model, judging whether target content is in the updated test case to be reviewed through the language model, and taking the language model as a judging result;
if the judgment result is that the target content is in the updated test case to be reviewed, determining that the updated test case to be reviewed is completed.
According to the method, the updated test case to be reviewed can be subjected to question answering through the language model, namely the manual question answering mechanism, so that whether the target content is in the updated test case to be reviewed is detected, the manual question answering mechanism is provided, and the method can be better
In a second aspect, an embodiment of the present invention provides a test case review device, including:
the acquisition module is used for acquiring the description information of the object tested by using the test case to be reviewed;
the review module is used for finding out abnormal information which is different from the test content recorded by the test case to be reviewed in the description information; converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed; and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed.
In a third aspect, an embodiment of the present invention provides a server, including:
a processor;
a processor for executing a computer program or instructions in the memory such that the test case review method of any of the first aspects is performed.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, which when executed by a processor, causes the processor to perform the test case review method of any of the first aspects.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the test case review method of any of the first aspects described above.
In addition, the technical effects caused by any implementation manner of the second aspect to the fifth aspect may refer to the technical effects caused by different implementation manners of the first aspect, which are not described herein.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
FIG. 1 is a flowchart of a test case review method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another test case review method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another test case review method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a test case review device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Noun interpretation
The test case is the basis information of the test scheme used when the object is tested. Wherein the object is software, a device, or the like.
Test case review is to discover problems and defects in test cases and to repair problems and defects in test cases.
Currently, the manner of test case review is manual, and the efficiency of the manner of review is relatively low. Based on the above, the embodiment of the invention provides an automatic test case review method, which can automatically review the test case to be reviewed, thereby improving the review efficiency.
Referring to fig. 1, an embodiment of the present invention provides a test case review method, including:
s100: acquiring description information of an object tested by using a test case to be reviewed;
the description information of the object is a detailed description of functions, requirements and the like of the object. The object is exemplified by software, and the description information of the software comprises an interface development document and a product document. The interface development document and the product document can be obtained from the address storing the document during software development. For example, an interface development document of software may be obtained from YAPI (interface management platform).
S101: in the description information, abnormal information which is different from the test content recorded by the test case to be reviewed is found out;
wherein, the description information comprises all test contents of the object. The test cases to be reviewed are test contents one by one. Comparing the description information with the first test case in the test cases to be reviewed, when the information in the description information is the same as the first test content of the test cases to be reviewed, marking the information in the description information, when the information in the description information is different from the first test content of the test cases to be reviewed, the information is not in the test cases to be reviewed, marking processing is not performed, and the like, comparing each test content in the test cases to be reviewed with the description information, and the information without marking is abnormal information.
S102: converting the abnormal information into text content which accords with the writing rule of the test case to be reviewed;
s103: and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed.
For the abnormal information, two types of abnormal information are included, wherein one type of abnormal information is not recorded in the test case to be reviewed, and the other type of abnormal information is recorded in the test case to be reviewed, and the abnormal information comprises, but is not limited to, the situations that the abnormal information partially appears in one piece of test content in the test case to be reviewed, the abnormal information expresses errors in one piece of test content in the test case to be reviewed and the like.
Specific updating processes for the two cases comprise:
if the abnormal information corresponding to the text content conforming to the writing rule of the test case to be reviewed does not appear in the test content recorded by the test case to be reviewed, directly adding the text content conforming to the writing rule of the test case to be reviewed to the test case to be reviewed;
if the part of the test contents recorded by the test case to be reviewed is determined to be wrong according to the abnormal information corresponding to the text contents conforming to the writing rule of the test case to be reviewed, replacing the wrong test contents in the test case to be reviewed with the text contents conforming to the writing rule of the test case to be reviewed.
In order to enable the description information to express the test content more accurately, the main content in the interface development document and the product document can be used as the description information, and the implementation scheme for acquiring the description information of the object tested by using the test case to be evaluated comprises the following steps:
first kind: obtaining an interface development document of an object tested by using a test case to be reviewed, analyzing a uniform resource locator url, an input parameter and an output parameter from the interface development document, and taking the uniform resource locator url, the input parameter and the output parameter as description information;
second kind: acquiring a product document of an object tested by using a test case to be reviewed, analyzing key information from the product document, and taking the key information as description information;
third kind: obtaining an interface development document of an object tested by using a test case to be reviewed, analyzing a uniform resource locator url, an input parameter and an output parameter from the interface development document, and taking the uniform resource locator url, the input parameter and the output parameter as description information; and acquiring a product document of the object tested by using the test case to be reviewed, analyzing key information from the product document, and taking the key information as description information.
The method for analyzing the key information from the product document and taking the key information as the description information comprises the following steps: this can be achieved by cleaning and preprocessing the text, identifying named entities, extracting keywords, abstracting the document, matching the question and answer models, analyzing the structure of the document, and the like. A combination of these techniques may provide more contextual information to better understand the product document.
The specific implementation process is as follows:
semantic role labeling or syntax tree analysis is utilized to identify structures such as topics, subtopics, etc. in the product document. The product document may be specified to be written in a specified format to facilitate analysis of relationships between structures and paragraphs of the product document to better understand the context of the product document.
Text cleaning and preprocessing: the product text is split into words or phrases by using a word splitter (such as NLTK, spaCy, jieba, etc.), special characters, punctuation marks, stop words, etc. in the product document are removed, and operations such as morphological reduction, word bagging, marking, etc. are performed. This may help to improve understanding of the contents of the product document.
Named Entity Recognition (NER): using the NER model in NLP (Natural Language Processing ) technology, key entities (e.g., product names, functions, terms, etc.) can be identified in the product document. The NER model may provide a marker for important entities in the product document to better understand and address related issues.
Keyword extraction: keywords or phrases in the product document can be automatically extracted through keyword extraction technology, such as a python NLTK package, keyword extraction based on word frequency, keyword extraction based on TF-IDF and the like, and summary information of the document is obtained by utilizing the inductive abstract capability of the NLTK, so that the product document can be better understood.
And determining whether the content of the product document is comprehensive according to the title sequence of the product document, searching the fly-book document according with the title and the summary of the similar document by extracting keywords in the title and the summary of the document if the context information of the product document is not complete, and acquiring the corresponding keywords and summary information through the NLP technical process to improve the understanding of the product document.
In order to verify the updated test case to be reviewed, after updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed, the method further comprises the following steps:
if the target content is in the updated test case to be reviewed, determining that the review of the updated test case to be reviewed is completed;
the target content is preset test content; or alternatively
The target content is the content input by the review user.
In detail, the reviewer can write preset test content according to the content of the object which is required to be tested, after updating the test case to be reviewed, the preset test content is searched in the test case to be reviewed, and if yes, the completion of the review of the test case to be reviewed is determined. If not, the test case to be reviewed is incomplete, and the test case to be reviewed needs to be detected again. Specifically, a manual interface may be provided, and after determining that the preset test content is not in the updated test case to be reviewed, the prompt is used for prompting that the verification of the test case to be reviewed is not passed, and the verification is manually performed. And the test case to be reviewed can be updated again, and the newly updated test case to be reviewed is utilized for detection. Setting the number of times of updating again, and if the number of times exceeds the number of times, processing by using a manual interface.
In addition, the target content can be input by a review user at the self, a manual interface is provided in the actual application process, the review case inputs the content, the content is compared with the updated test case to be reviewed, whether the content is in the test case to be reviewed is determined, if yes, the completion of the review is determined, if not, the review user is prompted that the input content is not in the test case to be reviewed, and the review user can write the content into the updated test case to be reviewed according to the writing rule of the test case to be reviewed.
Referring to fig. 2, another test case review method is provided in an embodiment of the present invention, including:
s200: acquiring description information of an object tested by using a test case to be reviewed;
the manner of acquiring the description information is the same as that of fig. 1, and the details of the description information can be seen.
S201: and taking the description information, the writing rule of the test case to be reviewed and the test case to be reviewed as inputs of the language model, and outputting the updated test case to be reviewed.
In the language model, abnormal information which is different from the test content recorded by the test case to be reviewed is found out in the realization description information, the abnormal information is converted into text content which accords with the writing rule of the test case to be reviewed, and the test case to be reviewed is updated according to the text content which accords with the writing rule of the test case to be reviewed.
The writing rules for the test case to be reviewed may exist in the form of a design model of the test case to be reviewed. In detail, when the language model is used for evaluating the test cases to be evaluated, the writing forms of the test cases to be evaluated, which are output by the language model each time, are prevented from being different; in order to make the output test case to be reviewed more standard and meet the requirements of users, a test case design template can be preset, wherein the design template is the writing rule of the test case, when the language model recognizes that the intention is to review the test case to be reviewed, the user input and the test case template are formatted before the python is used for interacting with the api of the language model, then the token is used for encoding the test case to be input tensor, and finally the output tensor is decoded by the token, so that the updated test case to be reviewed is obtained.
The language model may be a chatGpt model.
In machine learning, a tensor is a multi-dimensional array. In natural language processing tasks, tensors are typically used to represent text data, with input tensors in the context of test cases referring to tensors that encode test case text into a digital representation that the model can understand. This input tensor will serve as the input to the model for the model to infer.
Therefore, the content which accords with the writing rule of the test case to be reviewed can be directly generated by utilizing the writing rule of the test case to be reviewed, so that the test case to be reviewed is updated.
Aiming at test cases to be reviewed: the conventional test case writing can be roughly divided into an excel mode and an xmind mode, the test case in the excel format can be analyzed by using an xlsx package of python, an xmind file can be analyzed into json format data by an xmindarser package of python, and then formatting operation is carried out according to the format of a test case template.
And inputting the test cases to be reviewed in the formatting operation into the language model for review operation.
When the language model is used for outputting the updated test case to be reviewed, if the generated updated test case to be reviewed is found to be inconsistent with expectations or not clear enough, the answer can be matched with preset common questions. If the matching is successful, a corresponding subsequent interaction model can be triggered to generate more accurate and detailed answers or challenges, and in detail, after the language model outputs the updated test cases to be reviewed, the target content can be converted into the identifiable content of the language model;
taking identifiable content of the language model and the updated test case to be reviewed as input of the language model, judging whether target content is in the updated test case to be reviewed or not through the language model, and obtaining a judging result;
and if the judgment result is that the target content is in the updated test case to be reviewed, determining that the review of the updated test case to be reviewed is completed.
Likewise, the target content is content input by the review user.
And analyzing the testing field and the application scene, and classifying and sorting common user problems. For example, for software testing, common problems may include functional requirements, boundary conditions, abnormal situations, and the like. Aiming at the problems, presetting and classifying can be carried out to form a problem library; the contents of the question library are written by the contents which can be tested by the reviewer according to the important requirements of the object, and the contents can be directly written according to the identifiable contents of the language model.
When the target content can be input by a review user, the content which is possibly not in accordance with the identifiable content of the language model is subjected to similarity calculation, the problem with the highest similarity is used as the identifiable content of the converted language model, the content is input into the language model, whether the target content is in the updated test case to be reviewed is judged through the language model, and a judgment result is obtained, wherein the judgment result is that the target content is in the updated test case to be reviewed or the target content is not in the updated test case to be reviewed. If the obtained judging result is that the target content is in the updated test case to be evaluated, the evaluation is determined to be completed, and if the obtained judging result is that the target content is not in the updated test case to be evaluated, the evaluation user can be prompted that the input content is not in the test case to be evaluated, and the evaluation user can write the content into the updated test case to be evaluated according to the writing rule of the test case to be evaluated.
In the actual running process, the feedback of the user is collected, and the questions of the user and answers generated by the language model are recorded. And by means of feedback, the preset common problems and the follow-up interaction model are continuously corrected and improved, and the accuracy and the relevance of the generated test cases are improved.
The invention aims at providing an automatic evaluation and supplement implementation method for test cases based on a language model, wherein the case evaluation is implemented by a training language model in an automatic evaluation mode according to a preset test case template. The above scheme can have the following priorities:
1. efficiency is improved: the automatic review cases can rapidly analyze and process a large number of test cases, and a large amount of time and manpower resources are saved in initial review. The test cases can be automatically evaluated and ordered in a short time, and the evaluation efficiency is improved.
2. Accuracy is improved: the automatic evaluation test case can follow the preset evaluation rules and criteria, so that the problems and defects in the test case can be detected more accurately, and the interference of subjective factors is avoided.
3. Providing comprehensiveness: the automatic test case review can be used for comprehensively checking the test case, including checking whether the test case meets the requirement, whether the test case has a boundary value and coverage of abnormal conditions, and the like. The coverage rate and the comprehensiveness of the test cases can be improved through automatic evaluation.
4. Providing consistency: the automatic review test case can ensure the consistency of the review process and avoid inconsistent review results caused by human factors. Each review is based on the same rules and criteria, and consistency of the results of the review can be maintained.
5. Providing auxiliary opinion: automatic review of test cases may provide suggestions and comments to the tester regarding test case optimization and improvement. According to the result of the evaluation, the tester can further adjust and optimize the test case, and the quality of the case design is improved.
Based on the above technical content, referring to fig. 3, an embodiment of the present invention provides a test solution, including:
s300: selecting a pre-training language model;
s301: presetting a problem during test case review;
s302: obtaining a design template of a test case;
s303: searching a document library according to the title of the product document, judging whether the document library has a document similar to the title, if so, executing S304, otherwise, executing S306;
s304: acquiring a document similar to a title;
s305: the documents close to the title are subjected to fixed format arrangement, and the arranged keywords are filled into a data source;
s306: extracting key information from a product document to form a data source; the specific implementation mode of extracting the key information from the product document is as follows: analyzing the text content, reducing the noise of the text by using jieba segmentation, and splitting the text into words or phrases; and extracting keywords and phrases by using NLTK based on word frequency and TF-IDF, and labeling key entities.
S307: acquiring an interface development document through YAPI;
s308: analyzing url, ginseng input and ginseng output in the interface development document; converting into interface data with a specified format;
s309: judging whether the test case to be reviewed is in the same document format as the test case design template; if yes, then S313 is performed; otherwise, executing S310;
s310: judging whether the format of the test case to be evaluated is an xmind format, if so, executing S311; otherwise, executing S312;
s311: analyzing the xmind file through an xmind server to obtain json format data;
s312: analyzing the excel format data and converting the excel format data into a test case to be reviewed, wherein the test case to be reviewed is identical to the test case design template;
s313: calling a language model, and inputting the test cases to be reviewed and the data sources which are the same as the test case design template into the language model to obtain updated test cases to be reviewed;
s314: matching the updated test case to be reviewed with a preset problem, judging whether the matching is successful, if so, executing S315, otherwise, executing S313;
s315: triggering a subsequent interaction model to generate a test case to be reviewed after review;
s316: and returning the test cases to be reviewed after review to the user according to the specified test case format.
Specifically, first, the pre-preparation performed before review involves S300 to S302; secondly, preparing data related to S303 to S312; finally, the review work is performed, and the steps S313 to S316 are designed.
S300-S302 specifically are: selecting a pre-completed language model, and setting a problem during test case review by a review user to design a design template of the review case.
S303-S312, wherein three parts of the acquired data can be performed simultaneously, and in the first step, a document library is searched according to the title of a product document, whether the document library has a document similar to the title or not is judged, the document similar to the title is acquired, the document similar to the title is subjected to fixed format arrangement, keywords are arranged and filled into a data source, and key information is extracted from the product document to form the data source; step two, acquiring an interface development document through YAPI, and analyzing url, ginseng and ginseng in the interface development document; converting into interface data with a specified format; and thirdly, judging whether the test case to be reviewed is in the same document format as the test case design template, if so, not needing to be converted, if not, adopting an xmin server to analyze an xmin file to obtain json format data, and if so, analyzing the excel format data to be converted into the test case to be reviewed which is in the same format as the test case design template.
S313 to S316: calling a language model, inputting a standard-format test case to be reviewed and a data source into the language model to obtain an updated test case to be reviewed, matching the updated test case to be reviewed with preset problems in order to verify whether the updated test case to be reviewed has added all the tested contents, if the matching is successful, indicating that the contents are in the test case to be reviewed, if the matching is unsuccessful, re-calling the language model, and inputting the standard-format test case to be reviewed and the data source into the language model to obtain the updated test case to be reviewed; after verification is successful, a manual interface can be provided, a subsequent interaction model is triggered, namely, a user is reviewed to input a problem, whether the content of the test which he wants to query is embodied in the test case to be reviewed is queried, if yes, the success of the review is indicated, if not, the problem is recorded, and after the completion, the test case to be reviewed is generated; and returning the test cases to be reviewed after review to the user according to the designated test case format, and automatically checking the test cases to be reviewed when the user can answer questions.
Based on the same inventive concept, the embodiment of the invention provides a test case review device, which is shown in combination with fig. 4 and comprises:
the acquiring module 400 is configured to acquire description information of an object tested by using a test case to be reviewed;
the review module 401 is configured to find out, in the description information, abnormal information different from the test content recorded by the test case to be reviewed; converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed; updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed
Optionally, the obtaining module 400 is specifically configured to:
obtaining an interface development document of an object tested by using a test case to be reviewed, analyzing a uniform resource locator url, an input parameter and an output parameter from the interface development document, and taking the uniform resource locator url, the input parameter and the output parameter as the description information; and/or
And acquiring a product document of an object tested by using the test case to be reviewed, analyzing key information from the product document, and taking the key information as the description information.
Optionally, the review module 401 is specifically configured to:
if abnormal information corresponding to the text content conforming to the writing rule of the test case to be reviewed does not appear in the test content recorded by the test case to be reviewed, directly adding the text content conforming to the writing rule of the test case to be reviewed to the test case to be reviewed;
if the part of the test contents recorded by the test case to be evaluated is determined to be wrong according to the abnormal information corresponding to the text contents conforming to the writing rule of the test case to be evaluated, replacing the wrong test contents in the test case to be evaluated with the text contents conforming to the writing rule of the test case to be evaluated.
Optionally, the review module 401 is specifically configured to:
and taking the description information, the writing rule of the test case to be reviewed and the test case to be reviewed as inputs of a language model, so that the language model is realized in the description information, finding out abnormal information which is different from the test content recorded by the test case to be reviewed, converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed, updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed, and outputting the updated test case to be reviewed through the language model.
Optionally, the apparatus further includes: a verification module;
the verification module is specifically used for: if the target content is in the updated test case to be reviewed, determining that the updated test case to be reviewed is completed;
the target content is preset test content; or alternatively
The target content is the content input by the review user.
Optionally, the verification module is specifically configured to: converting the target content into content identifiable by a language model;
taking identifiable content of the language model and the updated test case to be reviewed as input of the language model, judging whether target content is in the updated test case to be reviewed through the language model, and taking the language model as a judging result;
if the judgment result is that the target content is in the updated test case to be reviewed, determining that the updated test case to be reviewed is completed.
In addition, a test case review method and apparatus according to the embodiments of the present invention described in connection with fig. 1 to 4 may be implemented by a server.
A server, comprising: a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the test case review method of any of the above-described introduction.
Based on the above description, the server structure of fig. 5 is proposed by way of example.
The server may include a processor 510 and a memory 520 storing computer program instructions.
In particular, the processor 510 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present invention.
Memory 520 may include mass storage for data or instructions. By way of example, and not limitation, memory 520 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 520 may include removable or non-removable (or fixed) media, where appropriate. Memory 520 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 520 is a non-volatile solid state memory. In particular embodiments, memory 520 includes Read Only Memory (ROM). The ROM may be mask programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these, where appropriate.
Processor 510 implements the method of performing tasks of any of the embodiments described above by reading and executing computer program instructions stored in memory 520.
In one example, the server may also include a communication interface 530 and a bus 540. As shown in fig. 5, the processor 510, the memory 520, and the communication interface 530 are connected to each other by a bus 540 and perform communication with each other.
The communication interface 530 is mainly used to implement communication between each module, device, unit and/or apparatus in the embodiment of the present invention.
Bus 540 includes hardware, software, or both that couple the components of the server to one another. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 540 may include one or more buses, where appropriate. Although embodiments of the invention have been described and illustrated with respect to a particular bus, the invention contemplates any suitable bus or interconnect.
In addition, in combination with the server in the above embodiment, the embodiment of the present invention may provide a storage medium, which when the instructions in the storage medium are executed by the processor of the server, enables the server to execute the test case review method 5 as set forth in any one of the above.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A test case review method, comprising:
acquiring description information of an object tested by using a test case to be reviewed;
in the description information, abnormal information which is different from the test content recorded by the test case to be reviewed is found out;
converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed;
and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed.
2. The method of claim 1, wherein obtaining description information of an object tested using the test case to be reviewed comprises:
obtaining an interface development document of an object tested by using a test case to be reviewed, analyzing a uniform resource locator url, an input parameter and an output parameter from the interface development document, and taking the uniform resource locator url, the input parameter and the output parameter as the description information; and/or
And acquiring a product document of an object tested by using the test case to be reviewed, analyzing key information from the product document, and taking the key information as the description information.
3. The method of claim 1, wherein updating the test case to be reviewed according to the text content that conforms to the rules of the test case to be reviewed, comprises:
if abnormal information corresponding to the text content conforming to the writing rule of the test case to be reviewed does not appear in the test content recorded by the test case to be reviewed, directly adding the text content conforming to the writing rule of the test case to be reviewed to the test case to be reviewed;
if the part of the test contents recorded by the test case to be evaluated is determined to be wrong according to the abnormal information corresponding to the text contents conforming to the writing rule of the test case to be evaluated, replacing the wrong test contents in the test case to be evaluated with the text contents conforming to the writing rule of the test case to be evaluated.
4. A method according to any one of claims 1 to 3, wherein, in the description information, abnormality information different from the test content recorded by the test case to be reviewed is found, the abnormality information is converted into text content conforming to the writing rule of the test case to be reviewed, and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed includes:
and taking the description information, the writing rule of the test case to be reviewed and the test case to be reviewed as inputs of a language model, so that the language model is realized in the description information, finding out abnormal information which is different from the test content recorded by the test case to be reviewed, converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed, updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed, and outputting the updated test case to be reviewed through the language model.
5. The method of claim 4, wherein after updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed, the method further comprises:
if the target content is in the updated test case to be reviewed, determining that the updated test case to be reviewed is completed;
the target content is preset test content; or alternatively
The target content is the content input by the review user.
6. The method of claim 5, wherein if the target content is in the updated test case to be reviewed, determining that the review of the updated test case to be reviewed is completed, wherein the target content is a content input by a review user, comprising:
converting the target content into content identifiable by a language model;
taking identifiable content of the language model and the updated test case to be reviewed as input of the language model, judging whether target content is in the updated test case to be reviewed through the language model, and taking the language model as a judging result;
if the judgment result is that the target content is in the updated test case to be reviewed, determining that the updated test case to be reviewed is completed.
7. A test case review device, comprising:
the acquisition module is used for acquiring the description information of the object tested by using the test case to be reviewed;
the review module is used for finding out abnormal information which is different from the test content recorded by the test case to be reviewed in the description information; converting the abnormal information into text content conforming to the writing rule of the test case to be reviewed; and updating the test case to be reviewed according to the text content conforming to the writing rule of the test case to be reviewed.
8. A server, comprising:
a memory for storing a computer program or instructions;
a processor for executing a computer program or instructions in the memory, such that the method of any of claims 1-6 is performed.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program requests, which when executed by a computer, cause the computer to perform the method according to any of claims 1-6.
10. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the preceding claims 1-6.
CN202311395359.9A 2023-10-25 2023-10-25 Test case review method, device, equipment and medium Pending CN117493175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311395359.9A CN117493175A (en) 2023-10-25 2023-10-25 Test case review method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311395359.9A CN117493175A (en) 2023-10-25 2023-10-25 Test case review method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117493175A true CN117493175A (en) 2024-02-02

Family

ID=89675516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311395359.9A Pending CN117493175A (en) 2023-10-25 2023-10-25 Test case review method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117493175A (en)

Similar Documents

Publication Publication Date Title
CN110704633B (en) Named entity recognition method, named entity recognition device, named entity recognition computer equipment and named entity recognition storage medium
CN113076133B (en) Deep learning-based Java program internal annotation generation method and system
CN116244410B (en) Index data analysis method and system based on knowledge graph and natural language
CN111444718A (en) Insurance product demand document processing method and device and electronic equipment
CN117707922A (en) Method and device for generating test case, terminal equipment and readable storage medium
CN116934278A (en) Method and device for auditing construction scheme
CN116451646A (en) Standard draft detection method, system, electronic equipment and storage medium
CN112181490A (en) Method, device, equipment and medium for identifying function category in function point evaluation method
CN117648931A (en) Code examination method, device, electronic equipment and medium
CN117633161A (en) Training method of question-answering system, question-answering method and control device
CN117421226A (en) Defect report reconstruction method and system based on large language model
CN117556417A (en) Semi-supervised vulnerability assessment method based on code lexical and structural information fusion
CN116360794A (en) Database language analysis method, device, computer equipment and storage medium
CN114398492B (en) Knowledge graph construction method, terminal and medium in digital field
CN117493175A (en) Test case review method, device, equipment and medium
CN113722421B (en) Contract auditing method and system and computer readable storage medium
CN112115362B (en) Programming information recommendation method and device based on similar code recognition
CN114065762A (en) Text information processing method, device, medium and equipment
CN114154480A (en) Information extraction method, device, equipment and storage medium
CN114201177A (en) File generation method, file generation device, electronic equipment, medium and computer program product
Kumar et al. Generalized named entity recognition framework
CN115204182B (en) Method and system for identifying e-book data to be corrected
CN112686055B (en) Semantic recognition method and device, electronic equipment and storage medium
CN118396250B (en) Method, device, equipment and storage medium for generating production and production instruction
CN118394888B (en) Report automatic generation method, system, electronic equipment and storage medium

Legal Events

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