我想加载测试我的get请求
http://localhost:8080/v1/synonyms/project/?keyword=dealer
和测试方法是
@task(2)
def get_synonym(self):
response = self.client.get("/v1/synonyms/project/")
print("Response status code:", response.status_code)
print("Response content:", response.text)
答案 0 :(得分:2)
传递url中的查询字符串:
response = self.client.get("/v1/synonyms/project/?keyword=dealer")