CN116502612A - Test document processing method and device and electronic equipment - Google Patents

Test document processing method and device and electronic equipment Download PDF

Info

Publication number
CN116502612A
CN116502612A CN202310341000.7A CN202310341000A CN116502612A CN 116502612 A CN116502612 A CN 116502612A CN 202310341000 A CN202310341000 A CN 202310341000A CN 116502612 A CN116502612 A CN 116502612A
Authority
CN
China
Prior art keywords
document
test
chapter
production task
filling
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
CN202310341000.7A
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.)
Boc Financial Technology Co ltd
Original Assignee
Boc Financial 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 Boc Financial Technology Co ltd filed Critical Boc Financial Technology Co ltd
Priority to CN202310341000.7A priority Critical patent/CN116502612A/en
Publication of CN116502612A publication Critical patent/CN116502612A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • 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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • 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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Document Processing Apparatus (AREA)
  • Facsimiles In General (AREA)

Abstract

The invention provides a test document processing method, a device and electronic equipment, wherein the test document processing method comprises the following steps: acquiring at least one production task number of a test task; performing keyword matching and keyword replacement on the production task information based on the keyword dictionary to obtain a first document, and filling content corresponding to the target chapter into the first document to obtain a second document; in the case where it is determined that the missing information does not exist in the second document, the second document is saved. The method can realize the automation degree of the test document processing, reduce the time cost and simultaneously reduce the errors caused by manually copying and pasting the characters.

Description

