CN109815113A - Test method and server based on Jmeter platform - Google Patents

Test method and server based on Jmeter platform Download PDF

Info

Publication number
CN109815113A
CN109815113A CN201811530401.2A CN201811530401A CN109815113A CN 109815113 A CN109815113 A CN 109815113A CN 201811530401 A CN201811530401 A CN 201811530401A CN 109815113 A CN109815113 A CN 109815113A
Authority
CN
China
Prior art keywords
test
jmeter
platform
initial data
assignment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811530401.2A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811530401.2A priority Critical patent/CN109815113A/en
Publication of CN109815113A publication Critical patent/CN109815113A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of test methods based on Jmeter platform, this method comprises: receiving test assignment request;Software version is loaded into Jmeter platform;Receive test script information;The initial data corresponding to the test assignment is looked up from the preset database out according to the test script information and records;The initial data is assigned to the Jmeter platform to execute the test assignment;Test report is exported, the test report includes initial data and result data.The present invention also provides a kind of device, server and computer readable storage mediums.Initial data in database can be found out according to test script information and be assigned to the Jmeter platform by the test method based on Jmeter platform, device, server and computer readable storage medium provided by the invention executes test, and by the test report including initial data and result data, so that Jmeter platform realizes the monitoring to the initial data of test object to result data during functional test.

Description

