Selfhost webapi and access it from the unit test project

91 views Asked by At

We have a webapi project with 4 endpoints and we have a lot of acceptance tests written in JMeter. The problem is that now the JMeter file has more than 20 MB and when we have a conflict on this file while merging the branches, it is difficult to handle it correctly.

So, my question is: Is there a solution that while I run the unit tests, to selfhost somehow the api and make calls directly to my api and drop the JMeter alternative?

1

There are 1 answers

3
Dmitri T On
  1. If you're using JMeter for functional testing only you can consider switching to code-based library to make API requests, the most popular/advanced of them as of now seems to be RestAssured.
  2. Point 1 will require re-implementing tests from scratch, if you don't have time/budget for this you can consider refactoring your tests to remove duplicates or split your huge .jmx script into smaller parts using Test Fragments and Module Controller. Check out How to Manage Large JMeter Scripts With JMeter Test Fragments for more information.