CN106874192B - Digital publication-oriented standard conformance testing method and system - Google Patents

Digital publication-oriented standard conformance testing method and system Download PDF

Info

Publication number
CN106874192B
CN106874192B CN201710002362.8A CN201710002362A CN106874192B CN 106874192 B CN106874192 B CN 106874192B CN 201710002362 A CN201710002362 A CN 201710002362A CN 106874192 B CN106874192 B CN 106874192B
Authority
CN
China
Prior art keywords
test
value
interface
standard
testing
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
CN201710002362.8A
Other languages
Chinese (zh)
Other versions
CN106874192A (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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN201710002362.8A priority Critical patent/CN106874192B/en
Publication of CN106874192A publication Critical patent/CN106874192A/en
Application granted granted Critical
Publication of CN106874192B publication Critical patent/CN106874192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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)

Abstract

The invention relates to a test method and a test system for standard conformity oriented to digital publishing, wherein the test method comprises the following steps: selecting a standard to be followed according to a test object, determining a corresponding test requirement, registering the test object, and generating registration information; making a test plan according to the test requirement; downloading a corresponding test tool according to the test object; testing the standard conformity of the test object according to the test tool and the test plan; and generating a test report according to the test result of the standard conformance test. The test method of the invention makes a unified test plan according to the test requirements of the tester and following the standard, downloads the test tool, tests the standard conformity of the test object according to the test tool and the test plan, and generates a unified test report, thereby ensuring the data output to be consistent before the system is totally integrated.

Description

