Performance test for graphQL API

前端 未结 7 1436
北恋
北恋 2021-02-04 20:07

Today I\'m doing my API automation testing and performance testing with Jmeter when the server is a REST API.

Now the development changed to graphQL API, and I have two

7条回答
  •  深忆病人
    2021-02-04 20:26

    I use Apollo to build the GraphQL server, and use JMeter to query the GraphQL API as below.

    1. Set up HTTP Request

    2. Set up HTTP Headers

    Depending on your application, you might also need to set up HTTP header Authorization for JWT web tokens, such as:

    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    3. Set up HTTP Cookie if needed for your app

    4. Run the test

提交回复
热议问题