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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM

Abstract
Description
Claims
Application Information

- Generate Ideas
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com