Digital publication-oriented standard conformance testing method and system
Technical Field
The invention relates to the field of standard conformance testing, in particular to a digital publication-oriented standard conformance testing method and a digital publication-oriented standard conformance testing system.
Background
In the era of booming development of software industry and hundred families struggling, the necessity of developing software standard conformance tests has become an industry consensus. The software standard conformance test work of China starts late, data shows that the research work of the software standard conformance test is started from the major key-off project of the localization of eight-five system software. The standard conformity test is different from the general software test, the test is based on the targeted standard, the development of the test tool is usually entrusted by government units with standard management or drafting qualification, so the standard conformity test tool is different from other software products, and no widely applicable market product exists in China.
And because the requirements on format, format and business process are more strict due to the own industrial characteristics of the digital publishing, the data output and interface definition for developing software serving the business of the digital publishing also have certain complexity and diversity. A series of engineering technical tools oriented to the digital publishing field are developed by different units, and due to the fact that development languages, database calling modes, interface formats and operation platforms of the units are different, difficulty in integration of software tools or systems developed by the units easily occurs.
Disclosure of Invention
In order to solve the problems in the prior art, namely to solve the difficulty in integrating the software tools or systems developed by the software tools or systems, the invention provides a digital publication-oriented standard conformance testing method and a digital publication-oriented standard conformance testing system.
In order to achieve the purpose, the invention provides the following scheme:
a method for testing compliance with a standard for digital publishing, the method comprising:
selecting a standard to be followed according to a test object, determining a corresponding test requirement, registering the test object, and generating registration information; wherein the test object comprises a test interface and/or test data;
making a test plan according to the test requirement;
downloading a corresponding test tool according to the test object, wherein the test tool comprises an interface standard conformance test tool and/or a data standard conformance test tool;
testing the standard conformity of the test object according to the test tool and the test plan;
and generating a test report according to the test result of the standard conformance test.
Optionally, the generating registration information includes:
obtaining interface description, and generating full-coverage test cases in batch according to the interface description; and/or obtain test information for the test data.
Optionally, the interface description includes: and acquiring an XML document of interface description, analyzing the interface description information stored in the XML document and storing the interface description information into a database, or directly filling the interface description information in a webpage form and storing the interface description information into the database.
Optionally, the method for generating full-coverage test cases in batch includes:
s11: connecting a database, and calling a parameter table of the database;
s12: acquiring relevant information of each parameter corresponding to the interface description from the parameter table according to the interface description, wherein the relevant information of each parameter comprises the data type, constraint information, test case type and test value of the parameter;
s13: judging whether the test value is empty, if so, generating test values of various test case types for each parameter of the interface according to the data type, constraint information and the test case type of the parameter; otherwise, directly using the corresponding numerical value as a test value, and executing the next step;
s14: generating n-time square test cases of x according to the test values of different parameters and the corresponding test case types; wherein n represents the number of parameters, and x represents the type of the test case corresponding to the test value of each parameter;
s15: and serializing all the test cases into XM format output.
Optionally, each test case includes a test case value and a case identifier;
the test case value is a combination of test values of all parameters of the corresponding interface; the case identifier is represented by an n-bit x-system number, and the jth bit of the case identifier represents the test case type of the jth parameter of the interface.
Optionally, the data type includes at least one of numeric type, string type, and temporal type.
Optionally, the test case types include a valid random test case (denoted by 0), an invalid random test case (denoted by 1), a left boundary value type (denoted by 2), and a right boundary value type (denoted by 3).
Optionally, (1) for the numerical type, the generating test values of various test case types for each parameter of the interface includes:
randomly generating random numbers of corresponding numerical types in the range of the minimum value and the maximum value as effective random test values, taking the minimum value as a left boundary value and taking the maximum value as a right boundary value;
randomly generating a value r of a corresponding value type1Then randomly (minimum-r)1) Or (maximum + r)1) The value of (a) is taken as an invalid random test value; wherein r is1>0;
(2) For the character string type, the generating test values of various test case types for each parameter of the interface includes:
randomly generating an integer random number value l within the range of the minimum length and the maximum length, wherein the integer random number value l is used as the length of a character string to be generated, and the character string with the length of l is randomly generated and used as an effective random test value;
using the minimum length as the length of the character string to be generated, and randomly generating the character string with the length as a left boundary value;
using the maximum length as the length of a character string to be generated, and randomly generating the character string with the length as a right boundary value;
randomly generating an integer value r2Then randomly (minimum length-r)2) Or (maximum length + r)2) The value of (2) is used as the length of a character string to be generated, and the character string with the length is randomly generated to be used as an invalid random test value; wherein, 0<r2<A minimum length;
(3) for the time type, the generating test values of various test case types for each parameter of the interface includes:
converting the start time and the stop time into long and integral milliseconds according to a time format;
randomly generating a long integer random number within the range of the starting time and the ending time, and converting the long integer random number into time conforming to a time format to be used as an effective random test value;
the start time is taken as the left boundary value;
the cutoff time is taken as the right boundary value;
randomly generating a long integer value r3And then randomly (start time-r)3) Or (cutoff time + r)3) And converting the value into time conforming to a time format as an invalid random test value; wherein, 0<r3<The start time.
Optionally, the performing of the standard compliance test on the test object includes:
s411: selecting a project to be tested according to the test plan;
s412: selecting an interface test case to be tested from the test cases of the items to be tested;
s413: the interface standard conformity testing tool reads all the interface test cases and corresponding expected results in sequence;
s414: taking the test input in the interface test case as an input parameter of an interface, calling an external interface provided or opened by a test interface, and carrying out interface calling test;
s415: and comparing the result of the interface calling test with the expected result corresponding to the interface test case, and determining the test result of the interface test case.
Optionally, the performing of the standard compliance test on the test object includes:
s421: loading an XML Schema file and test data to the data standard conformance test tool according to the test data and the test plan;
s422: verifying the format, naming, packaging mode, storage structure of the test data, naming and content of each file in the test data, and the data type and format of each data item in the file and the compliance degree of standard regulation by the data standard compliance test tool;
s423: and determining a test result.
According to the embodiment of the invention, the invention discloses the following technical effects:
the digital publishing-oriented standard conformance testing method of the invention formulates a unified testing plan according to the testing requirements of a testing party and following the standard, downloads a testing tool, tests the standard conformance of a testing object according to the testing tool and the testing plan, and generates a unified testing report, thereby ensuring the consistent data output before the system is collected, being beneficial to reducing the interface error rate of each software system as much as possible, improving the working efficiency of the collection, ensuring the conformance of data, software, systems developed by a composite publishing system project and corresponding standards, being beneficial to checking the practicability of the standards in the project, and ensuring the standardization and normalization of the national composite publishing system project.
In order to achieve the purpose, the invention provides the following scheme:
a digital publication-oriented standard compliance testing system, the testing system comprising:
the standard management module is used for selecting a standard to be followed according to a test object by a tested party, determining a corresponding test requirement, registering the test object and generating registration information; wherein the test object comprises a test interface and/or test data;
the formulating module is used for formulating a test plan according to the test requirement;
the downloading module is used for downloading a corresponding testing tool according to the testing object, wherein the testing tool comprises an interface standard conformity testing tool and/or a data standard conformity testing tool;
the test module is used for testing the standard conformity of the test object according to the test tool and the test plan;
and the generating module is used for generating a test report according to the test result of the standard conformance test.
Optionally, the standard management module is executed by the tested party; the formulating module, the downloading module, the testing module and the generating module are executed by a testing party.
According to the embodiment of the invention, the invention discloses the following technical effects:
the digital publishing-oriented standard conformance testing system can formulate a unified testing plan according to the testing requirement and follow the standard by arranging the standard management module, the formulating module, the downloading module, the testing module and the generating module, download the testing tool and test the standard conformance of a testing object according to the testing tool and the testing plan to generate a unified testing report, thereby ensuring the data output to be consistent before the system is aggregated, being beneficial to reducing the interface error rate of each software system as much as possible, improving the working efficiency of the aggregate, ensuring the conformance of data, software, systems developed by the composite publishing system engineering and corresponding standards, being beneficial to verifying the practicability of the standards in the engineering and ensuring the standardization and normalization of the national composite publishing system engineering.
Drawings
FIG. 1 is a flow chart of the method for testing compliance with a digital publication oriented standard of the present invention;
FIG. 2 is a flow chart of a method for batch generation of full-coverage test cases according to the present invention;
FIG. 3 is a diagram illustrating a method for generating parametric test values for different data types according to an embodiment of the present invention;
FIG. 4 is a block diagram of an interface-based test tool system according to the present invention;
FIG. 5 is a block diagram of a data class test tool system according to the present invention;
FIG. 6 is a block diagram of the digital publication oriented standard compliance testing system of the present invention.
Description of the symbols:
the system comprises a standard management module-1, a formulation module-2, a download module-3, a test module-4 and a generation module-5.
Detailed Description
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention.
As shown in fig. 1, the method for testing the compliance of the digital publication-oriented standard of the present invention comprises:
step 100: and selecting a standard to be followed according to the test object, determining a corresponding test requirement, registering the test object, and generating registration information.
Step 200: and making a test plan according to the test requirement.
Step 300: and downloading a corresponding test tool according to the test object.
Step 400: and testing the standard conformity of the test object according to the test tool and the test plan.
Step 500: and generating a test report according to the test result of the standard conformance test.
Wherein, in step 100, the test object comprises a test interface and/or test data. The generating registration information includes: obtaining interface description, and generating full-coverage test cases in batch according to the interface description; and/or obtain test information for the test data.
Further, the interface description includes: and acquiring an XML document of interface description, analyzing the interface description information stored in the XML document and storing the interface description information into a database, or directly filling the interface description information in a webpage form and storing the interface description information into the database.
As shown in fig. 2, the method for batch generation of full-coverage test cases includes:
step 110: connecting a database, and calling a parameter table of the database; step 120: acquiring relevant information of each parameter corresponding to the interface description from the parameter table according to the interface description; step 130: judging whether the test value is empty, if so, executing step 140; otherwise, directly using the corresponding value as the test value, and executing step 150; step 140: generating test values of various test case types for each parameter of the interface according to the data type, the constraint information and the test case types of the parameters; step 150: generating an n-th-order square test case of x according to the test values of different parameters and the corresponding test case types (wherein n represents the number of the parameters, and x represents the type of the test case type corresponding to the test value of each parameter); step 160: and serializing all the test cases into XML format for output.
The parameter table records the related information of each parameter, including parameter name, parameter data type, minimum value, maximum value, whether it is necessary to select, parameter default value, parameter format, etc., and stores the information and records the number of parameters.
The related information of each parameter comprises the data type, constraint information, test case type and test value of the parameter.
The data types of the parameters include numeric (short, int, long, float, double), string (string), and time (date, time). The constraint information of the parameters comprises minimum value, maximum value, necessity or nonessential selection and parameter format, and the information can be obtained from a parameter table during initialization. The test case types include four types: 0 represents a valid random test case, 1 represents an invalid random test case, 2 represents a left boundary value, and 3 represents a right boundary value.
In the method for generating the full-coverage test cases in batches, the methods for generating the test values by the parameters of different data types are different.
Specifically, as shown in fig. 3, the generating test values of various test case types for each parameter of the interface includes:
(1) and for the numerical type, generating a test value according to the maximum value, the minimum value and the test case type. Specifically, the method comprises the following steps:
and randomly generating random numbers of corresponding value types in the range of the minimum value and the maximum value as effective random test values, taking the minimum value as a left boundary value and taking the maximum value as a right boundary value.
Randomly generating a value r of a corresponding value type1Then randomly (minimum-r)1) Or (maximum + r)1) The value of (a) is taken as an invalid random test value; wherein r is1>0。
(2) For the string type, a test value is generated according to the maximum length, the minimum length, and the test case type. In particular, the method comprises the following steps of,
and randomly generating an integer random number value l within the range of the minimum length and the maximum length, wherein the integer random number value l is used as the length of a character string to be generated, and the character string with the length of l is randomly generated and used as an effective random test value.
And using the minimum length as the length of the character string to be generated, and randomly generating the character string with the length as a left boundary value.
And using the maximum length as the length of the character string to be generated, and randomly generating the character string with the length as a right boundary value.
Randomly generating an integer value r2Then randomly (minimum length-r)2) Or (maximum length + r)2) The value of (2) is used as the length of a character string to be generated, and the character string with the length is randomly generated to be used as an invalid random test value; wherein, 0<r2<A minimum length.
(3) For the time type, test values are generated according to the start time, the deadline, the time format and the test case type. Specifically, the method comprises the following steps:
converting the start time and the stop time into long and integral milliseconds according to a time format;
randomly generating a long integer random number within the range of the starting time and the ending time, and converting the long integer random number into time conforming to a time format to be used as an effective random test value; the start time is taken as the left boundary value; the cutoff time is taken as the right boundary value.
Randomly generating a long integer value r3And then randomly (start time-r)3) Or (cutoff time + r)3) And converting the value into time conforming to a time format as an invalid random test value; wherein, 0<r3<The start time.
Each test case comprises a test case value and a case identifier; the test case value is a combination of test values of all parameters of the corresponding interface; the case identifier is represented by an n-bit x-system number, and the jth bit of the case identifier represents the test case type of the jth parameter of the interface.
An interface a has three parameters, b, c and d, and considering the combination of test parameters for generating various test types, the number of test cases generated by the interface is 4 × 4 — 64. The quadtree number 012, whose case identifier is 6, of the 6 th test case is expressed as a valid random test case generated for the first parameter b, an invalid random test case generated for the second parameter c, and a left boundary value generated for the third parameter d as a test case.
The test case type in the method for generating the full-coverage test cases in batches is obtained by case identification, and the test case type represented by the jth bit of the case identification is determined as a test value generated for the jth parameter of the interface. For example: the case identifier is 012, and the first bit 0 is a valid random test case, indicating that a valid random test value is generated for the first parameter b.
In the method for generating the full-coverage test cases in batch, if a certain parameter has a specified value, the specified value is used as a test value, and a case identification bit value corresponding to the parameter is changed to 4 (the specified value is represented by 4). For example: when the first parameter b has a predetermined value, the case flag is originally 012, and the predetermined value is set as the test value of the parameter b, and the case flag is changed to 412.
Further, the test requirement includes a requirement number, a requirement name, a test object, a processing state (processed/unprocessed), whether to return to the test, an original requirement number, a submitting user, a processing time, and the like. The selection of the standard to be followed, the determination of the corresponding test requirement, and the registration of the test object are generally performed by the tested party, and the operations from step 200 to step 500 are generally performed by the tester.
In step 200, the test plan includes a plan number, a test requirement, a test parameter set (if the test object is an interface), a test status (completed/not completed), and a test parameter execution pass rate (if the test object is an interface).
In step 300, the testing tools include an interface class standard conformance testing tool and (as shown in fig. 4 and table 1) and/or a data class standard conformance testing tool (as shown in fig. 5 and table 2).
Table 1 interface standard conformity test tool component and its function
Figure BDA0001202008170000091
TABLE 2 Components and functions of a data-class Standard conformance testing tool
Figure BDA0001202008170000092
Figure BDA0001202008170000101
Further, the interface standard conformance testing tool mainly tests an interface implementation manner capable of obtaining an execution result, and the covered interface manner includes: WebService, RESTful, and SDK.
The interface class standard conformance testing tool is aimed at a tool and a system, and the tool and the system comprise: layout understanding technology tool, layout editing tool set, XML editing tool set, intelligent checking system, complex editing system of publishing company, complex editing system of journal society, collaborative editing system of books and periodicals, complex editing system of newspaper society, media collaborative work system, structured full-media to-be-edited draft library management system, book question selection and issue analysis system, news content question selection and evaluation system, XML typesetting system, rich-media electronic book making tool, publishing industry online learning platform, full-media resource management system, copyright and copyright asset management system, minority word publishing resource management system, minority word publishing auxiliary tool set, publishing management system, file distribution and on-demand printing system, content dynamic recombination system, publishing agency operation service system, publishing agency operation data support system, complex publishing data transmission system, publishing agency operation data management system, publishing management system, file distribution and on-demand printing, The system comprises a digital resource identification management and analysis service system, a national publication content exchange system, a library information and social data acquisition service system, a publication planning service system, a data exchange pool system, a polymorphic advertisement publishing system, a full-text similarity analysis system, a field vocabulary construction and management system, a field ontology construction and management system and engineering integration.
The interface standard conformity testing tool tests the interface of a certain software tool or system on the premise that the interface to be tested is registered in the standard conformity testing integrated service system, the system generates a full-coverage testing parameter set according to the specific information registered by the interface, the testing parameter set can be exported to the local from the system, and then the corresponding interface standard conformity testing tool is used for completing the automatic testing of the interface.
In step 400, the testing the standard compliance of the test interface by the interface class standard compliance testing tool includes: step 411: selecting a project to be tested according to the test plan; step 412: selecting an interface test case to be tested from the test cases of the items to be tested; step 413: the interface standard conformity testing tool reads all the interface test cases and corresponding expected results in sequence; step 414: taking the test input in the interface test case as an input parameter of an interface, calling an external interface provided or opened by a test interface, and carrying out interface calling test; step 415: and comparing the result of the interface calling test with the expected result corresponding to the interface test case, and determining the test result of the interface test case.
The data class standard conformance testing tool comprises: the system comprises a cross-media data link specification testing tool, a composite document basic structure testing tool, a chapter composite document structure testing tool, an entry composite document structure testing tool, a news composite document structure testing tool, a thesis composite document structure testing tool, a courseware composite document structure testing tool, a published product format specification testing tool, a resource database management specification testing tool, an engineering software system coding specification testing tool and a digital published product packaging specification testing tool; the data object is represented in the form of: files, data items or digitized products, etc.
The step of testing the standard conformity of the test data by the data standard conformity testing tool comprises the following steps: step 421: loading an XML Schema file and test data to the data standard conformance test tool according to the test data and the test plan; step 422: verifying the format, naming, packaging mode, storage structure of the test data, naming and content of each file in the test data, and the data type and format of each data item in the file and the compliance degree of standard regulation by the data standard compliance test tool; step 423: and determining a test result.
Taking the verification of the composite document data packet as an example, the execution steps of the data standard conformance testing tool include:
s421': and checking whether the format of the compressed file is correct or not, whether the name of the file is consistent with the name of the composite document name space or not, and returning a checking result.
S422': decompress, and return the result. If the decompression cannot be successfully performed, an error log (error log) is returned, and the test is finished because the subsequent steps cannot be performed due to the compression failure.
S423': and checking whether the names and storage paths of the necessary folders and files are correct or not, and returning a checking result. Since the error may result in the designated file not being found in the subsequent steps, the verification of the contents of the designated file in steps S424 ' -S426 ' cannot be performed, and the jump S427 ' is performed directly.
S424': and checking whether the content of the specified file meets the standard requirement or not, and returning a checking result.
S425': and checking whether the specified XML file passes through the corresponding XML Schema or not, and returning a checking result.
S426': and checking whether the content in the specified XML file tag meets the standard requirement or not, and returning a checking result.
S427': and outputting each inspection result by using XML.
The standard conformity testing method is beneficial to finding the problem of inconsistent data output possibly occurring in each technical sub-package undertaking unit before the system aggregate, reducing the interface error rate of each software module as much as possible, improving the working efficiency of the aggregate, ensuring the conformity of data, software, systems developed by the composite publishing system engineering and corresponding standards, and simultaneously being beneficial to checking the practicability of the standards in the engineering and ensuring the standardization and normalization of the national composite publishing system engineering.
In the invention, the user roles are divided into four types: the system administrator, the test administrator, the tester and the common user have different operation authorities in different roles.
1. System administrator
The system administrator is mainly responsible for deployment, operation and maintenance of the system, and is responsible for setting and managing user roles and permissions.
2. Test administrator
The test administrator is responsible for managing key data information such as test standards, test tools, test parameters and the like in the system. Specifically, the test administrator works specifically as follows:
(1) test standard management
And the system is responsible for registering, uploading and managing various test standards. For the convenience of viewing, all the standards are classified and managed according to the fields, and standard retrieval services are provided for the outside.
(2) Test tool management
And the system is responsible for registering, uploading and managing the test tool. All the uploaded test tools correspond to the test standards one by one.
(3) Test parameter management
The system is responsible for generating all test cases according to various standards, and dividing the use permission of the test cases into formal test cases and user self-testing test cases according to business requirements. The formal test case is mainly used for formal test services, and an ordinary user does not have the authority to browse and use the test case. The user self-test cases are published to the outside, and all software developers can browse and download the test cases for internal self-test in the software development process.
3. Tester
Testers are specialized personnel who are specifically responsible for conducting standard compliance tests on test objects provided by software developers. The tester has the authority to browse and download the test case library and the test tool required by the test according to the test requirement, registers the tested object and carries out the third-party test. And uploading the obtained test result information to a test integration system, and finally generating a formal test report.
4. Self-test user
The self-testing user refers to a software developer, and a common user has the authority to browse, download and use the testing tool and the user self-testing parameter set provided by the system. And carrying out internal self-test on the software system and the digital published product developed by the user based on the downloaded test tool and the user self-test case.
In addition, the invention also provides a digital publication-oriented standard compliance testing system. As shown in fig. 6, the testing system for digital publishing-oriented standard compliance of the present invention includes a standard management module 1, a formulation module 2, a download module 3, a testing module 4, and a generation module 5.
The standard management module 1 is used for a tested party to select a standard to be followed according to a test object, determine a corresponding test requirement, register the test object and generate registration information; wherein the test object comprises a test interface and/or test data; the formulating module 2 is used for formulating a test plan according to the test requirement; the downloading module 3 is configured to download a corresponding test tool according to the test object, where the test tool includes an interface class standard conformance test tool and/or a data class standard conformance test tool; the test module 4 is used for testing the standard conformity of the test object according to the test tool and the test plan; the generating module 5 is configured to generate a test report from a test result of the standard conformance test, where the test report is in an XML format.
Further, the standard management module 1 is executed by a tested party; the formulating module 2, the downloading module 3, the testing module 4 and the generating module 5 are executed by the tester.
The standard management module 1 has the functions of adding, deleting, modifying and inquiring; the standard management module 1 and the download module 3 can be used for downloading standard documents and testing tools of various interface classes and data classes.
Compared with the prior art, the digital publication-oriented standard conformance testing system has the same beneficial effects as the digital publication-oriented standard conformance testing method, and is not repeated herein.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (12)

