Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

0- This process requires 2 VMs. Both VMs should be accessible from each other. Here we'll provide instructions for VM1 setup and then on VM2 setup.


1- Install the basic packages on VM1 and VM2.

Code Block
languagebash
firstline1
titlebasic_packages
$ sudo apt-get update
$ sudo apt-get install -y openjdk-8-jdk docker docker-compose zip unzip curl wget ssh telnet maven
# make sure docker can be launched with normal user
$ sudo groupadd docker
$ sudo gpasswd -a $USER docker
$ newgrp docker


Policy API VM Setup: VM1

2- Download and build policy API and its docker image.

...

Code Block
languagebash
titleStatistics API
$ curl --user healthcheck:zb\!XztG34 -H “Accept=application/json, Content-Type=application/json” -k https://10.12.6.93:6969/statistics
{"code":200,"totalApiCallCount":0,"apiCallSuccessCount":0,"apiCallFailureCount":0,"totalPolicyGetCount":0,"totalPolicyPostCount":0,"totalTemplateGetCount":0,"totalTemplatePostCount":0,"policyGetSuccessCount":0,"policyGetFailureCount":0,"policyPostSuccessCount":0,"policyPostFailureCount":0,"templateGetSuccessCount":0,"templateGetFailureCount":0,"templatePostSuccessCount":0,"templatePostFailureCount":0}


JMeter VM Setup: VM2

5- Install JMeter on VM2.

Code Block
languagebash
titleJMeter Install
$ cd ~/
$ wget http://mirrors.whoishostingthis.com/apache//jmeter/binaries/apache-jmeter-5.0.zip
$ unzip apache-jmeter-5.0.zip 


6- Run JMeter Stability Tests.

      Jduration is time in seconds to run the tests.

      Jusers is the number of threads to be started.

    Results of the run are stored in stability.log file.

    To check for any failures search for any "failed"/"Failed" message.

Code Block
languagebash
titleStability Tests
# Go into the directory where stability tests are placed.
~/apache-jmeter-5.0/bin/jmeter.sh -n -t stability.jmx  -Jretry=200 -Jduration=3600 -Jusers=1 -l stability.log
cat stability.log | grep "failed"