CN111191419A - Excel-to-xml method and system applicable to testlink - Google Patents

Excel-to-xml method and system applicable to testlink Download PDF

Info

Publication number
CN111191419A
CN111191419A CN201911366139.7A CN201911366139A CN111191419A CN 111191419 A CN111191419 A CN 111191419A CN 201911366139 A CN201911366139 A CN 201911366139A CN 111191419 A CN111191419 A CN 111191419A
Authority
CN
China
Prior art keywords
excel
xml
data
testlink
excel template
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
CN201911366139.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.)
Guangdong Flying Enterprise Internet Technology Co Ltd
Original Assignee
Guangdong Flying Enterprise Internet 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 Guangdong Flying Enterprise Internet Technology Co Ltd filed Critical Guangdong Flying Enterprise Internet Technology Co Ltd
Priority to CN201911366139.7A priority Critical patent/CN111191419A/en
Publication of CN111191419A publication Critical patent/CN111191419A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

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)
  • Document Processing Apparatus (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides an excel-to-xml method applicable to testlink, which comprises the following steps: acquiring an excel template filled with a test case, wherein the excel template is manufactured according to an xml file exported from a testlink test case management system; reading data in the excel template by using a POI technology and assembling the data into xml data; and calling the XMLwriter to output a corresponding xml format file according to the assembled xml data. By the method and the device, a user can supplement the testlink test case by using the excel template, then the excel file is converted into the xml file suitable for the testlink through the method and the device, and finally the xml file of the test case is imported into the testlink.

Description

Excel-to-xml method and system applicable to testlink
[ technical field ] A method for producing a semiconductor device
The application relates to the technical field of computers, in particular to an excel-to-xml method and system applicable to testlink.
[ background of the invention ]
Along with product publishing test, a test case is more and more important for product test integrity, and an open source free testklin is wider in application range, but as the testlink is only limited to importing an xml file and has relatively larger limitation for a basic user, the Excel-to-xml tool disclosed by the invention is more and more urgent for the user applying the testlink.
[ summary of the invention ]
In order to solve the problems, the application provides an excel-to-xml method and system applicable to testlink.
The application is realized by the following technical scheme:
the excel-to-xml method applicable to testlink comprises the following steps:
acquiring an excel template filled with a test case, wherein the excel template is manufactured according to an xml file exported from a testlink test case management system;
reading data in the excel template by using a POI technology and assembling the data into xml data;
and calling the XMLwriter to output a corresponding xml format file according to the assembled xml data.
In the method for converting excel into xml suitable for testlink, in the step of obtaining the excel template with the test case filled in, the excel template includes a function module, a case name, a scene, an operation step, and an expected result.
The method for converting excel into xml by using testlink as described above, in the step of reading data in the excel template by using POI technology and assembling into xml data, includes the following steps:
reading each row of data in the excel template by using a POI technology;
adding folder nodes and sub-nodes according to the functional modules in the excel template;
and creating a test case detail node according to the use case name, the scene, the operation steps and the expected result in the excel template.
The application also provides an excel-to-xml system applicable to testlink, comprising:
the excel acquisition module is used for acquiring an excel template filled with test cases, wherein the excel template is manufactured according to xml files exported from a testlink test case management system;
the assembly module is used for reading the data in the excel template by using POI technology and assembling the data into xml data;
and the output module is used for calling the XMLwriter to output the corresponding xml format file according to the assembled xml data.
The excel-to-xml system applicable to testlink as described above includes a function module, a use case name, a scenario, an operation step, and an expected result in the excel template.
The excel-to-xml system suitable for testlink as described above, the assembling module includes:
the reading unit is used for reading each row of data in the excel template by using POI technology;
the node adding unit is used for adding folder nodes and child nodes according to the functional modules in the excel template;
and the detail node creating unit is used for creating the test case detail node according to the use case name, the scene, the operation step and the expected result in the excel template.
Compared with the prior art, the method has the following advantages:
through the application, the user can use the excel template to supplement the testlink test case, then the excel file is converted into the xml file suitable for the testlink through the application, and finally the xml file of the test case is led into the testlink.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below.
FIG. 1 is a flow chart of an excel to xml method using testlink;
FIG. 2 is a schematic diagram of an excel template;
FIG. 3 is a block diagram of an excel-to-xml system architecture for testlink applications.
[ detailed description ] embodiments
The method for converting excel into xml suitable for testlink shown in FIG. 1 comprises the following steps:
s101, acquiring an excel template filled with test cases, wherein the excel template is manufactured according to xml files exported from a testlink test case management system.
In this step, a user prepares a correct excel template shown in fig. 2 in advance according to an xml file exported from the testlink test case management system and well writes contents therein, and specifically, the excel template includes content modules such as a function module, a case name, a scene, an operation step, an expected result, and the like.
And S102, reading the data in the excel template by using the POI technology and assembling the data into xml data.
In this step, the POI technology is an existing excel read-write technology, and specifically includes the following steps:
reading each row of data in the excel template by using a POI technology;
adding folder nodes and sub-nodes according to the functional modules in the excel template;
and creating test case detail nodes according to the use case names, the scenes, the operation steps and the expected results in the excel template, and finally assembling into an xml data root form suitable for testlink.
And S103, calling the XMLwriter to output a corresponding xml format file according to the assembled xml data.
Through the application, the user can use the excel template to supplement the testlink test case, then the excel file is converted into the xml file suitable for the testlink through the application, and finally the xml file of the test case is led into the testlink.
The embodiment also provides an excel-to-xml system applicable to testlink as shown in fig. 3, which includes an excel obtaining module 11, an assembling module 12 and an output module 13.
The excel acquisition module 11 is used for acquiring an excel template filled with test cases, wherein the excel template is manufactured according to xml files exported from a testlink test case management system; the excel template comprises a function module, a use case name, a scene, an operation step and an expected result.
The assembling module 12 is used for reading the data in the excel template by using POI technology and assembling the data into xml data. The construction module 12 includes a reading unit 121, a node adding unit 122, and a detail node creating unit 123. The reading unit 121 is used for reading each line of data in the excel template by using POI technology. The node adding unit 122 is configured to add a folder node and a child node according to a function module in the excel template. The detail node creating unit 123 is configured to create a test case detail node according to the use case name, the scenario, the operation step, and the expected result in the excel template.
The output module 13 is used for calling the XMLwriter to output a corresponding xml format file according to the assembled xml data.
The foregoing is illustrative of one embodiment provided in connection with the detailed description and is not intended to limit the disclosure to the particular embodiments described. Similar or identical methods, structures, etc. as used herein, or several technical deductions or substitutions made on the premise of the idea of the present application, should be considered as the protection scope of the present application.

Claims (6)

1. The excel-to-xml method applicable to testlink is characterized by comprising the following steps of:
acquiring an excel template filled with a test case, wherein the excel template is manufactured according to an xml file exported from a testlink test case management system;
reading data in the excel template by using a POI technology and assembling the data into xml data;
and calling the XMLwriter to output a corresponding xml format file according to the assembled xml data.
2. The method according to claim 1, wherein in the step of obtaining an excel template with filled-in test cases, the excel template includes function modules, case names, scenes, operation steps and expected results.
3. The method for converting excel into xml according to testlink of claim 2, wherein the step of reading the data in the excel template by using POI technology and assembling the data into xml data comprises the following steps:
reading each row of data in the excel template by using a POI technology;
adding folder nodes and sub-nodes according to the functional modules in the excel template;
and creating a test case detail node according to the use case name, the scene, the operation steps and the expected result in the excel template.
4. Excel-to-xml system suitable for testlink, comprising:
the excel acquisition module is used for acquiring an excel template filled with test cases, wherein the excel template is manufactured according to xml files exported from a testlink test case management system;
the assembly module is used for reading the data in the excel template by using POI technology and assembling the data into xml data;
and the output module is used for calling the XMLwriter to output the corresponding xml format file according to the assembled xml data.
5. The system according to claim 4, wherein the excel template comprises a function module, a use case name, a scenario, an operation step and an expected result.
6. The testlink-compliant excel-to-xml system according to claim 5, wherein the assembly module comprises:
the reading unit is used for reading each row of data in the excel template by using POI technology;
the node adding unit is used for adding folder nodes and child nodes according to the functional modules in the excel template;
and the detail node creating unit is used for creating the test case detail node according to the use case name, the scene, the operation step and the expected result in the excel template.
CN201911366139.7A 2019-12-26 2019-12-26 Excel-to-xml method and system applicable to testlink Pending CN111191419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911366139.7A CN111191419A (en) 2019-12-26 2019-12-26 Excel-to-xml method and system applicable to testlink

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911366139.7A CN111191419A (en) 2019-12-26 2019-12-26 Excel-to-xml method and system applicable to testlink

Publications (1)

Publication Number Publication Date
CN111191419A true CN111191419A (en) 2020-05-22

Family

ID=70708012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911366139.7A Pending CN111191419A (en) 2019-12-26 2019-12-26 Excel-to-xml method and system applicable to testlink

Country Status (1)

Country Link
CN (1) CN111191419A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560415A (en) * 2020-12-18 2021-03-26 深圳市元征科技股份有限公司 Data processing method, device, equipment and medium
CN113778886A (en) * 2021-09-15 2021-12-10 北京天融信网络安全技术有限公司 Test case processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080140698A1 (en) * 2006-12-08 2008-06-12 Hon Hai Precision Industry Co., Ltd. System and method for creating xml files from an edited document
CN104156342A (en) * 2014-08-01 2014-11-19 福建星网视易信息系统有限公司 Method and device for converting Excel format testing case into XML (extensive markup language) format
CN109857662A (en) * 2019-01-25 2019-06-07 浙江数链科技有限公司 Case data processing method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080140698A1 (en) * 2006-12-08 2008-06-12 Hon Hai Precision Industry Co., Ltd. System and method for creating xml files from an edited document
CN104156342A (en) * 2014-08-01 2014-11-19 福建星网视易信息系统有限公司 Method and device for converting Excel format testing case into XML (extensive markup language) format
CN109857662A (en) * 2019-01-25 2019-06-07 浙江数链科技有限公司 Case data processing method, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
林胜利等: "《运行核电厂PSA设备可靠性数据采集与处理》", 中国原子能出版社, pages: 109 - 119 *
胡江: "TestLink学习七:TestLink测试用例Excel转换XML工具", pages 1 - 5 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560415A (en) * 2020-12-18 2021-03-26 深圳市元征科技股份有限公司 Data processing method, device, equipment and medium
CN113778886A (en) * 2021-09-15 2021-12-10 北京天融信网络安全技术有限公司 Test case processing method and device
CN113778886B (en) * 2021-09-15 2023-11-10 北京天融信网络安全技术有限公司 Processing method and device for test cases

Similar Documents

Publication Publication Date Title
CN109460219B (en) Method for quickly serializing interface control file
CN107168695B (en) Excel data analysis method and system
CN105607897B (en) Chip register code automatic generation method and its system
CN102880468B (en) Code intelligent prompting method and system for electronic control unit (ECU) program development
CN101751461A (en) Document conversion method and device
CN103744891A (en) Method and system for data query
CN101859303A (en) Metadata management method and management system
CN111191419A (en) Excel-to-xml method and system applicable to testlink
CN102779321A (en) Method and device used for verifying message and based on integrated Ethernet chip (IEC) 61968 message type definition
CN110990467B (en) BIM model format conversion method and conversion system
CN112882844B (en) Joint debugging method, device and storage medium based on network front end and network back end
CN105607923A (en) Cross-platform avionics system configuration data generation and recovery method
CN103116500A (en) Method and device for structural body definition and structure output
CN112347047B (en) Vehicle data file generation method and device
CN111177074A (en) Xml to excel conversion method and system suitable for testlink
CN115292791B (en) Method for converting JSL-route expert design data into universal data format
CN101634942A (en) Method and system for dynamically creating data tables
CN103399735A (en) Method for developing intermediate layer of remote function call interface
CN103793458A (en) Method for nondestructively converting AADL (architecture analysis and design language) into XML (extensible markup language)
CN103793464A (en) Method for exporting reports on basis of neutral formats
CN102073688A (en) Device for converting client form to Web page and method thereof
CN110517369B (en) Fault tree construction method and system based on mind map
CN104378362A (en) Method and device for carrying out conversion of message interfaces
Gherabi et al. Robust representation for conversion UML class into XML Document using DOM
CN105224319A (en) The method of XBRL instance document preview is realized based on dom4j

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200522

RJ01 Rejection of invention patent application after publication