1. A method for testing compliance with a standard for digital publishing, the method comprising:
selecting a standard to be followed according to a test object, determining a corresponding test requirement, registering the test object, and generating registration information; wherein the test object comprises a test interface and/or test data;
making a test plan according to the test requirement;
downloading a corresponding test tool according to the test object, wherein the test tool comprises an interface standard conformance test tool and/or a data standard conformance test tool;
testing the standard conformity of the test object according to the test tool and the test plan;
and generating a test report according to the test result of the standard conformance test.
2. The method for testing compliance with standards for digital publication according to claim 1, wherein the generating registration information comprises:
obtaining interface description, and generating full-coverage test cases in batch according to the interface description; and/or
Test information of the test data is obtained.
3. The method for testing compliance with a standard for digital publication according to claim 2, wherein the interface description comprises: and acquiring an XML document of interface description, analyzing the interface description information stored in the XML document and storing the interface description information into a database, or directly filling the interface description information in a webpage form and storing the interface description information into the database.
4. The method for testing the compliance of the standards for digital publishing according to claim 2, wherein the method for generating the full-coverage test cases in batch comprises:
s11: connecting a database, and calling a parameter table of the database;
s12: acquiring relevant information of each parameter corresponding to the interface description from the parameter table according to the interface description, wherein the relevant information of each parameter comprises the data type, constraint information, test case type and test value of the parameter;
s13: judging whether the test value is empty, if so, generating test values of various test case types for each parameter of the interface according to the data type, constraint information and the test case type of the parameter; otherwise, directly using the corresponding numerical value as a test value, and executing the next step;
s14: generating n-time square test cases of x according to the test values of different parameters and the corresponding test case types; wherein n represents the number of parameters, and x represents the type of the test case corresponding to the test value of each parameter;
s15: all test cases are serialized into XML output.
5. The method for testing the compliance of the standards for digital publication according to claim 4, wherein each of the test cases includes a test case value and a case identifier;
the test case value is a combination of test values of all parameters of the corresponding interface; the case identifier is represented by an n-bit x-system number, and the jth bit of the case identifier represents the test case type of the jth parameter of the interface.
6. The method for testing compliance with standards for digital publication according to claim 4, wherein the data type includes at least one of numeric type, string type and time type.
7. The method for testing the compliance of the standards oriented to the digital publication according to claim 6, wherein the test case types include a valid random test case, an invalid random test case, a left boundary value type, and a right boundary value type, and are sequentially represented by 0, 1, 2, and 3, respectively.
8. The method for testing compliance with standards for digital publication according to claim 7,
(1) for the numerical type, the generating test values of various test case types for each parameter of the interface includes:
randomly generating random numbers of corresponding numerical types in the range of the minimum value and the maximum value as effective random test values, taking the minimum value as a left boundary value and taking the maximum value as a right boundary value;
randomly generating a value r of a corresponding value type1Then randomly (minimum-r)1) Or (maximum + r)1) The value of (a) is taken as an invalid random test value; wherein r is1>0;
(2) For the character string type, the generating test values of various test case types for each parameter of the interface includes:
randomly generating an integer random number value l within the range of the minimum length and the maximum length, wherein the integer random number value l is used as the length of a character string to be generated, and the character string with the length of l is randomly generated and used as an effective random test value;
using the minimum length as the length of the character string to be generated, and randomly generating the character string with the length as a left boundary value;
using the maximum length as the length of a character string to be generated, and randomly generating the character string with the length as a right boundary value;
randomly generating an integer value r2Then randomly (minimum length-r)2) Or (maximum length + r)2) Is/are as followsThe value is used as the length of a character string to be generated, and the character string with the length is randomly generated to be used as an invalid random test value; wherein, 0<r2<A minimum length;
(3) for the time type, the generating test values of various test case types for each parameter of the interface includes:
converting the start time and the stop time into long and integral milliseconds according to a time format;
randomly generating a long integer random number within the range of the starting time and the ending time, and converting the long integer random number into time conforming to a time format to be used as an effective random test value;
the start time is taken as the left boundary value;
the cutoff time is taken as the right boundary value;
randomly generating a long integer value r3And then randomly (start time-r)3) Or (cutoff time + r)3) And converting the value into time conforming to a time format as an invalid random test value; wherein, 0<r3<The start time.
9. The method for testing the standard compliance of digital publication, as claimed in claim 2, wherein the testing the standard compliance of the test object comprises:
s411: selecting a project to be tested according to the test plan;
s412: selecting an interface test case to be tested from the test cases of the items to be tested;
s413: the interface standard conformity testing tool reads all the interface test cases and corresponding expected results in sequence;
s414: taking the test input in the interface test case as an input parameter of an interface, calling an external interface provided or opened by a test interface, and carrying out interface calling test;
s415: and comparing the result of the interface calling test with the expected result corresponding to the interface test case, and determining the test result of the interface test case.
10. The method for testing the standard compliance of digital publication, as claimed in claim 2, wherein the testing the standard compliance of the test object comprises:
s421: loading an XML Schema file and test data to the data standard conformance test tool according to the test data and the test plan;
s422: verifying the format, naming, packaging mode, storage structure of the test data, naming and content of each file in the test data, and the data type and format of each data item in the file and the compliance degree of standard regulation by the data standard compliance test tool;
s423: and determining a test result.
11. A digital publication oriented standard compliance testing system, comprising:
the standard management module is used for selecting a standard to be followed according to a test object by a tested party, determining a corresponding test requirement, registering the test object and generating registration information; wherein the test object comprises a test interface and/or test data;
the formulating module is used for formulating a test plan according to the test requirement;
the downloading module is used for downloading a corresponding testing tool according to the testing object, wherein the testing tool comprises an interface standard conformity testing tool and/or a data standard conformity testing tool;
the test module is used for testing the standard conformity of the test object according to the test tool and the test plan;
and the generating module is used for generating a test report according to the test result of the standard conformance test.
12. The system for testing compliance with standards oriented to digital publications of claim 11, wherein the standard management module is executed by a party under test; the formulating module, the downloading module, the testing module and the generating module are executed by a testing party.
CN201710002362.8A 2017-01-03 2017-01-03 Digital publication-oriented standard conformance testing method and system Active CN106874192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710002362.8A CN106874192B (en) 2017-01-03 2017-01-03 Digital publication-oriented standard conformance testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710002362.8A CN106874192B (en) 2017-01-03 2017-01-03 Digital publication-oriented standard conformance testing method and system

