CN110413522A - A kind of determination method, apparatus, storage medium and the electronic equipment of test database - Google Patents

A kind of determination method, apparatus, storage medium and the electronic equipment of test database Download PDF

Info

Publication number
CN110413522A
CN110413522A CN201910676468.5A CN201910676468A CN110413522A CN 110413522 A CN110413522 A CN 110413522A CN 201910676468 A CN201910676468 A CN 201910676468A CN 110413522 A CN110413522 A CN 110413522A
Authority
CN
China
Prior art keywords
database
name
environmental information
address
test
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.)
Withdrawn
Application number
CN201910676468.5A
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.)
Jiangsu Manyun Software Technology Co Ltd
Original Assignee
Jiangsu Manyun Software 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 Jiangsu Manyun Software Technology Co Ltd filed Critical Jiangsu Manyun Software Technology Co Ltd
Priority to CN201910676468.5A priority Critical patent/CN110413522A/en
Publication of CN110413522A publication Critical patent/CN110413522A/en
Withdrawn legal-status Critical Current

Links

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/3664Environments for testing or debugging software
    • 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/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the present application discloses determination method, apparatus, storage medium and the electronic equipment of a kind of test database.This method comprises: if detecting, data base querying tests trigger event, obtains the environmental information of data base querying test;The database-name of user's selection is obtained by preset window;Wherein, database is divided and is named according to business;According to the environmental information, the database-name, and according to the incidence relation between pre-set environmental information, database-name and database address, determine target database.It by running technical solution provided herein, may be implemented during the test, the operating procedure of test procedure test personnel can be simplified by way of determining database easily operating.

Description

