CN115509900B - Method and system for generating functional test cases - Google Patents

Method and system for generating functional test cases Download PDF

Info

Publication number
CN115509900B
CN115509900B CN202211121805.2A CN202211121805A CN115509900B CN 115509900 B CN115509900 B CN 115509900B CN 202211121805 A CN202211121805 A CN 202211121805A CN 115509900 B CN115509900 B CN 115509900B
Authority
CN
China
Prior art keywords
track
acquiring
test
preset
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211121805.2A
Other languages
Chinese (zh)
Other versions
CN115509900A (en
Inventor
谢靖
夏健爽
叶徐林
唐颖丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yisoft Testing Technology Co ltd
Original Assignee
Shanghai Yisoft Testing 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 Shanghai Yisoft Testing Technology Co ltd filed Critical Shanghai Yisoft Testing Technology Co ltd
Priority to CN202211121805.2A priority Critical patent/CN115509900B/en
Publication of CN115509900A publication Critical patent/CN115509900A/en
Application granted granted Critical
Publication of CN115509900B publication Critical patent/CN115509900B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3696Methods or tools to render software testable

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)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a system for generating a functional test case, wherein the method comprises the following steps: step 1: constructing a function test case library; step 2: displaying a preset test function list; step 3: acquiring a first test function selected from a test function list by a user; step 4: and determining a first functional test case corresponding to the first test function from the functional test case library, and performing output generation. According to the method and the system for generating the functional test cases, when a user has the use requirement of the functional test cases, the user only needs to select the test functions from the test function list according to the self test requirement, the system can output and produce the corresponding functional test cases according to the functional test case library, the design is not needed manually, the convenience is improved, the functional test efficiency is improved, in addition, the user selects the proper test functions, the networking is not needed to inquire the existing functional test cases, and the condition of large test errors is avoided.

Description

