使用Apache-JMeter测试Openstack平台性能:
1.新建项目。
2.新建进程组。
ADD--Threads--Threads Group。
3.新建sample。
ADD--sampler--HTTP Request。
4.新测试页面:
{"virtType":"kvm","name":"Lin${__RandomString(3,ewertuyiighjhjh)","count":1,"admin_pass":"Linabc123","network_id":"33bd45c1-6a68-4df1-8ddd-aacd7f8fc5e4","use_local":false,"flavor":"2","image_id":"2ed90d9a-012b-4cf5-b687-a845d28c3d0d","security_id":"cfad0183-8d84-4198-b160-a35d4f9585cf","availability_zone":"nova"}
5.使用浏览器F12查看token:
打开浏览器,按F12,查看图片及token。
6.HTTP Request设置请求值:
创建VM的Method 选择POST,PATH选:developer/v1/server。
{"name":"test-20180821","count":1,"admin_pass":"Linabc123","network_id":"33bd45c1-6a68-4df1-8ddd-aacd7f8fc5e4","use_local":false,"flavor":"4","image_id":"ea184ab0-867d-4466-90a8-1c8dd5f72963","security_id":"cfad0183-8d84-4198-b160-a35d4f9585cf","availability_zone":"nova"}
7.添加Listener。