[Popular Science] Jmeter How to Test Interface Nanny Tutorial

Nowadays, the requirements for testers are getting higher and higher. Not only do they have to do functional testing, but there is also an increasing demand for interface testing! Therefore, more and more students are asking, how can we do a good job in interface testing?

To really do a good job in interface testing and understand how to test the interface, you need to analyze the problem from the following aspects, and then find the right direction for learning, so that you can strategize at work.

1: Selection of tools

  • Jmeter
  • soap
  • postman
  • fiddler
  • coding
  • Other tools

So you can see that we have a variety of tools and solutions for novices to choose from. Since our title is Jmeter, we will focus on how to use Jmeter to test the interface.

2: Classification of interfaces

  • http:Jmeter soapui postman
  • socket:Jmeter
  • webservice:Jmeter soapui

Before conducting interface testing, you must know what protocol your interface uses, so that you can choose tools or install corresponding plug-ins for the tools based on this! For example, if it is a socket protocol and you want to use Jmeter to test it, you must install the plug-in in advance to successfully complete the test. If you don't know what the protocol is, you can ask the developer!

Three: What knowledge should you master when testing the Jmeter interface?

We also need to make a classification explanation for this issue to help everyone sort it out. (As an example here, we use HTTP type interface to illustrate)

A: Simple interface test (does not involve any cookie session or association):

The knowledge that must be mastered is:

  • How to add a thread group
  • How to add http sampler
  • Learn and use the interface functions of http sampler
  • How to use and learn the view result tree component in the listener

It can be said that this is the basic necessity for interface testing. We call it Part A.

B: Interface testing involving cookie/session/parameterization/association

The necessary knowledge includes Part A and the following points:

  • http cookie manager
  • http header manager
  • Parameterization: csv data set config element usage
  • Association: regular expression extractor, json expression extractor

It can be said that the above points are necessary for advanced interface testing, which we call Part B.

C: Interface testing involving java code (for example, encryption algorithms need to be used or test results are stored in Excel)

The necessary knowledge includes parts A+B, as well as the following points:

  • Learning to use the beanshell sampler component
  • Basic java coding skills

Basically, if you master the three parts A/B/C, you can do a perfect job in interface testing. What we talk about here is what knowledge points need to be mastered or the use of components. It does not explain how to test. You can also see that depending on the protocol of the interface, the difficulty of the interface is different, and the knowledge we need to master is also different, so we need to do Good interface testing still needs to be broken down individually.

Here is a very good video recommended to everyone, from the use of basic components of Jmeter to the actual use of HTTP interface, covering the three parts A/B/C, and learning is driven by actual combat! If you need anything, you can leave a message!


 

おすすめ

転載: blog.csdn.net/a448335587/article/details/132677375