Test document processing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a test document, and an electronic device.
Background
Currently, after the development of the product, a tester needs to test the product function to determine whether the developed product meets the requirement.
In the related art, a tester manually copies and pastes filling contents to corresponding sections in a test scheme document template, and as a single product often corresponds to various requirements, along with the increase of the dimension of test information, more time is required to be spent for adding various filling contents, so that errors are easy to occur, and the test efficiency is low.
Disclosure of Invention
The invention provides a test document processing method, a device and electronic equipment, which are used for solving the defects that the test task consumes more and is easy to make mistakes along with the increase of the dimension of test information when a tester manually copies and pastes filling content to a test scheme document template in the prior art, and realizing the improvement of the test efficiency.
The invention provides a test document processing method, which comprises the following steps:
acquiring at least one production task number of a test task, wherein each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information;
performing keyword matching and keyword replacement on the production task information based on a keyword dictionary to obtain a first document, and filling content corresponding to a target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited;
and storing the second document under the condition that the missing information is not determined in the second document, wherein the missing information is determined based on the line number and the table index number of the target chapter.
According to the test document processing method provided by the invention, the first document is presented in the form of a table, the table comprises a plurality of cells, and each cell corresponds to one type of filling content;
filling the filling content corresponding to the target chapter into the table to obtain a second document, wherein the filling content comprises:
sorting the target chapters according to a chapter editing sequence to obtain sorted chapters, wherein the chapter editing sequence is related to elements contained in the target chapters;
under the condition that the number of the filling contents corresponding to the target chapter does not exceed the number of the cells, filling the filling contents corresponding to the ordered chapter into the cells of the table to obtain the second document;
and under the condition that the number of the filling contents corresponding to the target chapter exceeds the number of the cells, expanding the number of the cells based on the number of the filling contents to obtain an expanded table, and filling the filling contents corresponding to the ordered chapter into the cells of the expanded table to obtain the second document.
According to the test document processing method provided by the invention, the first document is presented in the form of a table, the table comprises a plurality of cells, and each cell corresponds to one type of filling content;
after the filling content corresponding to the sorted chapters is filled in the table and before the second document is obtained, the method comprises the following steps:
and merging the cells corresponding to the similar filling content.
According to the test document processing method provided by the invention, the step of determining that the missing information does not exist in the second document is as follows:
searching the second document based on the keywords corresponding to the target chapter to obtain a line number and a table index number of the target chapter;
obtaining a chapter deletion condition corresponding to the position of the target chapter in the second document based on the line number and the table index number of the target chapter;
and under the condition that the chapter which does not exist at the position of the target chapter in the second document is missing, determining that missing information does not exist in the second document.
According to the test document processing method provided by the invention, after the at least one production task number of the test task is acquired, the method further comprises the following steps:
and sorting the at least one production task number according to time to obtain a task number list, wherein the task number list is used for carrying out keyword matching and keyword replacement on production task information corresponding to the at least one production task number based on a keyword dictionary so as to determine the first document.
According to the test document processing method provided by the invention, after the second document is saved, the method further comprises the following steps:
based on the second document, a testing scheme corresponding to the testing task is obtained, and the testing scheme is automatically stored in a storage space, wherein the storage space comprises at least one of a local storage space and an external storage space.
According to the test document processing method provided by the invention, the filling content comprises a demand source, a demand number, a demand name and demand content corresponding to the production task.
The invention also provides a test document processing device, which comprises:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring at least one production task number of a test task, each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information;
the document editing module is used for carrying out keyword matching and keyword replacement on the production task information based on a keyword dictionary to obtain a first document, and filling content corresponding to a target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited;
and the detection module is used for storing the second document under the condition that the second document is determined to have no missing information, wherein the missing information is determined based on the line number and the table index number of the target chapter.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the test document processing method as described in any of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a test document processing method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a test document processing method as described in any one of the above.
According to the test document processing method, the device and the electronic equipment, the keyword dictionary is used for carrying out keyword matching and keyword replacement on the production task information corresponding to the production task number list to obtain the first document, the filling content corresponding to the target chapter is filled into the first document to obtain the second document, and the test scheme is obtained under the condition that the second document is determined to have no missing information, so that the automation degree of test document processing can be realized, the time cost is reduced, and meanwhile, errors caused by manually copying and pasting the test information are reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a test document processing method provided by the invention;
FIG. 2 is a second flow chart of the test document processing method according to the present invention;
FIG. 3 is a schematic diagram of a test document processing device provided by the present invention;
fig. 4 is a schematic diagram of an entity structure of an electronic device according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are 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.
The test document processing method, apparatus and electronic device of the present invention are described below with reference to fig. 1 to 3.
FIG. 1 is a schematic flow chart of a test document processing method according to the present invention, as shown in FIG. 1, the test document processing method includes the following steps:
step 110, at least one production task number of a test task is obtained, each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information.
In this step, the production task number list includes a plurality of production task numbers, and after the products are developed, each product corresponds to one production task number, and one test task may include the production task numbers of a plurality of products at the same time.
For example, a test task has a single number of T-2205-JKPTCSSY-0002, corresponding to three production task numbers, respectively: m-202201-84870, wherein the type of the production task information associated with the production task number is 'maintenance requirement change class'; m-202203-87932, the corresponding production task information type is "maintenance requirement change class"; m-202204-89675, the corresponding production task information type is "project class".
In this embodiment, the production task number and the production task information may be grabbed from the web page by a tool, and the grabbed information is saved in a local csv file.
In this embodiment, the production task numbers in the production task number list may be arranged in a specified order, for example, a plurality of production task numbers may be ordered in such a manner that their production dates, names, or file sizes are the same; the manner of ordering may be in either a positive or a reverse order.
In this embodiment, the purpose of the test task is to write a test solution, where the test solution includes objective information and subjective information, and the objective information refers to a project name of the test task, an object of modification, a time of modification of each stage, a demand name, and the like, and these information determine that the test solution is not modifiable; subjective information refers to content that requires manual review, e.g., test analysis, test content, test policy portion, etc.
In this embodiment, the test scheme of the test task may include a plurality of chapters to be written, and each chapter may include text, a table, or a picture.
Step 120, carrying out keyword matching and keyword replacement on the production task information based on the keyword dictionary to obtain a first document, and filling content corresponding to the target chapter into the first document to obtain a second document; wherein the target chapter is at least one of a plurality of chapters to be edited.
In this step, the keyword dictionary includes the type of production task information, the mapped value, and the mapping relationship between the keywords and the mapped value in the production task information.
In this step, the first document may contain a document for which preliminary editing of the first production task information is completed.
As shown in the table 1, the first production task information may include a requirement number, a production task name, and other items, the first document includes filling content of the above items, and the second document further includes items such as a design product identifier, a product version condition, a product participation test condition, and the like, and filling content thereof, based on the first document content.
In this embodiment, the keyword dictionary includes a mapping value corresponding to a keyword in the production task information, and the first document including the keyword may be automatically generated according to matching of the production task information with the keyword of the keyword dictionary.
Table 1 first document correspondence table
In this embodiment, keyword replacement refers to automatically classifying production task information corresponding to multiple product identifiers into a column in which the product identifiers are located in the first document.
Table 2 is a second document corresponding table, which is obtained by filling the first document corresponding table in table 1 with a plurality of contents, wherein the filled contents include information such as product identifiers and versions, and then the parts (such as FPRS, DCDS, etc.) in different production task information, which refer to the product identifiers, are automatically classified into the column in table 1 where the "design product identifier" is located by using a keyword replacement function.
Table 2 second document correspondence table
In this embodiment, the sub-sections and tables that need to be added may be determined by analyzing the existing sections in the table template and determining the missing content of each column in table 2 according to the allocation in the test task sheet.
The product identification correspondence table as shown in table 3 includes: the "demand item", "service function", "service self function" and "remark" can enrich the filling content of each product identifier in the "related to product identifier" column through table 3.
Table 3 product identifier correspondence table
Demand item Service function Service sub-function Remarks
In this embodiment, the second document is filled with information such as a demand source, a demand number, a demand name, a demand content, a task number, a task name, a product name to be modified in the task, a product name condition to be matched, and the like of the production task. If multiple demands of multiple production tasks are involved, the number of lines of the form is automatically increased, and filling is continued.
In the embodiment, through an automatic scheme of keyword matching and keyword replacement, the copy and paste work with high dryness and repeatability can be reduced, and analysis of tasks by a test manager is not affected, namely, the test analysis, the test content and the test strategy part still need the test manager to write by themselves, and the scheme writing cannot be meaningless.
And 130, storing the second document under the condition that the missing information is not determined to exist in the second document, wherein the missing information is determined based on the line number and the table index number of the target chapter.
In this step, if the content in the second document has no missing or erroneous writing as compared with the information contained in the acquired production task, it is indicated that the second document has no missing information.
In the embodiment, whether the content at the corresponding searching position has missing information or not can be determined by searching the text content in the second document and utilizing the line number of the target chapter and the table index number, so that the edited second document can be quickly subjected to missing searching and leakage repairing.
In this embodiment, if the test scheme is newly formulated, writing is directly performed in sequence according to the above steps; if the test scheme is a change manuscript of the existing scheme, the content of the existing scheme can be reserved, and the change content is added in the second document, so that the problem of text loss of the existing test scheme caused by batch modification of the table when a new test task is issued can be solved.
In the embodiment, the obtained second document is automatically stored and exported to be a test scheme with high completion degree of objective information, so that a test manager can continuously fill subjective information in the test scheme.
According to the test document processing method, keyword matching and keyword replacement are carried out on the production task information corresponding to the production task number list through the keyword dictionary, a first document is obtained, filling content corresponding to the target chapter is filled into the first document, a second document is obtained, and a test scheme is obtained under the condition that missing information does not exist in the second document, so that the automation degree of test document processing can be achieved, the time cost is reduced, and meanwhile errors caused by manual copy and paste of characters are reduced.
In some embodiments, the first document is presented in the form of a table comprising a plurality of cells, each cell corresponding to a class of filler content; filling the filling content corresponding to the target chapter into the table to obtain a second document, wherein the filling content comprises: sorting the target chapters according to the chapter editing sequence to obtain sorted chapters, wherein the chapter editing sequence is related to elements contained in the target chapters; under the condition that the number of the filling contents corresponding to the target chapters does not exceed the number of the cells, filling the filling contents corresponding to the ordered chapters into the cells of the table to obtain a second document; and under the condition that the number of the filling contents corresponding to the target chapter exceeds the number of the plurality of cells, expanding the number of the plurality of cells based on the number of the filling contents to obtain an expanded table, and filling the filling contents corresponding to the ordered chapter into the cells of the expanded table to obtain a second document.
In this embodiment, the content of the test solution of one test task may include a plurality of chapters with writing, and the writing order of the plurality of chapters may also be set according to the user's requirement.
In this embodiment, the elements contained in the target section may refer to the number of forms to be filled in that the target section includes.
In this embodiment, the content of the chapters in the test solution may be presented in the form of a table, and if multiple demands of multiple production tasks are involved, the number of lines of the table may be automatically increased, and the filling is continued to be supplemented.
In this embodiment, the target chapter includes chapter 1.2, chapter 1.3, chapter 2.1, and chapter 4.5 of the test scheme, and the first document is edited sequentially according to the chapter editing order of 1.2-1.3-4.5-2.1 (since 2.1 chapters are not edited first in numerical order, because a large probability in chapter 2.1 introduces a large number of new tables, it is difficult for the following chapters to obtain a certain table index number, and therefore editing of the following chapters is completed first); editing the section 1.2 in the test scheme, mainly realizing filling of the table contents of the section 1.2, and needing to use the demand source, the demand number, the demand name and the demand content information of the production task. If multiple demands of multiple production tasks are involved, automatically increasing the number of lines of the form, and continuing filling; when editing section 1.3 in the test scheme, continuing editing on the basis of section 1.2, filling the task number, the task name corresponding to the requirement, the product name to be modified in the task and the product name to be matched into a form, and if a plurality of requirements of a plurality of production tasks are involved, automatically increasing the number of lines of the form and continuing filling; when editing the section 4.5 in the test scheme, continuing editing in the section 1.3, filling information of a task related responsible person, and if a plurality of tasks and products are involved, automatically increasing the number of lines of the form and then continuing filling; when editing the 2.1 section in the test scheme, the program locates the line numbers and table index numbers of the 2.1 section and the 2.2 section through searching the document characters, and adds the sub-section lacking in the scheme at the corresponding position. If the scheme is newly formulated, directly writing; if the scheme is a change manuscript of the previously written scheme, the original content can be reserved, and only the newly added content in the task is added in the document of the edition.
According to the test document processing method, different types of production task information are classified in the target chapter in the form of the table, the table order to be edited in the table is determined according to the chapter editing order, the row number of the table can be flexibly set according to the writing requirement, the writing requirement of multi-dimensional production task information can be met, and the practicability is high.
In some embodiments, the first document is presented in the form of a table comprising a plurality of cells, each cell corresponding to a class of filler content; after filling the filling content corresponding to the sorted chapters into the table and before obtaining the second document, the method comprises the following steps: and merging the cells corresponding to the similar filling content.
In this embodiment, since the production task information may have the same type, when the table is edited, whether different rows of the same type of filling content exist or not may be checked according to the row and column numbers of the table after the production task information is completely filled, and if so, the cells of the corresponding rows are combined and displayed, so that a second document with a cleaner display content may be obtained.
In some embodiments, the type of the filling form information can be screened according to the set cell merging program, and the first document is filled with the production task information and simultaneously the merging display of the same type of information is performed, so that the document editing steps can be reduced, and the document editing flow can be optimized.
According to the test document processing method, different types of production task information are classified in the form of the table in the target section, and the cells corresponding to the similar filling content are combined, so that the document editing efficiency and the document interface cleanliness are improved.
In some embodiments, the step of determining that no missing information is present in the second document is as follows: searching the second document based on the keywords corresponding to the target chapter to obtain a line number and a table index number of the target chapter; obtaining a chapter deletion condition corresponding to the position of the target chapter in the second document based on the line number and the table index number of the target chapter; and under the condition that the chapter which does not exist at the position of the target chapter in the second document is missing, determining that missing information does not exist in the second document.
In the embodiment, all products involved in the task list are respectively divided into chapters according to the test task area, and an empty table is added in each sub-chapter; firstly, analyzing the existing part in the form template, and storing the product identifier and the chapter number into a variable template; and integrating a target variable checkList according to the allocation condition in the task list. The two are compared to find the difference, so that the sub-chapter and the table which need to be added, namely the missing information, are obtained.
In this embodiment, the line number and the table index number of the target chapter may be used to check whether the sub-chapter is missing in the information filling area corresponding to the target chapter, so as to determine whether the information is missing in the second document.
In this embodiment, the start and end ranges may be defined by refining the production task information to ensure that the start editing line (start parameter) and the end editing line (end parameter) are interposed between the specified tape-written chapters, which may help to improve the running efficiency of the test document handler, reducing redundant loop traversal.
According to the test document processing method, the section missing condition corresponding to the position of the target section in the second document is obtained through searching by utilizing the line number and the table index number of the target section, so that the information missing condition in the second document is judged and determined, the using times of the circulation sentences are reduced, and the missing information screening efficiency is improved.
In some embodiments, after obtaining at least one production task number for the test task, the method further comprises: and sorting at least one production task number according to time to obtain a task number list, wherein the task number list is used for carrying out keyword matching and keyword replacement on production task information corresponding to the at least one production task number based on a keyword dictionary so as to determine a first document.
In this embodiment, if there are a plurality of production task numbers, the corresponding production task information is large, and at this time, the plurality of production task numbers may be sequentially arranged according to their start times by using numpy and pandas library tools to obtain the production task number list.
In this embodiment, when the test task number and the production task information thereof are automatically edited, the production task number corresponding to the query task number is tested first, if one test task number corresponds to a plurality of production task numbers, the production task number list is input into the time ordering module, the time ordering module can be used for querying the start time and the end time of the task, forward ordering is performed on the task list, and the tasks are output in the order of the start time and the end time, so that the production task number list is obtained.
According to the test document processing method, when the test task comprises a plurality of production task numbers, the production task numbers are sequenced according to the time sequence to obtain the production task number list, so that the operation of replacing document contents for a plurality of times can be reduced, the use of cyclic sentences is reduced, and the program execution efficiency is improved.
In some embodiments, after saving the second document, the method further comprises: and exporting the second document, and automatically saving the test scheme to a storage space, wherein the storage space comprises at least one of a local storage space and an external storage space.
In the embodiment, the obtained second document is automatically saved and output as a test scheme with high completion degree of objective information, so that a test manager can continuously fill in the subjective information part.
In this embodiment, the output test scheme may be stored in a local storage space, so as to facilitate management and invocation, or may be stored in an external storage miss, for example, a cloud storage space or other storage devices, so as to facilitate sharing of the test scheme.
According to the test document processing method, the test scheme is stored in the local storage space or the external storage space, so that the user can manage, call and share the test scheme conveniently.
In some embodiments, the filler content includes a demand source, a demand number, a demand name, and a demand content corresponding to the production task.
In this embodiment, when the first document is generated or edited, the content of the first document is mainly determined according to the mapping relation between keywords in different types of production task information and a keyword dictionary, and the keywords can be set as the demand source, the demand number, the demand name and the demand content information of the production task, that is, the keywords can be used as the dividing basis of different types of information of the first document, or when the first document is a table, the keywords can be used as the classifying basis of a row or a column; if multiple demands of multiple production tasks are involved, the number of lines of the form can be automatically increased at the filling positions corresponding to the same type of keywords of the original document, and the production task information can be continuously filled.
FIG. 2 is a second flow chart of the test document processing method provided by the present invention, in the embodiment shown in FIG. 2, the production task numbers are ordered according to time, and the first document is determined by keyword matching and replacement, if the target chapter to be edited is a chapter 1.2, a chapter 1.3, a chapter 4.5 and a chapter 2.1, the chapter sequence is sequentially filled, when the chapter 1.3 is written, the number of table rows is calculated, if the required number of table rows is insufficient, the number of rows is automatically increased according to the number of deletions, the products are ordered according to the version condition of the test task, the production task information of the products is sequentially and automatically filled into the table, and the table of the same kind is merged; when 2.1 chapters are written, sorting products according to the version condition of the test task, checking the slowly written sub-chapters, writing the sub-chapter titles after the checking is finished, and then writing the sub-chapter tables; when checking the sub-chapter to be written, the document can be searched to generate the existing sub-chapter, the test task list is searched to generate the full-scale sub-chapter, the difference value processing is adopted to generate the sub-chapter to be written, after the scheme 2.1 is completed, after checking that no missing information exists, the second document is automatically saved, and the second document is output as the test scheme.
According to the test document processing method, the filling content is set to be the demand source, the demand number, the demand name and the demand content, so that the category of production task information can be refined, and information division basis is provided for filling the production task information into the document.
The test document processing device provided by the invention is described below, and the test document processing device described below and the test document processing method described above can be referred to correspondingly to each other.
FIG. 3 is a schematic view of a test document processing device according to the present invention, as shown in FIG. 3, comprising: an acquisition module 310, a document editing module 320, and a detection module 330.
The obtaining module 310 is configured to obtain at least one production task number of a test task, where each production task number is associated with a type of production task information, the test task includes a plurality of chapters to be edited, and filling content corresponding to the plurality of chapters to be edited is determined based on the production task information;
the document editing module 320 is configured to perform keyword matching and keyword replacement on the production task information based on the keyword dictionary to obtain a first document, and fill the filling content corresponding to the target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited;
and a detection module 330, configured to save the second document if it is determined that there is no missing information in the second document, where the missing information is determined based on the line number and the table index number of the target chapter.
According to the test document processing device, keyword matching and keyword replacement are carried out on the production task information corresponding to the production task number list through the keyword dictionary, a first document is obtained, filling content corresponding to a target chapter is filled into the first document, a second document is obtained, and a test scheme is obtained under the condition that missing information does not exist in the second document, so that the degree of automation of test document processing can be achieved, time cost is reduced, and errors caused by manual copy and paste of characters are reduced.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. Processor 410 may invoke logic instructions in memory 430 to perform a test document processing method comprising: acquiring at least one production task number of a test task, wherein each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information; performing keyword matching and keyword replacement on the production task information based on the keyword dictionary to obtain a first document, and filling content corresponding to the target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited; and if the missing information is not determined to exist in the second document, the second text file is saved, and the missing information is determined based on the line number and the table index number of the target chapter.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the test document processing method provided by the above methods, the method comprising: acquiring at least one production task number of a test task, wherein each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information; performing keyword matching and keyword replacement on the production task information based on the keyword dictionary to obtain a first document, and filling content corresponding to the target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited; and storing the second document under the condition that the missing information is not determined in the second document, wherein the missing information is determined based on the line number of the target chapter and the table index number.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the test document processing method provided by the above methods, the method comprising: acquiring at least one production task number of a test task, wherein each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information; performing keyword matching and keyword replacement on the production task information based on the keyword dictionary to obtain a first document, and filling content corresponding to the target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited; and storing the second document under the condition that the missing information is not determined in the second document, wherein the missing information is determined based on the line number of the target chapter and the table index number.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A test document processing method, comprising:
acquiring at least one production task number of a test task, wherein each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information;
performing keyword matching and keyword replacement on the production task information based on a keyword dictionary to obtain a first document, and filling content corresponding to a target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited;
and storing the second document under the condition that the missing information is not determined in the second document, wherein the missing information is determined based on the line number and the table index number of the target chapter.
2. The test document processing method of claim 1, wherein the first document is presented in the form of a table, the table including a plurality of cells, each cell corresponding to a class of filler content;
filling the filling content corresponding to the target chapter into the table to obtain a second document, wherein the filling content comprises:
sorting the target chapters according to a chapter editing sequence to obtain sorted chapters, wherein the chapter editing sequence is related to elements contained in the target chapters; filling the filling content corresponding to the sorted chapters into the cells of the table under the condition that the number of the filling content corresponding to the target chapters does not exceed the number of the cells, so as to obtain the second document;
and under the condition that the number of the filling contents corresponding to the target chapter exceeds the number of the cells, expanding the number of the cells based on the number of the filling contents to obtain an expanded table, and filling the filling contents corresponding to the ordered chapter into the cells of the expanded table to obtain the second document.
3. The test document processing method of claim 2, wherein the first document is presented in the form of a table, the table including a plurality of cells, each cell corresponding to a class of filler content;
after the filling content corresponding to the target chapter is filled into the table and before the second document is obtained, the method comprises the following steps:
and merging the cells corresponding to the similar filling content.
4. The test document processing method according to claim 1, wherein the step of determining that no missing information exists in the second document is as follows:
searching the second document based on the keywords corresponding to the target chapter to obtain a line number and a table index number of the target chapter;
obtaining a chapter deletion condition corresponding to the position of the target chapter in the second document based on the line number and the table index number of the target chapter;
and under the condition that the chapter which does not exist at the position of the target chapter in the second document is missing, determining that missing information does not exist in the second document.
5. The test document processing method of claim 1, wherein after said obtaining at least one production task number of a test task, the method further comprises:
and sorting the at least one production task number according to time to obtain a task number list, wherein the task number list is used for carrying out keyword matching and keyword replacement on production task information corresponding to the at least one production task number based on a keyword dictionary so as to determine the first document.
6. The test document processing method according to claim 1, wherein after said saving said second document, said method further comprises:
based on the second document, a testing scheme corresponding to the testing task is obtained, and the testing scheme is automatically stored in a storage space, wherein the storage space comprises at least one of a local storage space and an external storage space.
7. A test document processing method according to any one of claims 1 to 3, wherein the filler content includes a demand source, a demand number, a demand name, and demand content corresponding to a production task.
8. A test document processing apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring at least one production task number of a test task, each production task number is associated with one type of production task information, the test task comprises a plurality of chapters to be edited, and filling content corresponding to the chapters to be edited is determined based on the production task information;
the document editing module is used for carrying out keyword matching and keyword replacement on the production task information based on a keyword dictionary to obtain a first document, and filling content corresponding to a target chapter into the first document to obtain a second document; the target chapter is at least one of a plurality of chapters to be edited;
and the detection module is used for storing the second document under the condition that the second document is determined to have no missing information, wherein the missing information is determined based on the line number and the table index number of the target chapter.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the test document processing method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the test document processing method according to any one of claims 1 to 7.
CN202310341000.7A 2023-03-31 2023-03-31 Test document processing method and device and electronic equipment Pending CN116502612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310341000.7A CN116502612A (en) 2023-03-31 2023-03-31 Test document processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310341000.7A CN116502612A (en) 2023-03-31 2023-03-31 Test document processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116502612A true CN116502612A (en) 2023-07-28