Method and system for generating functional test cases
Technical Field
The present invention relates to the field of software applications, and in particular, to a method and system for generating a functional test case.
Background
Currently, when testing software applications, the testing needs to be performed based on a functional test case (TestCase). The functional test case is a description of a specific software product for testing tasks, and reflects testing schemes, methods, technologies and strategies. The content of the method comprises a test target, a test environment, a test step and the like.
Generally, during test execution, a worker designs functional test cases manually in advance according to test requirements, the design process of the functional test cases is complex, particularly complex software application functional test, and secondly, the functional test cases are organized and checked in the same level in the design and programming process, so that the labor cost is high, and the functional test efficiency is further reduced.
In addition, staff can inquire the existing functional test cases corresponding to the test requirements in a networking mode, however, if the existing functional test cases are directly put into use, the problems that the existing functional test cases are not necessarily universal, namely, the test functional cases are not suitable and the sources are unreliable exist, and large test errors possibly exist.
Thus, a solution is needed.
Disclosure of Invention
The invention aims to provide a method for generating functional test cases, when a user has the use requirement of the functional test cases, the user only needs to select test functions from a test function list according to the self test requirement, a system can output and produce corresponding functional test cases according to a functional test case library, the design is not needed manually, the convenience is improved, the functional test efficiency is improved, in addition, the user selects proper test functions, the networking is not needed to inquire the existing functional test cases, and the condition of large test errors is avoided.
The method for generating the functional test case provided by the embodiment of the invention comprises the following steps:
step 1: constructing a function test case library;
step 2: displaying a preset test function list;
step 3: acquiring a first test function selected from a test function list by a user;
step 4: and determining a first functional test case corresponding to the first test function from the functional test case library, and performing output generation.
Preferably, step 1: constructing a function test case library, comprising:
acquiring content to be put in storage;
acquiring a preset blank library, and storing the to-be-stored content into the blank library;
after the storage is finished, the blank library is used as a function test case library, and the construction is completed;
wherein, obtain the content of waiting to put in storage, include:
delivering preset content request information to a plurality of preset internal nodes, and acquiring a plurality of groups of second test functions and second function test cases which correspond to one another one by one and are replied by the internal nodes, wherein the second test functions and the second function test cases are used as the content to be put in storage;
and/or the number of the groups of groups,
and acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform and taking the third test functions and the third function test cases as contents to be put in storage.
Preferably, step 2: displaying a preset test function list, including:
acquiring a display interface of a user, and mapping a test function list into the display interface;
acquiring a sight line track formed by a sight line drop point in an interface in a first time preset recently by a user when the user views a test function list based on the display interface;
acquiring a plurality of interface blocks through which the line-of-sight track passes in the display interface;
traversing the interface blocks in sequence, and intercepting part of tracks of the sight line in the traversed interface blocks every time;
acquiring a preset standard sight line track and a track matching degree threshold corresponding to a content structure of target content in the traversed interface block;
calculating the track matching degree between the partial track and the standard sight track, and if the track matching degree is greater than or equal to the track matching degree threshold value, acquiring a content separator of the target content;
determining track dividing points corresponding to the content separators in the partial tracks, and dividing the partial tracks into a plurality of divided tracks based on the track dividing points;
extracting features of any of the segmented tracks to obtain a plurality of first track features;
acquiring a preset trigger track feature library, matching the first track feature with a second track feature in the trigger track feature library, and if the first track feature is matched with the second track feature, acquiring a preset trigger value corresponding to the matched second track feature;
accumulating and calculating trigger values to obtain a trigger value sum; the accumulated calculation formula is as follows:wherein d is the sum of trigger values, J i For the ith trigger value, O is the total number of trigger values;
if the trigger value sum is greater than or equal to a preset trigger value and a threshold value, acquiring preset explanation content corresponding to the query content in the target content corresponding to the corresponding segmentation track;
and displaying the interpretation content in any idle interface block in the display interface.
Preferably, before a plurality of groups of second test functions and second function test cases which are corresponding to one another one by one and replied by the internal node are obtained, verifying the credibility of the internal node, and executing the obtaining when the verification passes;
wherein verifying the trustworthiness of the internal node comprises:
acquiring node information of an internal node;
acquiring a preset credibility verification library, wherein the credibility verification library comprises: the verification basis of the multiple groups of one-to-one correspondence extracts a template and verifies an evaluation template;
sequentially traversing the verification basis extraction templates, and extracting verification basis information from node information based on the traversed verification basis extraction templates every time;
based on the traversed verification evaluation template corresponding to the verification basis extraction template, carrying out verification evaluation on the verification basis information to obtain an evaluation value;
after the traversing verification is finished according to the extraction template, accumulating and calculating the evaluation value to obtain an evaluation value sum, and taking the evaluation value sum as the credibility of the internal node; the accumulated calculation formula is as follows:gamma is the sum of evaluation values, Z t J is the total number of evaluation values, which is the t-th evaluation value;
if the credibility is larger than or equal to a preset credibility threshold, the credibility of the internal node passes the verification, otherwise, the credibility of the internal node does not pass the verification.
Preferably, the obtaining a plurality of groups of third test functions and third function test cases corresponding to each other from the big data platform includes:
acquiring evaluation information of the big data platform in a second time preset recently, wherein the evaluation information comprises: a plurality of groups of history acquisition requirements and use response information in one-to-one correspondence;
sequentially traversing the usage reverberation information, and determining a usage defect based on the traversed usage reverberation information every time;
based on the use defect, improving the history acquisition requirement corresponding to the traversed use response information to obtain an improvement requirement;
after the traversal using the reverberation information is finished, integrating each improvement requirement to obtain a proper acquisition requirement;
based on the proper acquisition requirement, a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence are acquired from the big data platform.
Preferably, determining the usage defect based on the traversed usage reverberation information includes:
extracting the characteristics of the traversed using reverberation information to obtain a plurality of reverberation information characteristics;
determining a usage defect based on the plurality of reverberation information characteristics;
wherein determining a usage defect based on the plurality of reverberation information characteristics comprises:
inputting a plurality of reverberation information characteristics into a preset usage defect determining model to determine a usage defect;
and/or the number of the groups of groups,
constructing a first usage reverberation description vector based on the plurality of reverberation information characteristics;
obtaining a preset usage defect determination library, wherein the usage defect determination library comprises: a plurality of groups of second using reverberation description vectors corresponding to one and using defect determination results;
matching the first use reverberation description vector with any second use reverberation description vector, and if the matching is met, taking a use defect determination result corresponding to the matched second use reverberation description vector as a use defect; wherein, the matching formula is: sigma=G 1 For the first use of the reverberation description vector, G 2 And if the matching degree is greater than or equal to a preset matching degree threshold, matching and conforming.
Preferably, the improvement of the history acquisition requirement corresponding to the traversed usage reverberation information based on the usage defect comprises:
acquiring a preset acquisition requirement improvement template corresponding to the use defect;
and improving the traversed historical acquisition requirements corresponding to the using reverberation information based on the acquisition requirement improvement template.
Preferably, the integration of the individual improvement requirements includes:
acquiring the requirement types of the improvement requirements;
classifying each improvement requirement based on the requirement type to obtain a plurality of classification sets;
counting the number of requirements of improvement requirements in the classification set;
if the number of the requirements is 1, taking the improvement requirements in the corresponding classification set as first target improvement requirements;
if the number of the requirements is not 1, acquiring the requirement standard of the improvement requirements in the corresponding classification sets, and taking the improvement requirement of the highest requirement standard in each corresponding classification set as a second target improvement requirement;
the first target improvement requirement and the second target improvement requirement are integrated to obtain a suitable acquisition requirement.
The system for generating the functional test case provided by the embodiment of the invention comprises the following components:
the construction module is used for constructing a function test case library;
the display module is used for displaying a preset test function list;
the acquisition module is used for acquiring a first test function selected from the test function list by a user;
the determining module is used for determining a first functional test case corresponding to the first test function from the functional test case library and generating output.
Preferably, the construction module constructs a functional test case library, including:
acquiring content to be put in storage;
acquiring a preset blank library, and storing the to-be-stored content into the blank library;
after the storage is finished, the blank library is used as a function test case library, and the construction is completed;
wherein, obtain the content of waiting to put in storage, include:
delivering preset content request information to a plurality of preset internal nodes, and acquiring a plurality of groups of second test functions and second function test cases which correspond to one another one by one and are replied by the internal nodes, wherein the second test functions and the second function test cases are used as the content to be put in storage;
and/or the number of the groups of groups,
and acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform and taking the third test functions and the third function test cases as contents to be put in storage.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram of a method for generating a functional test case according to an embodiment of the present invention;
FIGS. 2 to 4 are diagrams illustrating selection examples of generation cases of application software according to embodiments of the present invention;
FIGS. 5 and 6 are diagrams illustrating selection of application software use cases according to embodiments of the present invention;
FIG. 7 is a schematic diagram of a system for generating a functional test case according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
The embodiment of the invention provides a method for generating a functional test case, which is shown in fig. 1 and comprises the following steps:
step 1: constructing a function test case library;
step 2: displaying a preset test function list;
step 3: acquiring a first test function selected from a test function list by a user;
step 4: and determining a first functional test case corresponding to the first test function from the functional test case library, and performing output generation.
The working principle and the beneficial effects of the technical scheme are as follows:
the function test case library comprises function test cases corresponding to different test functions. The preset test function list enumerates a plurality of test functions, such as: application development testing, application acceptance testing, and the like. And displaying the test function list to enable a user to view, selecting a first test function from the list according to test requirements when the user views, determining a first function test case corresponding to the first test function from a function test case library, outputting and generating the first function test case for the user to use. Fig. 2 to 6 are exemplary diagrams of specific application software when the application is implemented.
According to the method and the system, when the user has the use requirement of the functional test cases, the user only needs to select the test functions from the test function list according to the self test requirement, the system can output the corresponding functional test cases according to the functional test case library, the design is not needed manually, convenience is improved, the functional test efficiency is improved, in addition, the user selects the proper test functions, the networking is not needed to inquire the existing functional test cases, and the situation that the test errors are large is avoided.
In one embodiment, step 1: constructing a function test case library, comprising:
acquiring content to be put in storage;
acquiring a preset blank library, and storing the to-be-stored content into the blank library;
after the storage is finished, the blank library is used as a function test case library, and the construction is completed;
wherein, obtain the content of waiting to put in storage, include:
delivering preset content request information to a plurality of preset internal nodes, and acquiring a plurality of groups of second test functions and second function test cases which correspond to one another one by one and are replied by the internal nodes, wherein the second test functions and the second function test cases are used as the content to be put in storage;
and/or the number of the groups of groups,
and acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform and taking the third test functions and the third function test cases as contents to be put in storage.
The working principle and the beneficial effects of the technical scheme are as follows:
the content to be put in storage is a function test case corresponding to different test functions. The preset blank library is a database without contents. And storing the to-be-stored content into a blank library to complete the construction of the function test case library.
There are two ways to obtain the content to be put in storage: 1. the design is carried out in advance by the staff in the interior; the preset internal node is a network node and is in communication butt joint with the mobile terminal of an internal staff; the preset content request information is information for requesting an internal staff to upload a newly designed function test case, for example: "please upload new design test case in time-! "; and delivering the content request information to the internal node, so that an internal staff can check the content request information, and when the staff checks the content request information, the newly designed multiple groups of second test functions and second function test cases which are in one-to-one correspondence can be replied to serve as the content to be put in storage. 2. Acquiring through a big data platform; the big data platform is responsible for collecting the test cases and realizing the sharing of test resources among software test engineers/software test companies.
The method and the device acquire the content to be warehoused in two ways, so that the comprehensiveness of the construction of the functional test case library is improved, and the applicability of the system is improved.
In one embodiment, step 2: displaying a preset test function list, including:
acquiring a display interface of a user, and mapping a test function list into the display interface;
acquiring a sight line track formed by a sight line drop point in an interface in a first time preset recently by a user when the user views a test function list based on the display interface;
acquiring a plurality of interface blocks through which the line-of-sight track passes in the display interface;
traversing the interface blocks in sequence, and intercepting part of tracks of the sight line in the traversed interface blocks every time;
acquiring a preset standard sight line track and a track matching degree threshold corresponding to a content structure of target content in the traversed interface block;
calculating the track matching degree between the partial track and the standard sight track, and if the track matching degree is greater than or equal to the track matching degree threshold value, acquiring a content separator of the target content;
determining track dividing points corresponding to the content separators in the partial tracks, and dividing the partial tracks into a plurality of divided tracks based on the track dividing points;
extracting features of any of the segmented tracks to obtain a plurality of first track features;
acquiring a preset trigger track feature library, matching the first track feature with a second track feature in the trigger track feature library, and if the first track feature is matched with the second track feature, acquiring a preset trigger value corresponding to the matched second track feature;
accumulating and calculating trigger values to obtain a trigger value sum; the accumulated calculation formula is as follows:wherein d is the sum of trigger values, J i For the ith trigger value, O is the total number of trigger values;
if the trigger value sum is greater than or equal to a preset trigger value and a threshold value, acquiring preset explanation content corresponding to the query content in the target content corresponding to the corresponding segmentation track;
and displaying the interpretation content in any idle interface block in the display interface.
The working principle and the beneficial effects of the technical scheme are as follows:
generally, when a user checks a test function list to select a test function, the user may not know some test functions or confuse some terms, and cannot perform adaptive selection, so as to influence the selection progress. Therefore, a solution is needed.
The display interface of the user is an interface of the mobile terminal used when the user views the test function list. When the test function list is mapped on the display interface, the user can see the test function list. When a user views, a line-of-sight falling point of the line of sight of the user in the display interface forms a line-of-sight track within the latest preset first time (for example, 15 seconds). The line-of-sight track passes through a plurality of interface blocks in the display interface; when the test function list is mapped to the display interface, each column of content in the test function list occupies one interface block of the display interface. And traversing the interface blocks in sequence, and intercepting part of tracks of which the sight tracks exist in the traversed interface blocks every time. Introducing a preset standard sight line track and a track matching degree threshold corresponding to a content structure of target content in the traversed interface block; the target content is a list of contents in the test function list, for example: test function names, test requirements, etc.; the content structure is a text distribution position, a text direction, etc. in the target content, for example: the text direction is from left to right, and 1 time of line feed is performed; the standard sight line track is a sight line track which should be generated if the user reads the target content, for example: the sight track is from left to right, from right to left, and from left to right; the track matching degree threshold is a limit value for verifying whether the user reads the target content. And calculating the track matching degree between the part of tracks and the standard sight line track, and if the track matching degree is greater than or equal to the track matching degree threshold value, indicating that the reading target content exists, and starting to determine the doubt generated by the user.
Content separators of target content are acquired, for example: ","; "sum". "etc. Track division points corresponding to the content separators in the partial tracks are determined, wherein the track division points are sight falling points generated when a user looks at the content separators. Based on the track dividing points, dividing part of the track to obtain a divided track, wherein the divided track is formed by the falling points of the line of sight of a section of content in the target content. Generally, when a user makes a question, a short line of sight is left in the question area. First trajectory features of the segmented trajectory are extracted, for example: the number of the track stay points and the stay time of the track stay points. A preset trigger track feature library is introduced, wherein the trigger track feature library has a second track feature which is a feature of a sight track that should be generated if a user makes a query on a certain section of content, for example: the number of the track stay points is not 0, the stay time of the track stay points is long, and the like. And matching the first track characteristic with a second track characteristic in the trigger track characteristic library, if the matching is met, indicating that a user possibly generates a query on a certain section of content, and introducing a preset trigger value corresponding to the matched second track characteristic, wherein the larger the trigger value is, the larger the probability that the second track characteristic reflects the user generates the query on the certain section of content is. And accumulating the calculated trigger values to obtain a trigger value sum. If the trigger value and the trigger value which are greater than or equal to the preset threshold value indicate that the user really generates a query on a certain section of content, the preset interpretation content corresponding to the query content in the target content corresponding to the corresponding segmented track is obtained, namely the content in the target content which is checked when the user generates the corresponding segmented track is used as the query content, and the corresponding interpretation content is introduced, for example: the content of the query is a test requirement and the interpretation of the content is a specific meaning of the requirement. And displaying the explanation content in any idle interface block in the display interface for the user to view.
When the user selects the test function, the method and the device adaptively determine the doubt content generated by the user, output and display the explanation content corresponding to the doubt content for the user to check, so that the user can more comprehensively know the function details, the function selection progress is improved, and the user experience is further improved. In addition, when the doubt content is determined, firstly, the fact that the user has the reading interface block content is determined according to the sight line track and the standard sight line track generated by the user, if yes, the detailed doubt content determination is performed, the occupation of determination resources is reduced, and the working efficiency of the system is improved. And secondly, introducing a trigger track feature library and a trigger value, and precisely determining the doubt content generated by the user.
In one embodiment, before a plurality of groups of second test functions and second function test cases corresponding to one by one are obtained, the reliability of the internal node is verified, and when the verification is passed, the obtaining is executed;
wherein verifying the trustworthiness of the internal node comprises:
acquiring node information of an internal node;
acquiring a preset credibility verification library, wherein the credibility verification library comprises: the verification basis of the multiple groups of one-to-one correspondence extracts a template and verifies an evaluation template;
sequentially traversing the verification basis extraction templates, and extracting verification basis information from node information based on the traversed verification basis extraction templates every time;
based on the traversed verification evaluation template corresponding to the verification basis extraction template, carrying out verification evaluation on the verification basis information to obtain an evaluation value;
after the traversing verification is finished according to the extraction template, accumulating and calculating the evaluation value to obtain an evaluation value sum, and taking the evaluation value sum as the credibility of the internal node; the accumulated calculation formula is as follows:gamma is the sum of evaluation values, Z t J is the total number of evaluation values, which is the t-th evaluation value;
if the credibility is larger than or equal to a preset credibility threshold, the credibility of the internal node passes the verification, otherwise, the credibility of the internal node does not pass the verification.
The working principle and the beneficial effects of the technical scheme are as follows:
in order to ensure the construction quality of the function test case library, before a plurality of groups of second test functions and second function test cases which are corresponding to one another one by one and replied by the internal nodes are acquired, the credibility of the internal nodes is verified, and the acquisition is performed when the verification is passed.
The node information of the internal nodes is design experience information of the functional test cases of corresponding designers, historically provided evaluation information used after the functional test cases are put in storage, and the like. Introducing a preset credibility verification library, wherein the one-to-one corresponding verification basis in the credibility verification library extracts templates and verification evaluation templates as, for example: to verify whether the experience degree of the designer is enough, the verification is to extract the design experience information according to the extraction template, and the verification evaluation module is "design experience is less than 1 year, the evaluation value is 30", the design experience is more than 1 year, the evaluation value is 100", and the like. Sequentially traversing the verification basis extraction templates, extracting verification basis information from node information based on the traversed verification basis extraction templates each time, and carrying out verification evaluation on the verification basis information based on the traversed verification evaluation templates corresponding to the verification basis extraction templates to obtain an evaluation value. The larger the evaluation value, the better the credibility of the internal node is. After the traversing verification basis extraction template is finished, accumulating and calculating the evaluation value to obtain an evaluation value sum, and accumulating and calculating the evaluation value to obtain the evaluation value sum. If the credibility is larger than or equal to a preset credibility threshold, the credibility of the internal node passes the verification, otherwise, the credibility of the internal node does not pass the verification.
The method and the device verify the credibility of the internal nodes, and ensure the construction quality of the functional test case library. In addition, during verification, a credibility verification library is introduced, so that verification efficiency of verification is improved.
In one embodiment, obtaining a plurality of groups of third test functions and third function test cases corresponding to each other from the big data platform includes:
acquiring evaluation information of the big data platform in a second time preset recently, wherein the evaluation information comprises: a plurality of groups of history acquisition requirements and use response information in one-to-one correspondence;
sequentially traversing the usage reverberation information, and determining a usage defect based on the traversed usage reverberation information every time;
based on the use defect, improving the history acquisition requirement corresponding to the traversed use response information to obtain an improvement requirement;
after the traversal using the reverberation information is finished, integrating each improvement requirement to obtain a proper acquisition requirement;
based on the proper acquisition requirement, a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence are acquired from the big data platform.
The working principle and the beneficial effects of the technical scheme are as follows:
the big data technology is convenient for sharing and acquiring data, but the quality of the acquired data is not guaranteed. In order to solve the problem, when a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence are acquired from a big data platform, evaluation information in a second time (for example, half a day) preset recently for the big data platform is acquired, a proper acquisition requirement is determined based on the evaluation information, and the acquisition is performed based on the proper acquisition requirement.
The evaluation information includes one-to-one history acquisition requirements for the data demand party for the big data platform, such as: the source of the functional test case needs to be that the guarantee value of the software test company and the big data platform for guaranteeing the authenticity of the functional test case needs to be larger than 70, and the problem that the data demand party uses after acquiring the required data based on the history acquisition requirement, such as: the functional test cases report errors when in use. The usage reverberation information is traversed in turn, and each traversal, based on the traversed usage reverberation information, a usage defect is determined. And improving the history acquisition requirements corresponding to the traversed use response information based on the use defects to obtain improvement requirements. Integrating the improvement requirements, the best suitable acquisition requirements are obtained.
According to the method and the device, when multiple groups of third test functions and third function test cases which are in one-to-one correspondence are acquired from the big data platform, the optimal proper acquisition requirement is determined based on the recent evaluation information of the big data platform, and the acquisition is performed based on the proper acquisition requirement, so that the acquisition quality is ensured, the applicability of realizing data sharing and data acquisition based on the big data technology is improved, in addition, the acquisition requirement is not required to be set by a user, and the user experience is improved.
In one embodiment, determining a usage defect based on the traversed usage reverberation information includes:
extracting the characteristics of the traversed using reverberation information to obtain a plurality of reverberation information characteristics;
determining a usage defect based on the plurality of reverberation information characteristics;
wherein determining a usage defect based on the plurality of reverberation information characteristics comprises:
inputting a plurality of reverberation information characteristics into a preset usage defect determining model to determine a usage defect;
and/or the number of the groups of groups,
constructing a first usage reverberation description vector based on the plurality of reverberation information characteristics;
obtaining a preset usage defect determination library, wherein the usage defect determination library comprises: a plurality of groups of second using reverberation description vectors corresponding to one and using defect determination results;
matching the first use reverberation description vector with any second use reverberation description vector, and if the matching is met, taking a use defect determination result corresponding to the matched second use reverberation description vector as a use defect; wherein, the matching formula is: sigma=G 1 For the first use of the reverberation description vector, G 2 And if the matching degree is greater than or equal to a preset matching degree threshold, matching and conforming.
The working principle and the beneficial effects of the technical scheme are as follows:
when determining the usage defect, extracting a plurality of traversed reverberation information characteristics of the usage reverberation information, for example: number of errors reported. Based on a plurality of reverberation characteristics, there are two ways to determine usage defects: 1. the method comprises the steps of introducing a preset usage defect determining model, wherein the usage defect determining model is an artificial intelligent model which is used for training a neural network model to be converged by utilizing a logic process of determining the usage defect according to the characteristic of the reverberation information by a large number of workers (for example, if the number of errors is more than 10, the usage defect is poor in stability of a functional test case), and inputting a plurality of the characteristic of the reverberation information into the preset usage defect determining model to determine the usage defect. 2. Constructing a first usage reverberation description vector based on the plurality of reverberation information characteristics; introducing a preset usage defect determination library, wherein the usage defect determination library is provided with one-to-one correspondence second usage reverberation description vectors and usage defect determination results, so as to construct the second usage reverberation description vectors according to the usage reverberation characteristics generated by different usage defect responses, and the different usage defects are different usage defect results; and matching the first using reverberation description vector with any second using reverberation description vector, and if the matching is met, taking a using defect determination result corresponding to the matched second using reverberation description vector as a using defect. The two modes can be alternatively carried out, or can be parallel, and when the two modes are parallel, the comparison and the determination are consistent, if not, the error reporting is carried out.
The application introduces two modes to determine the use defect, and improves the applicability of the system.
In one embodiment, improving the history acquisition requirements corresponding to the traversed usage reverberation information based on the usage defects includes:
acquiring a preset acquisition requirement improvement template corresponding to the use defect;
and improving the traversed historical acquisition requirements corresponding to the using reverberation information based on the acquisition requirement improvement template.
The working principle and the beneficial effects of the technical scheme are as follows:
when the historical acquisition requirements are improved based on the use defects, a preset acquisition requirement improvement template corresponding to the use defects is introduced, for example: if the use defect is that the stability of the functional test case is poor, the acquisition requirement improvement template is that the functional test case is required to be subjected to stability test after the design is completed, and the stability test is passed. And improving the traversed historical acquisition requirements corresponding to the using reverberation information based on the acquisition requirement improvement template. Improving efficiency.
In one embodiment, integrating individual improvement requirements includes:
acquiring the requirement types of the improvement requirements;
classifying each improvement requirement based on the requirement type to obtain a plurality of classification sets;
counting the number of requirements of improvement requirements in the classification set;
if the number of the requirements is 1, taking the improvement requirements in the corresponding classification set as first target improvement requirements;
if the number of the requirements is not 1, acquiring the requirement standard of the improvement requirements in the corresponding classification sets, and taking the improvement requirement of the highest requirement standard in each corresponding classification set as a second target improvement requirement;
the first target improvement requirement and the second target improvement requirement are integrated to obtain a suitable acquisition requirement.
The working principle and the beneficial effects of the technical scheme are as follows:
the types of requirements for the improvement requirements may be source requirements, warranty requirements, and the like. Based on the requirement types, each improvement requirement is classified, and a plurality of classification sets are obtained. If the number of requirements in the classification set is 1, the information screening is not needed, and the requirement can be directly used as the first target improvement requirement to be integrated. If the number of requirements is not 1, the improvement requirement of the highest requirement standard in each corresponding classification set is taken as a second target improvement requirement. The first target improvement requirement and the second target improvement requirement are integrated to obtain a suitable acquisition requirement. The requirement criteria are the degree of stringency of the requirements, for example: the improvement requirements of the 2 guarantee requirement types are respectively 'guarantee value greater than 50' and 'guarantee value greater than 70', wherein the requirement standard of the former is lower than that of the latter. And the rationality of improving the integration of the requirements is improved, and the suitability of determining the acquisition requirements is improved.
The embodiment of the invention provides a system for generating a functional test case, as shown in fig. 7, comprising:
the construction module 1 is used for constructing a functional test case library;
the display module 2 is used for displaying a preset test function list;
an obtaining module 3, configured to obtain a first test function selected by a user from a test function list;
and the determining module 4 is used for determining a first functional test case corresponding to the first test function from the functional test case library and generating output.
In one embodiment, the construction module 1 constructs a functional test case library, including:
acquiring content to be put in storage;
acquiring a preset blank library, and storing the to-be-stored content into the blank library;
after the storage is finished, the blank library is used as a function test case library, and the construction is completed;
wherein, obtain the content of waiting to put in storage, include:
delivering preset content request information to a plurality of preset internal nodes, and acquiring a plurality of groups of second test functions and second function test cases which correspond to one another one by one and are replied by the internal nodes, wherein the second test functions and the second function test cases are used as the content to be put in storage;
and/or the number of the groups of groups,
and acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform and taking the third test functions and the third function test cases as contents to be put in storage.
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 (9)