Publications (2)

Publication Number Publication Date
CN106874192A CN106874192A (en) 2017-06-20
CN106874192B true CN106874192B (en) 2020-02-04

Family

ID=59164424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710002362.8A Active CN106874192B (en) 2017-01-03 2017-01-03 Digital publication-oriented standard conformance testing method and system

Country Status (1)

Country Link
CN (1) CN106874192B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908888B (en) * 2018-09-17 2023-06-30 百度在线网络技术(北京)有限公司 Server testing method and device
CN116069573B (en) * 2022-11-16 2023-09-22 北京东方通科技股份有限公司 Testing method and system based on API (application program interface) testing platform
CN118194000A (en) * 2024-05-14 2024-06-14 中科数测(无锡)科技有限公司 Multi-mode data consistency verification method, device and medium based on data standard

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317709A (en) * 2014-10-21 2015-01-28 工业和信息化部电子第五研究所 Method and system for testing performance of software
CN104461907A (en) * 2014-12-30 2015-03-25 成都金盘电子科大多媒体技术有限公司 Health information data set standard conformance automated testing method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7280976B2 (en) * 2002-03-28 2007-10-09 Xerox Corporation Method for generating a rating for assessing accessibility standards compliance

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317709A (en) * 2014-10-21 2015-01-28 工业和信息化部电子第五研究所 Method and system for testing performance of software
CN104461907A (en) * 2014-12-30 2015-03-25 成都金盘电子科大多媒体技术有限公司 Health information data set standard conformance automated testing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"面向标准符合性测试的接口标准建模方案";崔艳婷;《中国传媒大学学报自然科学版》;20151231;全文 *

