0

I am using ANT (build tool) to run jmeter functional scripts. I want to get the hostname or website name where all my jmeter scripts are running.

I have checked the jmeter.properties file to do some changes but no luck but no luck.

Prakash Palnati
  • 3,231
  • 22
  • 35

2 Answers2

3

I fixed and I want to share solution.

I have uncommented the configuration in jmeter.properties.

jmeter.save.saveservice.hostname=true

so that the hostname will be written to the jtl file and from the jtl file, i got it by xpath as below,

/testResults/httpSample/@Host

Thats it, you can use this as xsl variable for reporting or for any purpose.

Prakash Palnati
  • 3,231
  • 22
  • 35
1

You can use below inbuilt functions in JMeter.

  • ${__machineName} - to get the machine name
  • ${__machineIP} - to get the IP address
vins
  • 15,030
  • 3
  • 36
  • 47