1. The method for generating the functional test case is characterized by comprising the following steps:
step 1: constructing a function test case library;
step 2: displaying a preset test function list;
step 3: acquiring a first test function selected from the test function list by a user;
step 4: determining a first functional test case corresponding to the first test function from the functional test case library, and performing output generation;
the step 2: displaying a preset test function list, including:
acquiring a display interface of a user, and mapping the test function list into the display interface;
acquiring a sight line track formed by a sight line falling point in the interface within a first time which is recently preset by a user when the user views the test function list based on the display interface;
acquiring a plurality of interface blocks through which the sight line track passes in the display interface;
traversing the interface block in sequence, and intercepting part of the track of the sight line existing in the traversed interface block every time;
acquiring a preset standard sight line track and a track matching degree threshold corresponding to the content structure of the target content in the traversed interface block;
calculating the track matching degree between the partial track and the standard sight track, and if the track matching degree is greater than or equal to the track matching degree threshold value, acquiring a content separator of the target content;
determining track division points corresponding to the content separators in the partial track, and dividing the partial track into a plurality of divided tracks based on the track division points;
extracting features of any of the segmented tracks to obtain a plurality of first track features;
acquiring a preset trigger track feature library, matching the first track feature with a second track feature in the trigger track feature library, and acquiring a preset trigger value corresponding to the second track feature matched with the first track feature if the first track feature is matched with the second track feature;
accumulating and calculating the trigger values to obtain a trigger value sum; the accumulated calculation formula is as follows:
wherein d is the trigger value sum, J i For the ith trigger value, O is the total number of the trigger values;
if the trigger value sum is greater than or equal to a preset trigger value and a threshold value, acquiring preset explanation content corresponding to the segmentation track corresponding to the query content in the target content;
and displaying the interpretation content in any idle interface block in the display interface.
2. The method for generating a functional test case according to claim 1, wherein the step 1: constructing a function test case library, comprising:
acquiring content to be put in storage;
acquiring a preset blank library, and storing the content to be stored into the blank library;
after the storage is finished, the blank library is used as a function test case library, and the construction is completed;
wherein, obtain the content of waiting to put in storage, include:
delivering preset content request information to a plurality of preset internal nodes, and acquiring a plurality of groups of second test functions and second function test cases which correspond to each other one by one and are replied by the internal nodes, wherein the second test functions and the second function test cases are used as the content to be put in storage;
and/or the number of the groups of groups,
and acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform and taking the third test functions and the third function test cases as contents to be put in storage.
3. The method for generating a functional test case according to claim 2, wherein before obtaining a plurality of sets of second test functions and second functional test cases corresponding to each other in one-to-one correspondence, the reliability of the internal node is verified, and when the verification is passed, the obtaining is performed;
wherein verifying the trust of the internal node comprises:
acquiring node information of the internal node;
acquiring a preset credibility verification library, wherein the credibility verification library comprises: the verification basis of the multiple groups of one-to-one correspondence extracts a template and verifies an evaluation template;
sequentially traversing the verification basis extraction templates, and extracting verification basis information from the node information based on the traversed verification basis extraction templates every time;
based on the traversed verification evaluation template corresponding to the verification basis extraction template, carrying out verification evaluation on the verification basis information to obtain an evaluation value;
after traversing the verification basis and extracting a template, accumulating and calculating the evaluation value to obtain an evaluation value sum, and taking the evaluation value sum as the credibility of the internal node; the accumulated calculation formula is as follows:
gamma is the sum of the evaluation values, Z t For the t-th said evaluation value, J is the total number of said evaluation values;
if the credibility is larger than or equal to a preset credibility threshold, the credibility of the internal node passes verification, otherwise, the credibility of the internal node does not pass verification.
4. The method for generating a functional test case according to claim 2, wherein the obtaining a plurality of groups of third test functions and third functional test cases corresponding to each other from the big data platform includes:
acquiring evaluation information of the big data platform in a second time preset recently, wherein the evaluation information comprises: a plurality of groups of history acquisition requirements and use response information in one-to-one correspondence;
sequentially traversing the use reverberation information, and determining a use defect based on the traversed use reverberation information every time;
based on the usage defect, improving the history acquisition requirement corresponding to the traversed usage reverberation information to obtain an improvement requirement;
after traversing the using reverberation information, integrating the improvement requirements to obtain proper acquisition requirements;
and based on the suitable acquisition requirement, acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform.
5. The method of claim 4, wherein determining a usage defect based on the traversed usage reverberation information comprises:
extracting the characteristics of the traversed using reverberation information to obtain a plurality of reverberation information characteristics;
determining a usage defect based on the plurality of reverberation information characteristics;
wherein determining a usage defect based on the plurality of reverberation information characteristics comprises:
inputting the plurality of reverberation information characteristics into a preset usage defect determining model to determine a usage defect;
and/or the number of the groups of groups,
constructing a first usage reverberation description vector based on the plurality of reverberation information characteristics;
obtaining a preset usage defect determination library, wherein the usage defect determination library comprises: a plurality of groups of second using reverberation description vectors corresponding to one and using defect determination results;
matching the first use reverberation description vector with any second use reverberation description vector, and if the matching is met, taking the use defect determination result corresponding to the second use reverberation description vector which is met as a use defect; wherein, the matching formula is:
G 1 for the first use of the reverberation description vector, G 2 And if the matching degree is greater than or equal to a preset matching degree threshold, matching and conforming.
6. The method of claim 4, wherein improving the history acquisition requirement corresponding to the traversed use response information based on the use defect comprises:
acquiring a preset acquisition requirement improvement template corresponding to the use defect;
and improving the traversed historical acquisition requirements corresponding to the using reverberation information based on the acquisition requirement improvement template.
7. The method for generating a functional test case as recited in claim 4, wherein integrating each of the improvement requirements comprises:
acquiring the requirement type of each improvement requirement;
classifying each improvement requirement based on the requirement type to obtain a plurality of classification sets;
counting the number of requirements of the improvement requirements in the classification set;
if the number of requirements is 1, taking the improvement requirement corresponding to the classification set as a first target improvement requirement;
if the number of requirements is not 1, acquiring requirement standards corresponding to the improvement requirements in the classification set, and taking the improvement requirement of each corresponding to the highest requirement standard in the classification set as a second target improvement requirement;
integrating the first target improvement requirement and the second target improvement requirement to obtain a suitable acquisition requirement.
8. A functional test case generation system, comprising:
the construction module is used for constructing a function test case library;
the display module is used for displaying a preset test function list;
the acquisition module is used for acquiring a first test function selected from the test function list by a user;
the determining module is used for determining a first functional test case corresponding to the first test function from the functional test case library and generating output;
the display module is configured to display a preset test function list, and includes:
acquiring a display interface of a user, and mapping the test function list into the display interface;
acquiring a sight line track formed by a sight line falling point in the interface within a first time which is recently preset by a user when the user views the test function list based on the display interface;
acquiring a plurality of interface blocks through which the sight line track passes in the display interface;
traversing the interface block in sequence, and intercepting part of the track of the sight line existing in the traversed interface block every time;
acquiring a preset standard sight line track and a track matching degree threshold corresponding to the content structure of the target content in the traversed interface block;
calculating the track matching degree between the partial track and the standard sight track, and if the track matching degree is greater than or equal to the track matching degree threshold value, acquiring a content separator of the target content;
determining track division points corresponding to the content separators in the partial track, and dividing the partial track into a plurality of divided tracks based on the track division points;
extracting features of any of the segmented tracks to obtain a plurality of first track features;
acquiring a preset trigger track feature library, matching the first track feature with a second track feature in the trigger track feature library, and acquiring a preset trigger value corresponding to the second track feature matched with the first track feature if the first track feature is matched with the second track feature;
accumulating and calculating the trigger values to obtain a trigger value sum; the accumulated calculation formula is as follows:
wherein d is the trigger value sum, J i For the ith trigger value, O is the total number of the trigger values;
if the trigger value sum is greater than or equal to a preset trigger value and a threshold value, acquiring preset explanation content corresponding to the segmentation track corresponding to the query content in the target content;
and displaying the interpretation content in any idle interface block in the display interface.
9. The functional test case generation system of claim 8, wherein the building module builds a functional test case library comprising:
acquiring content to be put in storage;
acquiring a preset blank library, and storing the content to be stored into the blank library;
after the storage is finished, the blank library is used as a function test case library, and the construction is completed;
wherein, obtain the content of waiting to put in storage, include:
delivering preset content request information to a plurality of preset internal nodes, and acquiring a plurality of groups of second test functions and second function test cases which correspond to each other one by one and are replied by the internal nodes, wherein the second test functions and the second function test cases are used as the content to be put in storage;
and/or the number of the groups of groups,
and acquiring a plurality of groups of third test functions and third function test cases which are in one-to-one correspondence from the big data platform and taking the third test functions and the third function test cases as contents to be put in storage.
CN202211121805.2A 2022-09-15 2022-09-15 Method and system for generating functional test cases Active CN115509900B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211121805.2A CN115509900B (en) 2022-09-15 2022-09-15 Method and system for generating functional test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211121805.2A CN115509900B (en) 2022-09-15 2022-09-15 Method and system for generating functional test cases

