我如何在jmeter中运行本地php文件来强调本地数据库?

时间:2019-05-01 18:58:20

标签: php jmeter localhost

我想使用带有选项HTTP请求的 /home/fractaluser/Desktop/Dev/cache/env/lib/python3.5/site-packages/pymongo/topology.py:150: UserWarning: MongoClient opened before fork. Create MongoClient only after forking. See PyMongo's documentation for details: http://api.mongodb.org/python/current/faq.html#is-pymongo-fork-safe "MongoClient opened before fork. Create MongoClient only " /home/fractaluser/Desktop/Dev/cache/env/lib/python3.5/site-packages/pymongo/topology.py:150: UserWarning: MongoClient opened before fork. Create MongoClient only after forking. See PyMongo's documentation for details: http://api.mongodb.org/python/current/faq.html#is-pymongo-fork-safe "MongoClient opened before fork. Create MongoClient only " 来强调本地数据库,我创建的PHP文件可以工作,但是我不知道如何在jmeter中运行PHP。 / p>

我希望插入操作会在数据库中完成,但不会发生。

2 个答案:

答案 0 :(得分:0)

您的意思是您的本地计算机上托管了PHP应用程序,该查询具有一个查询,当您按下http://127.0.0.1:8000/index.php之类的URL时,就会在数据库中插入一条记录?

如果是,那么就像使用JMeter进行的任何常规网站测试一样。我建议您按照互联网上的教程进行操作。

https://guide.blazemeter.com/hc/en-us/articles/207421695-JMeter-Video-Tutorial-writing-your-first-JMeter-script-

https://www.blazemeter.com/blog/getting-started-scripting-jmeter

答案 1 :(得分:0)

您绝对可以在本地使用JMeter,只需创建一个测试方案即可。

主要步骤是:

  1. 添加线程组
  2. 添加HTTP请求
  3. 添加听众
  4. 运行Jmeter测试
  5. 清除测试结果

如果您连续多次启动测试,请不要忘记#5,否则结果可能会令人困惑。

万一这仍然让您感到困惑,您可以使用许多教程来创建第一个JMeter场景available on YouTube