Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance test for graphQL API

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 questions about it:

  1. What is the best way to perform the automation API and performance testing?
  2. Does Jmeter support graphQL API?
like image 757
Raviv Lior Avatar asked Oct 30 '17 07:10

Raviv Lior


1 Answers

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

1. Set up HTTP Request

enter image description here

2. Set up HTTP Headers

enter image description here

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

enter image description here

like image 142
Yuci Avatar answered Oct 20 '22 05:10

Yuci