Publications (2)

Publication Number Publication Date
CN115509900A CN115509900A (en) 2022-12-23
CN115509900B true CN115509900B (en) 2024-02-02

Family

ID=84504465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211121805.2A Active CN115509900B (en) 2022-09-15 2022-09-15 Method and system for generating functional test cases

Country Status (1)

Country Link
CN (1) CN115509900B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500011A (en) * 2013-10-08 2014-01-08 百度在线网络技术(北京)有限公司 Eye movement track law analysis method and device
CN105824757A (en) * 2016-03-18 2016-08-03 北京光年无限科技有限公司 Test method and system based on robot operating system
CN109062178A (en) * 2018-07-20 2018-12-21 深圳市雷赛控制技术有限公司 A kind of automated testing method, device, test equipment and storage medium
CN112380138A (en) * 2020-12-07 2021-02-19 深圳开源互联网安全技术有限公司 Test case compiling method and device and storage medium
CN114077540A (en) * 2020-08-21 2022-02-22 北京金山云网络技术有限公司 Interface test system and interface test method
CA3131079A1 (en) * 2020-09-17 2022-03-17 10353744 Canada Ltd. Test case generation method and device, computer equipment and storage medium
CN114780386A (en) * 2022-03-24 2022-07-22 中国银行股份有限公司 Software testing method, device, equipment and storage medium
CN114817021A (en) * 2022-04-19 2022-07-29 中山大学南昌研究院 Intelligent cockpit HMI evaluation method based on eye movement control

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7366611B2 (en) * 2019-07-05 2023-10-23 キヤノン株式会社 Image processing device, image processing method, and program
US11249885B2 (en) * 2020-02-10 2022-02-15 EMC IP Holding Company LLC Test case generator and user interface

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500011A (en) * 2013-10-08 2014-01-08 百度在线网络技术(北京)有限公司 Eye movement track law analysis method and device
CN105824757A (en) * 2016-03-18 2016-08-03 北京光年无限科技有限公司 Test method and system based on robot operating system
CN109062178A (en) * 2018-07-20 2018-12-21 深圳市雷赛控制技术有限公司 A kind of automated testing method, device, test equipment and storage medium
CN114077540A (en) * 2020-08-21 2022-02-22 北京金山云网络技术有限公司 Interface test system and interface test method
CA3131079A1 (en) * 2020-09-17 2022-03-17 10353744 Canada Ltd. Test case generation method and device, computer equipment and storage medium
CN112380138A (en) * 2020-12-07 2021-02-19 深圳开源互联网安全技术有限公司 Test case compiling method and device and storage medium
CN114780386A (en) * 2022-03-24 2022-07-22 中国银行股份有限公司 Software testing method, device, equipment and storage medium
CN114817021A (en) * 2022-04-19 2022-07-29 中山大学南昌研究院 Intelligent cockpit HMI evaluation method based on eye movement control

