Search code examples
sshcommand-linejmeterwgetkeytool

Jmeter - Connection SSH - Convert wget and keytool


I'm trying to create a jmeter test. In this test, I have to do these steps:

  1. Create a connection SSH, with username and password;
  2. Run an alias in this server;
  3. Change the repository (cd.., cd conf);
  4. Run this command wget -e use_proxy=yes -e http_proxy=URL_Proxy URL, and save the response of this command;
  5. Run this command keytool -list -keystore file_keystore –alias “Alias”, and save the response of this command;

Can I have your assistence? Thanks


Solution

  • There is SSH Command Sampler plugin which you can use to connect to the remote server and execute an arbitrary command. The plugin can be installed using JMeter Plugins Manager:

    enter image description here

    Once you install the plugin you will be able to use SSH Command sampler for execution of shell commands on the remote machine:

    enter image description here

    Check out How to Run External Commands and Programs Locally and Remotely from JMeter article for more details

    The output of the SSH Command sampler can be stored via Save responses to a file listener.