Test method and server based on Jmeter platform
Technical field
The present invention relates to the field of test technology more particularly to a kind of test methods based on Jmeter platform, device, service Device and computer readable storage medium.
Background technique
Jmeter platform be although be developed as the testing tool of performance test and pressure test, but due to Jmeter platform, which has, to be able to carry out multithreading test assignment, is capable of handling the characteristics of test assignment of wide limiting value, Therefore, Jmeter platform is also usually applied to functional test scope.However, existing Jmeter platform can not ground monitoring and The function of the data variation in test process is analyzed, therefore, Jmeter platform is gone back in terms of realizing good functional test service It is some deficiencies.
Summary of the invention
In view of this, the present invention proposes a kind of test method, device, server and calculating of the user based on Jmeter platform Initial data in database can be found out according to test script information and is assigned to described by machine readable storage medium storing program for executing Jmeter platform executes test, and by the test report including initial data and result data, so that Jmeter platform exists The monitoring to the initial data of test object to result data is realized during functional test.
Firstly, to achieve the above object, the present invention provides a kind of test method based on Jmeter platform, this method application In server, which comprises
Receive test assignment request;Corresponding software version is requested to be loaded into Jmeter platform the test assignment;It connects Receive the test script information of user's input;It is looked up from the preset database out according to the test script information described in corresponding to The initial data of test assignment is simultaneously recorded;The initial data is assigned to the Jmeter platform to execute the test Task;Test report is exported, the test report includes initial data and result data.
Optionally, described " according to the test when the test assignment needs multiple thread channels to be tested jointly The initial data corresponding to the test assignment is looked up from the preset database out in script information " the step of, comprising steps of root Search the corresponding initial data of test assignment in corresponding per thread channel from the database according to the test assignment;By institute It states initial data and is separately dispensed into the corresponding thread channel of the Jmeter platform to execute the test assignment jointly.
Optionally, the method also includes steps: receiving the test query order of user's input;Output corresponds to described look into Ask the test result data of order.
Optionally, the method also includes steps: receiving the test result verification request of user;Obtain the test assignment Service logic in request;According to the initial data, test result data and the service logic to the test report It is verified, and output verification result.
In addition, to achieve the above object, the present invention also provides a kind of test device based on Jmeter platform, described devices Include:
Receiving module, for receiving test assignment request;Loading module is corresponding soft for requesting the test assignment Part version is loaded into Jmeter platform;The receiving module is also used to receive the test script information of user's input;Search mould Block, for the initial data corresponding to the test assignment to be looked up from the preset database out according to the test script information And it records;The loading module is also used to for the initial data to be assigned to the Jmeter platform;Execution module is used In executing the test assignment and exporting test report, the test report includes initial data and result data.
Optionally, when the test assignment needs multiple thread channels to be tested jointly, the searching module is used for Search the corresponding initial data of test assignment in corresponding per thread channel from the database according to the test assignment;Institute Loading module is stated, is also used to for the initial data to be separately dispensed into the corresponding thread channel of the Jmeter platform.
Optionally, the receiving module is also used to receive the test query order of user's input;The execution module, also For exporting the test result data for corresponding to the querying command.
Optionally, described device further includes obtaining module, wherein the receiving module is also used to receive the test of user As a result verification request;The acquisition module, for obtaining the service logic in the test assignment request;The execution module, It is also used to verify the test report according to the initial data, test result data and the service logic, and Output verification result.
Further, the present invention also proposes that a kind of server, the server include memory, processor, the storage It is stored with the test program based on Jmeter platform that can be run on the processor on device, it is described based on Jmeter platform It realizes when test program is executed by the processor such as the step of the above-mentioned test method based on Jmeter platform.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Readable storage medium storing program for executing is stored with the test program based on Jmeter platform, and the test program based on Jmeter platform can be by extremely A few processor executes, so that at least one described processor is executed such as the above-mentioned test method based on Jmeter platform Step.
Compared to the prior art, it is proposed by the invention by the test method of Jmeter platform, device, server and based on Initial data in database can be found out according to test script information and is assigned to described by calculation machine readable storage medium storing program for executing Jmeter platform executes test, and by the test report including initial data and result data, so that Jmeter platform exists The monitoring to the initial data of test object to result data is realized during functional test.
Detailed description of the invention
Fig. 1 is the schematic diagram of the optional hardware structure of server one of the present invention;
Fig. 2 is the program module schematic diagram of one embodiment of test program the present invention is based on Jmeter platform;
Fig. 3 is the flow diagram of one embodiment of test method the present invention is based on Jmeter platform.
Appended drawing reference:
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
As shown in fig.1, being the schematic diagram of the optional hardware structure of server 1 one of the present invention.
The server 1 can be rack-mount server, blade server, tower server or Cabinet-type server etc. Equipment is calculated, which can be independent server, be also possible to server cluster composed by multiple servers.
In the present embodiment, the server 1 may include, but be not limited only to, and can be in communication with each other connection by system bus and deposit Reservoir 11, processor 12, network interface 13.
The server 1 connects network (Fig. 1 is not marked) by network interface 13, arrives other servers by network connection Or terminal such as database server or the end PC etc..The network can be intranet (Intranet), internet (Internet), global system for mobile communications (Global System of Mobile communication, GSM), broadband code Divide multiple access (Wideband Code Division Multiple Access, WCDMA), 4G network, 5G network, bluetooth (Bluetooth), the wirelessly or non-wirelessly network such as Wi-Fi, speech path network.
It should be pointed out that Fig. 1 illustrates only the server 1 with component 11-13, it should be understood that simultaneously should not Realistic to apply all components shown, the implementation that can be substituted is more or less component.
Wherein, the memory 11 includes at least a type of readable storage medium storing program for executing, and the readable storage medium storing program for executing includes Flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), it is static with Machine accesses memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable Read memory (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 11 can be the clothes The internal storage unit of business device 1, such as the hard disk or memory of the server 1.In further embodiments, the memory 11 It can be the External memory equipment of the server 1, such as the plug-in type hard disk that the server 1 is equipped with, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..When So, the memory 11 can also both including the server 1 internal storage unit and also including its External memory equipment.This reality It applies in example, the memory 11 is installed on the operating system and types of applications software of the server 1 commonly used in storage, such as The program code etc. of test program 200 based on Jmeter platform.In addition, the memory 11 can be also used for temporarily storing The Various types of data that has exported or will export.
The processor 12 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 12 is commonly used in the control clothes The overall operation of business device 1, such as execute data interaction or the relevant control of communication and processing etc..In the present embodiment, the place Reason device 12 for running the program code stored in the memory 11 or processing data, such as operation it is described based on Test program 200 of Jmeter platform etc..
The network interface 13 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the server 1 and other servers or terminal such as database server or the end PC.
In the present embodiment, when being installed in the server 1 and running the test program 200 based on Jmeter platform, When the test program 200 based on Jmeter platform is run, the server 1 can be according to test script information by data Initial data in library, which finds out and is assigned to the Jmeter platform, executes test, and will include initial data and number of results According to test report so that Jmeter platform is realized during functional test to the initial data of test object to knot The monitoring of fruit data.
So far, oneself is through describing the application environment of each embodiment of the present invention and the hardware configuration and function of relevant device in detail Energy.In the following, above-mentioned application environment and relevant device will be based on, each embodiment of the invention is proposed.
Firstly, the present invention proposes a kind of test program 200 based on Jmeter platform.
As shown in fig.2, being the Program modual graph of 200 1 embodiment of test program the present invention is based on Jmeter platform.
In the present embodiment, the test program 200 based on Jmeter platform is stored in memory 11 including a series of On computer program instructions, when the computer program instructions by processor 12 execute when, various embodiments of the present invention may be implemented The test operation based on Jmeter platform.In some embodiments, it is realized based on the computer program instructions each section Specific operation, the test program 200 based on Jmeter platform can be divided into one or more modules.For example, in Fig. 2 In, the test program 200 based on Jmeter platform can be divided into receiving module 201, loading module 202, search mould Block 203, execution module 204 and acquisition module 205.Wherein:
The receiving module 201, for receiving test assignment request.
Specifically, the receiving module 201 can directly receive user's input by the interactive interface of the server 1 Test assignment request.Alternatively, when other terminals such as end PC that user is connected by the server 1 makes requests information input When, the receiving module 201 then can receive the test assignment request for being obtained and being sended over by the end PC.Wherein, it uses Family sends test assignment to the server 1 while request, can also be by the corresponding service logic of the test assignment and soft Part version uploads to the server 1.In the present embodiment, the receiving module 201 receive test assignment request after, User can also be received to input the service logic of the test assignment and software version and record and save, the business Logic is actually the actual functional capability reached when the program code of the software version executes.For example, the software version For cash in banks business, then corresponding to the service logic of the cash in banks business are as follows: deposit=M+x is wherein deposited based on M Money, x are the user's credit received.
The loading module 202, for requesting corresponding software version to be loaded into Jmeter platform the test assignment.
Specifically, software test is typically all and each function in order to examine the function of software whether to meet the demand of user A service logic can be all contained, the service logic can regard the method and process for realizing user demand as.And Jmeter is then operate in the application platform for being tested software version of the server 1.In the present embodiment, institute After stating the test assignment request that receiving module 201 receives user, correspondence that the loading module 202 can then upload user Jmeter platform is loaded into the software version of the test assignment.Wherein, the Jmeter platform generally includes multiple threads Channel then can preferentially be defaulted as a thread channel for each test assignment, and therefore, the loading module 202 is loaded directly into To the thread channel of the default of the Jmeter platform.For example, when the test assignment that the receiving module 201 receives is test When cash in banks business, the loading module 202 can further obtain that user uploads for executing the soft of cash in banks business The program code of part version is then loaded on a thread channel on Jmeter platform, to deposit for subsequent execution bank The test of money business.
Certainly, test assignment is concurrently executed since multiple thread channels may be implemented in Jmeter platform, in other realities It applies in example, a test assignment may include multiple thread channels, then the loading module 202 then can be by the software version Program code be loaded into each thread channel in the multiple thread channel.
The receiving module 201 is also used to receive the test script information of user's input.
The searching module 203 corresponds to for being looked up from the preset database out according to the test script information The initial data of the test assignment is simultaneously recorded.
The loading module 202 is also used to for the initial data to be assigned to the Jmeter platform.
Specifically, the corresponding software version of the test assignment is loaded into the Jmeter in the loading module 202 After the thread channel of platform, the receiving module 201 is also used to receive what control interface of the user in the thread channel inputted Test script information, the test script information can be understood as testing and control order or test use for executing test Example, and the test script information that the searching module 203 is then received according to the receiving module 201 is from preset database It finds out the initial data for test and records.Then the loading module 202 further adds the initial data It is downloaded to the thread channel.Wherein, the database can be the storage unit for being present in the server 1, be also possible to deposit Other servers such as database server of the connection of server 1 described in Chu Yu.
In the present embodiment, the receiving module 201 receives test script letter by the control interface in the thread channel Breath, then the searching module 203 obtains the original of the corresponding thread channel from database according to the test script information Data, then the initial data is assigned to the thread channel and is led to being used to execute the thread by the loading module 202 The test assignment in road.For example, the corresponding test assignment in the thread channel is cash in banks operational trials, the then reception mould Block 201 receives the test script information that control interface of the user in the thread channel inputs: " Lee three, deposit 100 ", then institute " Lee three " corresponding basis deposit, such as 200, the then load can be searched in database server by stating searching module 203 The initial data is assigned to the corresponding thread channel of the cash in banks operational trials by module 202.Certainly, searching module 203 The basis deposit 200 can also be recorded such as simultaneously: " cash in banks business: basis deposit 200 ".
The execution module 204, for executing the test assignment and exporting test report, the test report includes original Beginning data and result data.
Specifically, the loading module 202 is after being assigned to corresponding thread channel for the initial data, then institute Execution module 204 is stated according to test instruction execution test is executed, specifically according to the test script information and the original number According to, and test is executed by the software program in the thread channel, the number of results after then obtaining the thread lane testing According to finally will including the test report output of initial data and result data.In the present embodiment, when the receiving module 201 The test script information of user's input is received as " Lee three, and deposit 100 ", then searching module 203 is obtained from database server Get " Lee three " it is corresponding basis deposit after, then the execution module 204 further according to " Lee three " basis deposit 200 and The credit 100 of " deposit 100 " is by the corresponding software program execution cash in banks process in the thread channel, and by result It data record and preserves.In the present embodiment, executing the software version is actually the function for executing the service logic Energy.For example, the corresponding service logic of the software version are as follows: deposit=M+x is wherein deposited based on M, and x is the use received Family credit.So, after the thread channel has executed test, result data is obtained: deposit=200+100=300, then It is saved by 300.Certainly, if the thread channel executes the software program of test there are mistake, that test execution Service logic then may be mistake, and the result data obtained from may also then malfunction, but Jmeter plateform system can still be remembered It records and saves, such as when obtaining out result data is 250, system equally can be by 250 number of results same as the thread According to saving.
The receiving module 201 is also used to receive the test result verification request of user.
The acquisition module 205, for obtaining the service logic in the test assignment request.
The execution module 204 is also used to according to the initial data, test result data and the service logic pair The test report is verified, and output verification result.
Specifically, after the execution module 204 has executed test assignment, the receiving module 201 can also monitor user Operation.After the receiving module 201 receives the test result verification request of user's input, the acquisition module 205 is then The service logic in the test assignment request can be obtained, then the execution module 204 is tied according to the initial data, test Fruit data and the service logic verify the test report, and output verification result.In the present embodiment, example Such as, when the test result verification request that the receiving module 201 receives user's input is " deposit ", then the acquisition mould Block 205 can then obtain the service logic of cash in banks business relevant to " deposit ": " deposit=M+x is wherein deposited based on M, X is the user's credit received;The execution module 204 for example (deposits on basis) 200, result data according to initial data (deposit) 300 and service logic " deposit=M+x is wherein deposited based on M, and x is the user's credit received " are to survey Test result is verified.For example, in the present embodiment, system is by substituting into the initial data and the test script information To the service logic in the thread channel, then the result of output is verified, result and the result data when output When identical, then it is assumed that the test in the thread channel passes through, and the test for otherwise judging the thread channel does not pass through, and with eye-catching Mode reminds user.Certainly, in other embodiments, the execution module 204 can also be only by initial data, number of results It is checked according to being shown with the service logic to user, user can also judge roughly to test whether to go wrong.
Certainly, it is logical using multiple threads to execute multiple test assignments or the same test assignment at the same time for Jmeter platform When road, the branch that result checks tree is generated as per thread channel, therefore, user can check by clicking result To check the test result in the corresponding thread channel of the branch, which includes the original in the thread channel for each branch of tree Beginning data, result data, service logic and whether pass through test.
It will be recalled from above that the server 1 can find out the initial data in database according to test script information Come and be assigned to the Jmeter platform to execute test, and by the test report including initial data and result data, to make Jmeter platform realizes the monitoring to the initial data of test object to result data during functional test.
Certainly, in other embodiments, a base also can be set into the test program 200 based on Jmeter platform In the test device of Jmeter platform, which includes all program moulds of the test program 200 based on Jmeter platform The one-to-one functional module of block.The test device based on Jmeter platform, which can be used as independent functional unit and be attached to, to be set It is equipped on the server of Jmeter platform, the comparison analysis of data is carried out when in order to execute software test.
In addition, the present invention also proposes that a kind of test method based on Jmeter platform, the method are applied to server.
As shown in fig.3, being the flow diagram of one embodiment of test method the present invention is based on Jmeter platform.At this In embodiment, the execution sequence of the step in flow chart shown in Fig. 3 be can change according to different requirements, and certain steps can To omit.
Step S500 receives test assignment request.
Specifically, the server directly receives the test assignment request of user's input by the interactive interface of itself.Or Person, when for example the end PC makes requests information input to other terminals that user is connected by the server, the server then may be used To receive the test assignment for being obtained and being sended over by the end PC request.Wherein, user sends to the server and tests While task requests, also the corresponding service logic of the test assignment and software version can be uploaded to the server. In the present embodiment, it after receiving test assignment request, user can also be received inputs the business of the test assignment and patrol Volume and software version and record and save, the service logic is actually that the program code of the software version is held The actual functional capability reached when row.For example, the software version is cash in banks business, then corresponding to the cash in banks business Service logic are as follows: deposit=M+x is wherein deposited based on M, and x is the user's credit received.
The test assignment is requested corresponding software version to be loaded into Jmeter platform by step S502.
Specifically, software test is typically all and each function in order to examine the function of software whether to meet the demand of user A service logic can be all contained, the service logic can regard the method and process for realizing user demand as.And Jmeter is then operate in the application platform for being tested software version of the server 1.In the present embodiment, exist After the test assignment request for receiving user, what the server can then upload user corresponds to the soft of the test assignment Part version is loaded into Jmeter platform.Wherein, the Jmeter platform generally includes multiple thread channels, and each test is appointed Business, then can preferentially be defaulted as a thread channel, therefore, the server can be loaded directly into the default of the Jmeter platform Thread channel.For example, then can further obtain user's upload when the test assignment received is test cash in banks business The software version for executing cash in banks business program code, it is logical to be then loaded into a thread on Jmeter platform On road, with the test for subsequent execution cash in banks business.
Certainly, test assignment is concurrently executed since multiple thread channels may be implemented in Jmeter platform, in other realities It applies in example, a test assignment may include multiple thread channels, then, then the program code of the software version can be loaded To each thread channel in the multiple thread channel.
Step S504, receives the test script information of user's input, and finds out corresponding to the original of the test assignment Data are assigned to the Jmeter platform.
Specifically, the thread channel that the corresponding software version of the test assignment is loaded into the Jmeter platform it Afterwards, the server can also receive the test script information that control interface of the user in the thread channel inputs, then according to institute Test script information is stated the initial data for test is looked up from the preset database out and records, the test script Information can be understood as the testing and control order or test case for executing test, and further add the initial data It is downloaded to the thread channel.Wherein, the database can be the storage unit for being present in the server 1, be also possible to deposit Other servers such as database server of the connection of server 1 described in Chu Yu.
In the present embodiment, the server receives test script information by the control interface in the thread channel, so The initial data for obtaining the corresponding thread channel from database according to the test script information afterwards, then by the original number According to being assigned to the thread channel with the test assignment for executing the thread channel.For example, the thread channel is corresponding Test assignment is cash in banks operational trials, then, then it can receive the survey that control interface of the user in the thread channel inputs Try script information such as: " Lee three, deposit 100 ", then " Lee three " corresponding basis deposit can be then searched in database server, Such as 200, the initial data is then assigned to the corresponding thread channel of the cash in banks operational trials.Certainly, it can also incite somebody to action The basis deposit 200 is recorded such as: " cash in banks business: basis deposit 200 ".
Step S506 executes the test assignment and exports test report, and the test report includes initial data and knot Fruit data.
It specifically, then then can be according to executing test after the initial data is assigned to corresponding thread channel Instruction execution test specifically according to the test script information and the initial data, and passes through the soft of the thread channel Part program executes test, and the result data after then obtaining the thread lane testing finally will include initial data and knot The test report of fruit data exports.In the present embodiment, when such as " Lee three, deposit 100 ", so for the test script information of user's input " Lee three " corresponding basis deposit such as 200 is got from database server afterwards, then further according to the basis deposit 200 of " Lee three " And the credit 100 of " deposit 100 " executes cash in banks process by the corresponding software program in the thread channel, and will Result data is recorded and is preserved.In the present embodiment, executing the software version is actually to execute the service logic Function.For example, the corresponding service logic of the software version are as follows: deposit=M+x is wherein deposited based on M, and x is to receive User's credit.So, after the thread channel has executed test, result data is obtained: deposit=200+100=300, Then it is saved by 300.Certainly, if the thread channel executes the software program of test there are mistake, that test is held Capable service logic then may be mistake, and the result data obtained from may also then malfunction, but Jmeter plateform system is still It will record and save, such as when obtaining out result data is 250, system equally can be by 250 knots same as the thread Fruit data save.
Step S508 obtains the service logic in the test assignment request, according to the initial data, test result number Accordingly and the service logic verifies the test report, and output verification result.
Specifically, after having executed test assignment, the server can also monitor the operation of user.It is defeated when receiving user After the test result verification request entered, then the service logic in the test assignment request can be obtained, then according to described original Data, test result data and the service logic verify the test report, and output verification result.In this reality It applies in example, for example, when the test result verification request for receiving user's input is " deposit ", then can then obtain and " deposit " The service logic of relevant cash in banks business: " deposit=M+x is wherein deposited based on M, and x is that the user received deposits number Volume;Then 200, result data (deposit) 300 and service logic " deposit=M+ for example (are deposited on basis) according to initial data X is wherein deposited based on M, and x is the user's credit received " test result is verified.For example, in the present embodiment In, the initial data and the test script information by being updated to the service logic in the thread channel by system, then The result of output is verified, when the result of output is identical as the result data, then it is assumed that the test in the thread channel Pass through, the test for otherwise judging the thread channel does not pass through, and user is reminded in a manner of eye-catching.Certainly, in other implementations It can also be only that initial data, result data and the service logic are shown and checked to user, user can also in example To judge to test whether roughly to go wrong.
Certainly, it is logical using multiple threads to execute multiple test assignments or the same test assignment at the same time for Jmeter platform When road, the branch that result checks tree is generated as per thread channel, therefore, user can check by clicking result To check the test result in the corresponding thread channel of the branch, which includes the original in the thread channel for each branch of tree Beginning data, result data, service logic and whether pass through test.
The test method based on Jmeter platform that the present embodiment is proposed, can be according to test script information by database In initial data find out and be assigned to the Jmeter platform and execute test, and will include initial data and result data Test report so that Jmeter platform is realized during functional test to the initial data of test object to result The monitoring of data.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of test method based on Jmeter platform is applied to server, which is characterized in that the method includes the steps:
Receive test assignment request;
Corresponding software version is requested to be loaded into Jmeter platform the test assignment;
Receive the test script information of user's input;
According to the test script information be looked up from the preset database out corresponding to the test assignment initial data simultaneously It records;
The initial data is assigned to the Jmeter platform to execute the test assignment;
Test report is exported, the test report includes initial data and result data.
2. the test method as described in claim 1 based on Jmeter platform, which is characterized in that when the test assignment needs It is described " to be looked up from the preset database out pair according to the test script information when multiple thread channels are tested jointly The step of initial data of test assignment described in Ying Yu ", comprising steps of
Search the corresponding original number of test assignment in corresponding per thread channel from the database according to the test assignment According to;
The initial data is separately dispensed into the corresponding thread channel of the Jmeter platform to execute the test jointly and appoint Business.
3. the test method as described in claim 1 based on Jmeter platform, which is characterized in that the method also includes steps It is rapid:
Receive the test query order of user's input;
Output corresponds to the test result data of the querying command.
4. the test method as claimed in claim 3 based on Jmeter platform, which is characterized in that the method also includes steps It is rapid:
The test result for receiving user verifies request;
Obtain the service logic in the test assignment request;
The test report is verified according to the initial data, test result data and the service logic, and defeated Check results out.
5. a kind of test device based on Jmeter platform, which is characterized in that described device includes:
Receiving module, for receiving test assignment request;
Loading module, for requesting corresponding software version to be loaded into Jmeter platform the test assignment;
The receiving module is also used to receive the test script information of user's input;
Searching module corresponds to the test assignment for being looked up from the preset database out according to the test script information Initial data and record;
The loading module is also used to for the initial data to be assigned to the Jmeter platform;
Execution module, for executing the test assignment and exporting test report, the test report includes initial data and knot Fruit data.
6. the test device as claimed in claim 5 based on Jmeter platform, which is characterized in that when the test assignment needs When multiple thread channels are tested jointly,
The searching module, for searching the test in corresponding per thread channel from the database according to the test assignment The corresponding initial data of task;
The loading module is also used to for the initial data to be separately dispensed into the corresponding thread channel of the Jmeter platform.
7. the test device as claimed in claim 5 based on Jmeter platform, which is characterized in that
The receiving module is also used to receive the test query order of user's input;
The execution module is also used to export the test result data for corresponding to the querying command.
8. the test device as claimed in claim 7 based on Jmeter platform, which is characterized in that described device further includes obtaining Module, wherein
The receiving module is also used to receive the test result verification request of user;
The acquisition module, for obtaining the service logic in the test assignment request;
The execution module is also used to according to the initial data, test result data and the service logic to the survey Examination report is verified, and output verification result.
9. a kind of server, which is characterized in that the server includes memory, processor, and being stored on the memory can The test program based on Jmeter platform run on the processor, the test program based on Jmeter platform is by institute State the step of realizing the test method according to any one of claims 1-4 based on Jmeter platform when processor executes.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has the survey based on Jmeter platform Try program, which is characterized in that the test program based on Jmeter platform can be executed by least one processor, so that described At least one processor is executed such as the step of the test method of any of claims 1-4 based on Jmeter platform.
CN201811530401.2A 2018-12-14 2018-12-14 Test method and server based on Jmeter platform Pending CN109815113A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811530401.2A CN109815113A (en) 2018-12-14 2018-12-14 Test method and server based on Jmeter platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811530401.2A CN109815113A (en) 2018-12-14 2018-12-14 Test method and server based on Jmeter platform

Publications (1)

Publication Number Publication Date
CN109815113A true CN109815113A (en) 2019-05-28

Family

ID=66601753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811530401.2A Pending CN109815113A (en) 2018-12-14 2018-12-14 Test method and server based on Jmeter platform

Country Status (1)

Country Link
CN (1) CN109815113A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839839A (en) * 2021-10-22 2021-12-24 武汉天喻信息产业股份有限公司 Method and system for testing multi-thread concurrent communication

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113839839A (en) * 2021-10-22 2021-12-24 武汉天喻信息产业股份有限公司 Method and system for testing multi-thread concurrent communication

Similar Documents

Publication Publication Date Title
CN109614206A (en) Device, method and the storage medium of block chain issued transaction
CN109800149A (en) Application interface method for generating test case and server
CN108519943A (en) Testing and control and test execution device, method and computer storage media
CN104077328B (en) The operation diagnostic method and equipment of MapReduce distributed system
CN108681504A (en) Automated testing method, test server and computer readable storage medium
CN105095970A (en) Execution method and system of third-party application
CN107423213A (en) A kind of filec descriptor distribution detection method and device
CN104679884B (en) Data analysing method, device and the system of database
CN109617726A (en) Error log acquisition method and server
CN108306921A (en) Call external service method and application server
CN109447384A (en) Verification method, device, equipment and the storage medium of air control system
CN110083533A (en) Data processing method and device based on Mock service
CN108429783A (en) Electronic device, configuration file method for pushing and storage medium
CN111352851A (en) Program testing method and device, computer equipment and storage medium
CN107798064A (en) Page processing method, electronic equipment and computer-readable recording medium
CN109690571A (en) Group echo system and method based on study
CN114490375B (en) Performance test method, device, equipment and storage medium of application program
CN109828790A (en) A kind of data processing method and system based on Shen prestige isomery many-core processor
CN109299205A (en) The method and apparatus that will plan that the spatial data that industry uses is put in storage
CN108427635A (en) Quickly method, server and the computer readable storage medium of test web page
CN108427634A (en) Electronic device, the method for test and computer readable storage medium
CN109815113A (en) Test method and server based on Jmeter platform
CN113220597A (en) Test method, test device, electronic apparatus, and storage medium
CN112416648A (en) Data verification method and device
CN109901887A (en) Plug-in unit model dispositions method, electronic device and computer readable storage medium

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