Also Published As

Publication number Publication date
CN115509900A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN112327808A (en) Automobile fault diagnosis method and system and automobile fault diagnosis instrument
CN107861876A (en) Method of testing, device, computer equipment and readable storage medium storing program for executing
CN114490404A (en) Test case determination method and device, electronic equipment and storage medium
CN115577858B (en) Block chain-based carbon emission prediction method and device and electronic equipment
CN110929867A (en) Method, device and storage medium for evaluating and determining neural network structure
CN111339231A (en) Method and device for processing crowdsourcing update result
CN110991065B (en) Automatic identification method for design change in building information model
US20140149341A1 (en) System and method for refining address database for improving performance of automated mail sorting machine
CN116993396B (en) Risk early warning method based on vehicle user tag and computer equipment
CN115509900B (en) Method and system for generating functional test cases
CN101604336B (en) Method and system for data inspection and modification from the source
US7797136B2 (en) Metrics to evaluate process objects
CN110177006B (en) Node testing method and device based on interface prediction model
CN112860736A (en) Big data query optimization method and device and readable storage medium
TW202328996A (en) Code quality prediction under super extreme class imbalance or resource constraints
CN110334019A (en) A kind of test method, device and readable storage medium storing program for executing
CN115454787A (en) Alarm classification method and device, electronic equipment and storage medium
CN115470108A (en) Gateway route testing method and device for vehicle, electronic equipment and storage medium
CN115526650A (en) Smart city big data sharing service information processing method and system
CN109379640A (en) Barrage method of calibration, device, terminal and storage medium based on chained list mode
CN115185923B (en) Method and system for managing meteorological observation metadata and intelligent terminal
CN116881386B (en) Construction method and system of space environment space-time reference model
CN115878505B (en) Data caching method and system based on chip implementation
CN110856253B (en) Positioning method, positioning device, server and storage medium
CN115374130B (en) Atmospheric pollution historical data storage method and medium

Legal Events

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