Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Test script generation method and device, server and storage medium

A test script and script technology, applied in the computer field, can solve the problems of complex test script writing process, low test work efficiency, and heavy workload of test personnel, so as to enhance maintainability, improve reusability, and improve work efficiency Effect

Pending Publication Date: 2019-10-18
SHANGHAI DAMENG DATABASE
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The writing process of existing test scripts is complicated, the workload of testers is heavy, and the test work efficiency is low

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Test script generation method and device, server and storage medium
  • Test script generation method and device, server and storage medium
  • Test script generation method and device, server and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] figure 1 It is a flowchart of a method for generating a test script provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where the written SQL statement is automatically converted into a test script for testing. The method can be generated by the test script provided by this embodiment device, which may be implemented in software and / or hardware. see figure 1 , the method specifically includes the following steps:

[0025] Step 110, acquiring the tested sentence.

[0026] Databases usually use Structured Query Language (SQL). During the development and use of databases, testers need to test the written SQL statements.

[0027] Optionally, the statement to be tested may be a set of SQL statements written by the tester.

[0028] Optionally, the way to obtain the tested statement can be as follows: the tester enters a set of tested SQL statements, obtains the tested SQL statement input by the user, and performs grammatical a...

Embodiment 2

[0066] On the basis of the above-mentioned embodiments, the steps of generating the test script according to the tested statement and the test script template are further refined, such as figure 2 as shown, figure 2 It is a flow chart of a method for generating a test script provided in Embodiment 2 of the present invention, specifically including the following steps:

[0067] Step 210, write the file version number and file encoding mode into the file type template to generate a file type script.

[0068] Exemplarily, the tester can write the file version number and file encoding mode of the test script into the file type template, and the generated file type script can be:

[0069]

[0070] Step 220, write the database connection information into the database connection template to generate a database connection script.

[0071] Optionally, the tester can directly write the database connection information into the database connection template to generate a database con...

Embodiment 3

[0140] Figure 4 is a schematic structural diagram of a test script generation device provided in Embodiment 3 of the present invention, as shown in Figure 4 As shown, the device includes:

[0141] A statement acquisition module 310, configured to acquire the tested statement;

[0142] The test script generating module 320 is configured to generate a test script according to the statement to be tested and the test script template; wherein, the test script template includes: a file type template, a database connection template, a test set template and an environment cleaning template.

[0143] In the embodiment of the present invention, the test script template including five parts of file type, database connection, test set and environment cleaning is pre-written by the tester and stored; according to the obtained tested statement, the test set script and the environment cleanup script can be automatically generated, And write the corresponding part in the test script templ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a test script generation method and device, a server and a storage medium. The test script generation method comprises the steps of obtaining a tested statement; generating a test script according to the tested statement and the test script template; wherein the test script template comprises a file type template, a database connection template, a test settemplate and an environment cleaning template. According to the method, a tester does not need to manually compile the test script every time, and the tested SQL statement can be automatically converted into the test script by compiling the test script template once, so that the reusability of the test script template is improved, the maintainability of the test script is enhanced, and the working efficiency of the tester is improved.

Description

technical field [0001] The embodiment of the present invention relates to the field of computer technology, in particular to a test script generation method, device, server and storage medium. Background technique [0002] Structured Query Language (SQL) is a database query and programming language that can be used for data access, query, update and management of relational database systems, and is widely used in various fields. Whether using a database or developing a database, SQL statements are used, and the test of SQL statements is an indispensable and important link. [0003] At present, in the testing process, testers not only need to write a large number of test scripts, but also ensure that the test scripts are in a standard format that can be parsed and executed. In this way, for the staff, to write a correct test script, on the one hand, it is necessary to ensure the correctness of the SQL statement, and on the other hand, it is necessary to ensure the correctnes...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36
CPCG06F11/3684Y02D10/00
Inventor 杨超尹淑彬安沛贤
Owner SHANGHAI DAMENG DATABASE
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More