A kind of determination method, apparatus, storage medium and the electronic equipment of test database
Technical field
The invention relates to field of computer technology more particularly to a kind of determination method, apparatus of test database, Storage medium and electronic equipment.
Background technique
With the rapid development of science and technology, in order to meet the use demand of users, the exploitation of application program and speed is updated Degree is also increasing sharply.Before application program is online, generally require to guarantee that application program is stable by repeatedly testing, It could be normal online.
In general, technology company can design more set test environment, each test environment has the database of oneself, these numbers It is each other different according to library.But the data for application program is using business scenario, under difference test environment Library can have identical business scenario and identical data list structure.When the testing procedure of automatic test needs to carry out data When library inquiry, need to specify at least following Connecting quantity: the network address of database server example in testing procedure, such as IP address, serve port need to do the database-name and login username and password of inquiry operation, this allows for testing It is complicated to the selection course of database in the process.
Summary of the invention
The embodiment of the present application provides determination method, apparatus, storage medium and the electronic equipment of a kind of test database, with reality Now during the test, the behaviour of test procedure test personnel can be simplified by way of determining database easily operating Make step.
In a first aspect, the embodiment of the present application provides a kind of determination method of test database, this method comprises:
If detecting, data base querying tests trigger event, obtains the environmental information of data base querying test;
The database-name of user's selection is obtained by preset window;Wherein, database be carried out according to business divide and Name;
According to the environmental information, the database-name, and according to pre-set environmental information, database-name Incidence relation between database address, determines target database.
Further, the incidence relation of the database-name of setting, environmental information and database, comprising:
At least two service databases are obtained according to delineation of activities, according to the title that user inputs, obtain each database name Claim;
Obtain Connecting quantity of the same database-name under each environmental information;Wherein, the Connecting quantity includes at least: Database address;
Determine the incidence relation between database-name and environmental information and database.
Further, the Connecting quantity further include: serve port and user name and user password.
Further, Connecting quantity of the same database-name under each environmental information is obtained, comprising:
The database address under all environmental informations, and each environmental information of display is shown under the database-name Input frame;
The database address under each environmental information of user's input is obtained, determines the corresponding each environment of current data library name Database address under information.
Further, the database address under each environmental information of user's input is obtained, determines current data library name pair Database address under each environmental information answered, comprising:
Whether the database address verified under each environmental information of user's input is effective address;If so, determining current Database address under the corresponding each environmental information of database-name;If it is not, then generating the invalid prompt in input database address Information.
Further, verification user input each environmental information under database address whether be effective address standard packet It includes:
If the database address under each environmental information of user's input is not present or duplicates, it is determined that the data Library address is invalid address.
Further, after determining target database, the method also includes:
Data base querying request is executed, carries out inquiry work, in the target database to carry out data base querying survey Examination.
Second aspect, the embodiment of the present application provide a kind of determining device of test database, which includes:
Environment information acquisition module, if obtaining data base querying for detecting that data base querying tests trigger event The environmental information of test;
Database-name obtains module, for obtaining the database-name of user's selection by preset window;Wherein, data Library is divided and is named according to business;
Target database determining module, for according to the environmental information, the database-name, and according to setting in advance The incidence relation between environmental information, database-name and database address set, determines target database.
Further, described device includes incidence relation setup module, and the incidence relation setup module includes:
Database names unit, for obtaining at least two service databases according to delineation of activities, according to user's input Title obtains each database-name;
Connecting quantity acquiring unit, for obtaining Connecting quantity of the same database-name under each environmental information;Wherein, The Connecting quantity includes at least: database address;
Incidence relation determination unit is associated with pass between database-name and environmental information and database for determining System.
Further, the Connecting quantity further include: serve port and user name and user password.
Further, the Connecting quantity acquiring unit includes:
Input frame shows subelement, and for showing all environmental informations under the database-name, and display is each Database address input frame under environmental information;
Database address inputs subelement, and the database address under each environmental information for obtaining user's input determines Database address under the corresponding each environmental information of current data library name.
Further, the database address input subelement is specifically used for:
Whether the database address verified under each environmental information of user's input is effective address;If so, determining current Database address under the corresponding each environmental information of database-name;If it is not, then generating the invalid prompt in input database address Information.
Further, the database address input subelement is specifically used for:
If the database address under each environmental information of user's input is not present or duplicates, it is determined that the data Library address is invalid address.
Further, described device further include:
Test module is inquired, is requested for executing data base querying, inquiry work is carried out in the target database, with Carry out data base querying test.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the determination method of the test database as described in the embodiment of the present application when the program is run by processor.
Fourth aspect, the embodiment of the present application provide a kind of electronic equipment, including memory, processor and are stored in storage It can realize on device and when the computer program of processor operation, the processor run the computer program as the application is real Apply the determination method of test database described in example.
Technical solution provided by the embodiment of the present application, if detecting, data base querying tests trigger event, obtains number The environmental information tested according to library inquiry;The database-name of user's selection is obtained by preset window;Wherein, database be according to What business was divided and was named;According to the environmental information, the database-name, and believed according to pre-set environment Incidence relation between breath, database-name and database address, determines target database.By using provided herein Technical solution may be implemented during the test, can simplify test by way of determining database easily operating The operating procedure of procedural test personnel.
Detailed description of the invention
Fig. 1 is the flow chart of the determination method for the test database that the embodiment of the present application one provides;
Fig. 2 is the incidence relation establishment process schematic diagram that the embodiment of the present application two provides;
Fig. 3 is the incidence relation schematic diagram that the embodiment of the present application two provides;
Fig. 4 is the database test process schematic diagram that the embodiment of the present application two provides;
Fig. 5 is the structural schematic diagram of the determining device for the test database that the embodiment of the present application three provides;
Fig. 6 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present application five provides.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the application, rather than the restriction to the application.It also should be noted that in order to just Part relevant to the application is illustrated only in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is the flow chart of the determination method for the test database that the embodiment of the present application one provides, and the present embodiment may be adapted to Situations such as database detection, the determining device operation of this method test database as provided by the embodiment of the present application should Device can be realized by the mode of software and/or hardware, and can be integrated in the electronic equipment for database detection.
As shown in Figure 1, the determination method of the test database includes:
If S110, detecting that data base querying tests trigger event, the environmental information of data base querying test is obtained.
Wherein, data base querying test can be to the query function of database supported whether can work normally into Capable test.Specifically, can be in carrying out automatic test course, by testing tool or test frame, to data Library carries out inquiry test.For example, being inquired by the query statement editted the content in database.Data base querying Test trigger event can be into data base querying test interface, either receive query statement or inquiry instruction etc.. Wherein, data base querying test interface is entered, and receives query statement, can be clicking to enter according to staff The query statement progress either edit according to staff it is received.
In the present embodiment, the locating environment letter of current test can be determined by testing tool or test frame Breath, it can also include other test environment that wherein environmental information, which may include exploitation environment and test environment,.This sentences exploitation For environment and test environment, exploitation environment can be the environment tested during application program or functional development, And test environment often in application program or function before online environment in need of test, by test environment can It whether there is loophole with final inspection, then repaired in time if there is loophole, if there is no loophole, then application program or function It online can use.
In the present embodiment, testing tool or test frame can detecte the test environment being presently in, and obtain current Test environment after, so that it may determine environmental information.
S120, the database-name that user's selection is obtained by preset window;Wherein, database is drawn according to business Point and name.
Wherein, database is divided and named according to business, can be database according to application program or function Affiliated business determine that for through electric business application purchase article, business may include commodity, transaction and order, then phase It answers, database can be divided into and be named as merchandising database, transaction data base and order database.Wherein, commodity data Library can return to commodity details, and transaction data base can return to the information of the transaction page of commodity, and order database can return Order information.In the present embodiment, since database is divided and named according to business, then can determine ought get After staff's selection or the database-name keyed in, each environmental information according to corresponding to current data library name And the corresponding target database of each environmental information.Illustratively, when user-selected number is known as " commodity " according to library name, then may be used To show the corresponding target database of mentioned-above exploitation environment target database corresponding with test environment.
S130, according to the environmental information, the database-name, and according to pre-set environmental information, data Incidence relation between library name and database address, determines target database.
It wherein, can be according to pre-set environmental information, database after determining environmental information and database-name Incidence relation between title and database address, determines target database.Wherein the incidence relation between three can be work Make personnel and first passes through the incidence relation that the mode of selection is arranged in advance.Illustratively, it is determined by testing tool or test frame Environmental information and then the database-name that determination is selected according to staff, so that it may determine corresponding unique number According to library.The benefit being arranged in this way is can be designed for the database of identical services using identical database-name, Ke Yishi Existing one-to-many relationship, and test target database can quickly and be accurately determined in the detection process.Simplify work The design of personnel improves the efficiency that test process is carried out for database.
In the present embodiment, optionally, the incidence relation of the database-name of setting, environmental information and database, packet It includes: obtaining at least two service databases according to delineation of activities, according to the title that user inputs, obtain each database-name;It obtains Take Connecting quantity of the same database-name under each environmental information;Wherein, the Connecting quantity includes at least: database Location;Determine the incidence relation between database-name and environmental information and database.Wherein, user can be for database The staff tested, such as can be the person in charge of the technology aspect person of certain company.It, can basis for some company The testing requirement of itself obtains at least two databases according to delineation of activities, for example, electric business can be according to delineation of activities commodity, Transaction and three databases of order can be the source of goods according to delineation of activities, the owner of cargo, freight information, receive for logistics service provider Address and such five databases of consignee.After being divided at least two databases, staff can be defeated in title The title of input database inside lairage, such as input is " commodity ", then available current database-name.User can To be disposably named each database, this database can also be obtained in varying environment after determining name Connecting quantity under information, wherein Connecting quantity can include database address.Wherein, database address is with can be network Location.Such as in " commodity " database, determines exploitation environment respectively and test the Connecting quantity of database under environment.For example, opening Network address in hair ring border in the Connecting quantity of database is 192.168.1.2, and network address is under the test environment 192.168.2.2.In this manner it is possible to which data corresponding to each environmental information are respectively configured under " commodity " this database Library information, in this way during actual test, after determining database-name and environmental information, so that it may be directed toward unique number According to the network address in library, it is equivalent to and is assured that unique database.So that it may be built with clicking " preservation " by user Vertical incidence relation between database-name, environmental information and database address.The setting of the technical program in this way, can be with After now setting up incidence relation in fact, during the test, the effect of target database can quickly and be accurately determined.
In the present embodiment, optionally, the Connecting quantity further include: serve port and user name and user password. Wherein serve port can be for determining the database port serviced, and username and password may be used to determine current use Whether family, which has permission, is established incidence relation.The benefit being arranged in this way is can to guarantee that established incidence relation is accurate.
Technical solution provided by the embodiment of the present application, if detecting, data base querying tests trigger event, obtains number The environmental information tested according to library inquiry;The database-name of user's selection is obtained by preset window;Wherein, database be according to What business was divided and was named;According to the environmental information, the database-name, and believed according to pre-set environment Incidence relation between breath, database-name and database address, determines target database.By using provided herein Technical solution may be implemented during the test, can simplify test by way of determining database easily operating The operating procedure of procedural test personnel.
On the basis of above-mentioned each technical solution, optionally, company of the same database-name under each environmental information is obtained Connect parameter, comprising: the database under all environmental informations, and each environmental information of display is shown under the database-name Address input box;The database address under each environmental information of user's input is obtained, determines that current data library name is corresponding each Database address under environmental information.Wherein it is possible to which logarithm is shown below in the input field in staff's input data library name According to each environmental information corresponding to library test, and database address input frame is shown under each environmental information, wherein data Library address input box is used to receive the database address of staff's input, and each database address is directed toward unique data Library.Thus can be by under current name, database corresponding to varying environment information is decided.The benefit being arranged in this way is Staff is not necessarily to the coding work of redundancy, as long as just by the database address input of environmental information each under each database-name Really, each database address will be directed toward unique database under current name, the easy operation of staff.
On the basis of above-mentioned each technical solution, optionally, with obtaining the database under each environmental information of user's input Location determines the database address under the corresponding each environmental information of current data library name, comprising: each environment of verification user's input Whether the database address under information is effective address;If so, determining under the corresponding each environmental information of current data library name Database address;If it is not, then generating the invalid prompt information in input database address.Wherein, since database address is true Set the goal the key point of database, and database address is that staff is manually entered, therefore, can be to staff The validity of the database address of input is verified.For example, currently valid database address be from 192.168.1.1 to 192.168.1.10 such ten addresses, if that user's input is 192.168.1.12, the address is not in effective data In the range of the address of library, then it can determine that the database address that work at present personnel are inputted is invalid database address.In After determining that database address is invalid, corresponding prompt information can be generated, to inform that staff corrects in time.This technology side The benefit that case is arranged in this way is can be during incidence relation be arranged in staff, and ancillary staff, which establishes, correctly closes Connection relationship, thereby may be ensured that the case where can effectively avoiding pointed target database from being a wrong database Accuracy in the detection process of later data library.
On the basis of above-mentioned each technical solution, optionally, with verifying the database under each environmental information of user's input If location whether be effective address standard include: user input each environmental information under database address be not present or occur It repeats, it is determined that the database address is invalid address.Wherein, such as under first environment information certain number has been had input According to library address, such as 192.168.1.2, and under second environment information or third environmental information, staff is inputted again The address, then can determine that the database address duplicates, it is determined that be invalid address.It is worth noting that in difference Database-name under, first environment if there is polyisomenism and invalid address, such as under " commodity " title letter Breath, has input some database address, such as 192.168.1.2, and the first environment information or second under " order " title In third environmental information, if inputting the database address again, which is also invalid address.Another party Face can also determine that the address is invalid address if the database address that user is inputted is not present.For example, can be During determining database address, it is organized into a database address form, when staff's input database address Later, inputted address can be inquired whether in database address table, if so, determine the address be it is existing, If not, it is determined that the address is not present, so namely invalid address.The benefit that the technical program is arranged in this way is can be with After user input database address, by whether in the presence of and whether duplicate two aspects verification determines the address of input Whether it is invalid address, correct incidence relation can be established with ancillary staff in this way.
On the basis of above-mentioned each technical solution, optionally, after determining target database, the method also includes: Data base querying request is executed, carries out inquiry work, in the target database to carry out data base querying test.Wherein, The content that can be tested according to actual needs executes data base querying request.Such as can according to staff input or It is the query statement determined according to testing requirement, inquiry work is carried out to database, to realizes the test to database.Due to The scheme of front can quickly and accurately determine target database, thus this programme can after determining target database, The inquiry work of database is carried out, to realize the purpose efficiently detected to target database.
Embodiment two
In order to allow those skilled in the art to be more apparent from technical solution disclosed in the present application, the application is also mentioned A kind of preferred embodiment is supplied.
For technical problem pointed by the prior art, this programme is incited somebody to action so that tester is varying environment, but has phase With the database of business function, specifies same alias or only need to write a set of script, it will be able in different test wrappers Under border, the automatic database using corresponding environment is connected, and runs test script correctly.Realize alias and database Many-one relationship, and correctly select and connect required database.
This programme is embedded by establishing database connection, alias, testing the mapping relations of environment three based on webpage Automatic test cases system in, finally realize database, alias, environment be easy to editorial and database, environment are automatic Switching.
It is described below by taking MySQL database as an example, is described in detail.
1. company is needed based on business, database root is split according to business, has split out merchandising database, transaction data base And order database.
2. there are 2 sets of test environment, DEV environment (exploitation environment) and QA environment (test environment) in company, every set of environments has certainly Oneself merchandising database, transaction data base and order database, merchandising database/transaction data base/order numbers of varying environment It is not identical according to the data in library, but business meaning is identical with table structure.
Fig. 2 is the incidence relation establishment process schematic diagram that the embodiment of the present application two provides.Wherein, host is database address Input field, port are serve port input field, and username is user name input field, and password is user password input field. Based on above-mentioned 1 and 2, it now is possible to 3 Alias, respectively commodity are generated, are traded, order.
The first database connection in DEV environment is specified for alias " commodity ", is bound with DEV environment.
The second database connection in QA environment is specified for alias " commodity ", is bound with QA environment.
The third database connection in DEV environment is specified for alias " transaction ", is bound with DEV environment.
The 4th database connection in QA environment is specified for alias " transaction ", is bound with QA environment.
The 5th database connection in DEV environment is specified for alias " order ", is bound with DEV environment.
The 6th database connection in QA environment is specified for alias " order ", is bound with QA environment.
Fig. 3 is the incidence relation schematic diagram that the embodiment of the present application two provides.Alias, environment and the database formed Mapping relations can be as shown in Figure 3.
In automatic test step, it is only necessary to which tester judges the business meaning of current procedures, it should other at which It is inquired in the database of name, and selects corresponding alias.
Fig. 4 is the database test process schematic diagram that the embodiment of the present application two provides.As shown in figure 4, when tester sentences When determining current procedures it is necessary to inquire the data of a commodity, it should which, in the data base querying of " commodity " alias, tester is only Need selection " commodity " alias.Without focused data library connection, the case where without concern performing environment.
When DEV environment is executed and tested, test frame will find out environment DEV and test step from mapping relations The alias " commodity " specified in rapid finds the first database connection that use, and the number specified in first database connection According to the inquiry operation in library, executing SQL statement.
The technical program, the relationship of editor's database, alias and environment that tester can be convenient.And test frame The function that the environment that can be executed automatically according to test case is chosen database and connected.The technical program can be based on there are rings Border/database has many-one relationship, and the database under varying environment, often has the case where identical services meaning, the present invention Middle introducing Alias, generally to carry out the name of alias to database with business meaning, and target is to realize to survey in automation In the step of example on probation, it is only necessary to which specified database alias does not need specified Connecting quantity, can reach according to test environment not yet Together, the database for being connected automatically to mapping carries out the result of inquiry operation.
Embodiment three
Fig. 5 is the structural schematic diagram of the determining device for the test database that the embodiment of the present application three provides.As shown in figure 5, The determining device of the test database, comprising:
Environment information acquisition module 510, if obtaining database for detecting that data base querying tests trigger event and looking into Ask the environmental information of test;
Database-name obtains module 520, for obtaining the database-name of user's selection by preset window;Wherein, Database is divided and is named according to business;
Target database determining module 530 is used for according to the environmental information, the database-name, and according to pre- The incidence relation between environmental information, database-name and database address being first arranged, determines target database.
Technical solution provided by the embodiment of the present application, if detecting, data base querying tests trigger event, obtains number The environmental information tested according to library inquiry;The database-name of user's selection is obtained by preset window;Wherein, database be according to What business was divided and was named;According to the environmental information, the database-name, and believed according to pre-set environment Incidence relation between breath, database-name and database address, determines target database.By using provided herein Technical solution may be implemented during the test, can simplify test by way of determining database easily operating The operating procedure of procedural test personnel.
On the basis of above-mentioned each technical solution, optionally, described device includes incidence relation setup module, the association Relationship setup module includes:
Database names unit, for obtaining at least two service databases according to delineation of activities, according to user's input Title obtains each database-name;
Connecting quantity acquiring unit, for obtaining Connecting quantity of the same database-name under each environmental information;Wherein, The Connecting quantity includes at least: database address;
Incidence relation determination unit is associated with pass between database-name and environmental information and database for determining System.
On the basis of above-mentioned each technical solution, optionally, the Connecting quantity further include: serve port and user name And user password.
On the basis of above-mentioned each technical solution, optionally, the Connecting quantity acquiring unit includes:
Input frame shows subelement, and for showing all environmental informations under the database-name, and display is each Database address input frame under environmental information;
Database address inputs subelement, and the database address under each environmental information for obtaining user's input determines Database address under the corresponding each environmental information of current data library name.
On the basis of above-mentioned each technical solution, optionally, the database address input subelement is specifically used for:
Whether the database address verified under each environmental information of user's input is effective address;If so, determining current Database address under the corresponding each environmental information of database-name;If it is not, then generating the invalid prompt in input database address Information.
On the basis of above-mentioned each technical solution, optionally, the database address input subelement is specifically used for:
If the database address under each environmental information of user's input is not present or duplicates, it is determined that the data Library address is invalid address.
On the basis of above-mentioned each technical solution, optionally, described device further include:
Test module is inquired, is requested for executing data base querying, inquiry work is carried out in the target database, with Carry out data base querying test.
The said goods can run method provided by the application any embodiment, have the corresponding functional module of operation method And beneficial effect.
Example IV
The embodiment of the present application also provide it is a kind of comprising computer can operating instruction storage medium, the computer can run It instructs when being run by computer processor for running a kind of determination method of test database, this method comprises:
If detecting, data base querying tests trigger event, obtains the environmental information of data base querying test;
The database-name of user's selection is obtained by preset window;Wherein, database be carried out according to business divide and Name;
According to the environmental information, the database-name, and according to pre-set environmental information, database-name Incidence relation between database address, determines target database.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other Memory of type or combinations thereof.In addition, storage medium can be located at program in the computer system being wherein run, or It can be located in different second computer systems, second computer system is connected to computer by network (such as internet) System.Second computer system can provide program instruction to computer for running.Term " storage medium " may include can To reside in different location two or more storage mediums of (such as in the different computer systems by network connection). Storage medium can store the program instruction (such as being implemented as computer program) that can be run by one or more processors.
Certainly, provided by the embodiment of the present application it is a kind of comprising computer can operating instruction storage medium, computer Can the test database that is not limited to the described above of operating instruction determine operation, the application any embodiment can also be run and mentioned Relevant operation in the determination method of the test database of confession.
Embodiment five
The embodiment of the present application provides a kind of electronic equipment, and survey provided by the embodiments of the present application can be integrated in the electronic equipment Try the determining device of database.Fig. 6 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present application five provides.Such as Fig. 6 institute Show, present embodiments provide a kind of electronic equipment 600 comprising: one or more processors 620;Storage device 610, is used for One or more programs are stored, when one or more of programs are run by one or more of processors 620, so that described One or more processors 620 realize the determination method of test database provided by the embodiment of the present application, this method comprises:
If detecting, data base querying tests trigger event, obtains the environmental information of data base querying test;
The database-name of user's selection is obtained by preset window;Wherein, database be carried out according to business divide and Name;
According to the environmental information, the database-name, and according to pre-set environmental information, database-name Incidence relation between database address, determines target database.
Certainly, it will be understood by those skilled in the art that processor 620 can also realize that the application any embodiment is provided Test database determination method technical solution.
The electronic equipment 600 that Fig. 6 is shown is only an example, should not function and use scope to the embodiment of the present application Bring any restrictions.
As shown in fig. 6, the electronic equipment 600 includes processor 620, storage device 610, input unit 630 and output dress Set 640;The quantity of processor 620 can be one or more in electronic equipment, in Fig. 6 by taking a processor 620 as an example;Electronics Processor 620, storage device 610, input unit 630 and output device 640 in equipment can pass through bus or other modes It connects, in Fig. 6 for being connected by bus 650.
Storage device 610 is used as a kind of computer readable storage medium, and can be used for storing software program, computer can run Program and modular unit, such as the corresponding program instruction of determination method of the test database in the embodiment of the present application.
Storage device 610 can mainly include storing program area and storage data area, wherein storing program area can store operation Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal. In addition, storage device 610 may include high-speed random access memory, it can also include nonvolatile memory, for example, at least One disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, storage device 610 It can further comprise the memory remotely located relative to processor 620, these remote memories can pass through network connection.On The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 630 can be used for receiving number, character information or the voice messaging of input, and generation and electronic equipment User setting and function control related key signals input.Output device 640 may include the equipment such as display screen, loudspeaker.
Electronic equipment provided by the embodiments of the present application may be implemented during the test, can by easily operate come The mode of database is determined to simplify the operating procedure of test procedure test personnel.
Determining device, storage medium and the electronic equipment of the test database provided in above-described embodiment can run the application The determination method of test database provided by any embodiment has the corresponding functional module of operation this method and beneficial to effect Fruit.The not technical detail of detailed description in the above-described embodiments, reference can be made to test data provided by the application any embodiment The determination method in library.
Note that above are only the preferred embodiment and institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, be able to carry out for a person skilled in the art it is various it is apparent variation, The protection scope readjusted and substituted without departing from the application.Therefore, although being carried out by above embodiments to the application It is described in further detail, but the application is not limited only to above embodiments, in the case where not departing from the application design, also It may include more other equivalent embodiments, and scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. a kind of determination method of test database characterized by comprising
If detecting, data base querying tests trigger event, obtains the environmental information of data base querying test;
The database-name of user's selection is obtained by preset window;Wherein, database is divided and is named according to business 's;
According to the environmental information, the database-name, and according to pre-set environmental information, database-name sum number According to the incidence relation between the address of library, target database is determined.
2. the method according to claim 1, wherein database-name, environmental information and the database of setting Incidence relation, comprising:
At least two service databases are obtained according to delineation of activities, according to the title that user inputs, obtain each database-name;
Obtain Connecting quantity of the same database-name under each environmental information;Wherein, the Connecting quantity includes at least: data Library address;
Determine the incidence relation between database-name and environmental information and database.
3. according to the method described in claim 2, it is characterized in that, the Connecting quantity further include: serve port and user Name and user password.
4. according to the method described in claim 2, it is characterized in that, obtaining company of the same database-name under each environmental information Connect parameter, comprising:
The database address input under all environmental informations, and each environmental information of display is shown under the database-name Frame;
The database address under each environmental information of user's input is obtained, determines the corresponding each environmental information of current data library name Under database address.
5. according to the method described in claim 4, it is characterized in that, with obtaining the database under each environmental information that user inputs Location determines the database address under the corresponding each environmental information of current data library name, comprising:
Whether the database address verified under each environmental information of user's input is effective address;If so, determining current data Database address under the corresponding each environmental information of library name;If it is not, then generating the invalid prompt information in input database address.
6. according to the method described in claim 5, it is characterized in that, with verifying the database under each environmental information that user inputs Whether location is that the standard of effective address includes:
If the database address under each environmental information of user's input is not present or duplicates, it is determined that the database Location is invalid address.
7. the method according to claim 1, wherein after determining target database, the method also includes:
Data base querying request is executed, carries out inquiry work, in the target database to carry out data base querying test.
8. a kind of determining device of test database characterized by comprising
Environment information acquisition module, if obtaining data base querying test for detecting that data base querying tests trigger event Environmental information;
Database-name obtains module, for obtaining the database-name of user's selection by preset window;Wherein, database is It is divided and is named according to business;
Target database determining module is used for according to the environmental information, the database-name, and according to pre-set Incidence relation between environmental information, database-name and database address, determines target database.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The determination method such as test database of any of claims 1-7 is realized when row.
10. a kind of electronic equipment, including memory, processor and storage are on a memory and can be in the computer of processor operation Program, which is characterized in that the processor is realized when executing the computer program as of any of claims 1-7 The determination method of test database.
CN201910676468.5A 2019-07-25 2019-07-25 A kind of determination method, apparatus, storage medium and the electronic equipment of test database Withdrawn CN110413522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910676468.5A CN110413522A (en) 2019-07-25 2019-07-25 A kind of determination method, apparatus, storage medium and the electronic equipment of test database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910676468.5A CN110413522A (en) 2019-07-25 2019-07-25 A kind of determination method, apparatus, storage medium and the electronic equipment of test database