Also Published As

Publication number Publication date
CN106874192A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106598930A (en) Electronic certificate processing method based on layout file
CN107122297A (en) The method and apparatus that request message for test interface is generated
CN101515289B (en) Device for detecting conventional data file and method thereof
CN106874192B (en) Digital publication-oriented standard conformance testing method and system
CN111061733B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN110659206A (en) Simulation architecture establishing method, device, medium and electronic equipment based on microservice
JP2006236220A (en) Device, method, program and storage medium for forming test data file
CN110716866A (en) Code quality scanning method and device, computer equipment and storage medium
CN111008017B (en) Oclin-based pre-review method for files to be submitted and related components
CN112579461A (en) Assertion processing method, system and storage medium
CN114896161A (en) File construction method and device based on artificial intelligence, computer equipment and medium
CN114676133A (en) Index creating method, device, equipment and storage medium
CN113434582B (en) Service data processing method and device, computer equipment and storage medium
CN110688823A (en) XML file verification method and device
CN115373677A (en) Unit test case object code generation method and device, electronic equipment and computer readable medium
CN117271478A (en) Data migration method and device, storage medium and electronic equipment
CN115587045A (en) Test case generation method, device, equipment, storage medium and program product
CN115146581A (en) Project management method, defect analysis method, related device and readable storage medium
CN112445461B (en) Business rule generation method and device, electronic equipment and readable storage medium
CN111639478B (en) Automatic data auditing method and system based on EXCEL document
CN106844447A (en) The processing method and processing unit of nuclear power station alarm card
CN113434139A (en) Image packaging processing method and device, server and storage medium
JP7344521B1 (en) Program, method, information processing device, and system
CN109408368A (en) A kind of output method, storage medium and server for testing auxiliary information
CN113694539B (en) Resource management method and device, storage medium and electronic equipment

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