Family

ID=87315799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310341000.7A Pending CN116502612A (en) 2023-03-31 2023-03-31 Test document processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116502612A (en)

Similar Documents

Publication Publication Date Title
CN110292775B (en) Method and device for acquiring difference data
CN107122368B (en) Data verification method and device and electronic equipment
CN111553137B (en) Report generation method and device, storage medium and computer equipment
CN112328489A (en) Test case generation method and device, terminal equipment and storage medium
CN112800044A (en) Data quality determination and monitoring method, management system, storage medium and terminal
CN110765402A (en) Visual acquisition system and method based on network resources
CN113742227B (en) Control method, device, equipment and medium for software testing process
CN113918532A (en) Portrait label aggregation method, electronic device and storage medium
JPH09212353A (en) Method and device for supporting reused design
CN112463596B (en) Test case data processing method, device and equipment and processing equipment
CN117609181A (en) Method and system for migrating TCHouse database
CN116502612A (en) Test document processing method and device and electronic equipment
CN106776704A (en) Statistical information collection method and device
CN116629215A (en) Teaching document generation method and device, electronic equipment and storage medium
CN115422180A (en) Data verification method and system
CN114996148A (en) Automatic testing method and device based on pyspark, computer equipment and storage medium
CN114841281A (en) Data table identification method, device, equipment, medium and program product
CN113821691A (en) Document processing method and device, electronic equipment and readable storage medium
CN113780950A (en) Data processing method, device, server and readable storage medium
CN109697167B (en) Method and system for managing test variables, electronic device and storage medium
CN112612773A (en) Database synchronization test method and device, computer equipment and storage medium
CN112528613A (en) Data table generation method and related equipment thereof
US20160232187A1 (en) Dump analysis method, apparatus and non-transitory computer readable storage medium
CN117131058A (en) Parallel comparison database table data method based on data slicing
US20220327162A1 (en) Information search system

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