Publications (1)

Publication Number Publication Date
CN110413522A true CN110413522A (en) 2019-11-05

Family

ID=68363121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910676468.5A Withdrawn CN110413522A (en) 2019-07-25 2019-07-25 A kind of determination method, apparatus, storage medium and the electronic equipment of test database

Country Status (1)

Country Link
CN (1) CN110413522A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941627A (en) * 2019-12-12 2020-03-31 南京医渡云医学技术有限公司 Data processing method and device, electronic equipment and storage medium
CN111773728A (en) * 2020-07-09 2020-10-16 网易(杭州)网络有限公司 Data table testing method, device, equipment and storage medium
CN113204379A (en) * 2021-05-06 2021-08-03 携程商旅信息服务(上海)有限公司 Method, system, equipment and medium for dynamically loading test resources
CN113420010A (en) * 2021-06-23 2021-09-21 建信金融科技有限责任公司 Database management method and device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941627A (en) * 2019-12-12 2020-03-31 南京医渡云医学技术有限公司 Data processing method and device, electronic equipment and storage medium
CN111773728A (en) * 2020-07-09 2020-10-16 网易(杭州)网络有限公司 Data table testing method, device, equipment and storage medium
CN113204379A (en) * 2021-05-06 2021-08-03 携程商旅信息服务(上海)有限公司 Method, system, equipment and medium for dynamically loading test resources
CN113204379B (en) * 2021-05-06 2022-11-15 携程商旅信息服务(上海)有限公司 Method, system, equipment and medium for dynamically loading test resources
CN113420010A (en) * 2021-06-23 2021-09-21 建信金融科技有限责任公司 Database management method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110413522A (en) A kind of determination method, apparatus, storage medium and the electronic equipment of test database
US10184882B2 (en) System and method for providing user guidance for electronic device processing
US20190335016A1 (en) Service processing method and apparatus, and service server
CN106327246B (en) Method and device for business processing
CN108197202A (en) Data verification method, device, server and the storage medium of crowdsourcing task
CN111191250B (en) Verification method and device, verification device, server and terminal
CN109388924A (en) A kind of auth method, device, server and storage medium
CN109783543A (en) Data query method, apparatus, equipment and storage medium
CN110134869A (en) A kind of information-pushing method, device, equipment and storage medium
CN112199277A (en) Browser-based defect reproduction method, device, equipment and storage medium
CN105471641A (en) Information management method and correlation equipment
CN110674023B (en) Interface testing method and device
CN110110236A (en) A kind of information-pushing method, device, equipment and storage medium
CN113138934B (en) Automatic test method, medium, device and computing equipment
CN109754266A (en) Authentication information image display method, device, server and storage medium
CN110113346A (en) A kind of network verification method, user terminal and server
US20080162636A1 (en) System and method for replying to questions on-line
CN112651716A (en) Data processing method, device and storage medium
CN111177632A (en) Data acquisition method and related equipment, system and storage device thereof
CN110825370B (en) Mobile terminal application development method, device and system
CN111859442A (en) Authority configuration method, authority configuration system and computer readable storage medium
CN105893502A (en) Code synchronization method and device
CN114116353A (en) Equipment testing method, device, equipment and storage medium
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN114499984A (en) Identity authentication method, device, equipment and medium based on AI and RPA

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20191105