[Reserved] a simple interface JMeter test

       The interface testing: According ws query specific information for all commodities to check whether the goods return success.

 

1. Prepare test data

  Query the database tables have been added to our product goods number select ID from ent_product where is_up = 1 and state = '000001'

  

Save the file in C: \ JmeterWorkSpace \ aa.csv.

 

2. Open and set the JMeter.

  . A click on the "Test Plan" right "Add" - "Thread (Users)" - "thread group."

    10 to set the number of threads

  . B again "thread group" right "Add" - "Sample" - "HTTP request"

  

 . C Click Options - Function Assistant dialog box

    

Select the drop-down list to select a function: _StringFromFile; the full path to the file: C: \ JmeterWorkSpace \ aa.csv, click Generate.

Copy function generated: $ {__ StringFromFile (C: \ JmeterWorkSpace \ aa.csv ,,,)}.

 

d. modify the HTTP request parameters page, just copy the complex function to the appropriate location

. E re "thread group" right "Add" - "listener" - "View results tree"

f then "thread group" right "Add" -. "listener" - "View the results in tabular"

 

3. Run JMeter

See the results running, open look at the result tree:

 

  Open results in tabular view:

  

 So far, this interface test has been completed.

Guess you like

Origin www.cnblogs.com/xxxs/p/11763045.html