Golide
Golide

Reputation: 1009

Jmeter test error : URI does not specify a valid host name

I have configured Jmeter in Jenkins pipeline but when the stage runs it appears as if the tests are not executing as expected and in the console output I can see an error Non HTTP response message: URI does not specify a valid host name: http:/http:10.XXX.XXX.XXX:32518/account?field4=3025202645050&field7=generic01&field10=abc098 . The URL is being intepreted incorrectly as it has http appearing twice.

This is part of the Jenkins pipeline :

pipeline {
agent any
triggers {
    githubPush()
}
environment { 
.......
   REPOSITORY_URI = "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_REPO_NAME}"
}
    stages {
......
.......
      stage ("UnitTest Report") {
                 steps{               
                         publishHTML target: [
          allowMissing: false,
          alwaysLinkToLastBuild: true,
          keepAll: true,
          reportDir: '/var/lib/jenkins/workspace/FlexToEcocash_main/IntegrationTests/BuildReports/Coverage',
          reportFiles: 'index.html',
          reportName: 'Code Coverage'
          ]
                   archiveArtifacts artifacts: 'IntegrationTests/BuildReports/Coverage/*.*'
                   }
             }
                stage ("Perfomance Test") {
                steps {
                         build job: 'EcoToFlexPerfomanceTests'     
                }
             }
    }
    
    }

The stage Perfomance Test triggers a Freestyle Job named EcoToFlexPerfomanceTests and this will be the one that runs Jmeter tests.

Part of the console output : JmeterConsole

Looking at the Performance Test Reports I am not sure if they are also showing the data correctly, they seem not populated as of now:

Jreports

Environment: Debian 10 Buster .Net 5 API running on k0s

What am I missing ?

Upvotes: 0

Views: 819

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

There is a problem with the URL of the HTTP Request sampler in your script:

enter image description here

It should look like:

http://10.XXX.XXX.XXX:32518/account......

so use Debug Sampler and View Results Tree listener combination to see all JMeter Variables with their values and correct the URL of the sampler and the problem should go away.

Upvotes: 1

Related Questions