How to pass output from UFT test to Jenkins console - jenkins

Does anybody experience or any idea with pass output from UFT test to Jenkins console?
I started a UFT test through Jenkins and I use *.mtbx files for pass parameters from Jenkins to test but now I need some data (for example order id or phone number) from test pass to Jenkins console.
Is there any option?
Thanks

Only alone option is to write a file in run time and enter your data in it.
At the end of exectution, you should call the same file through jenkins.
Regards,
Prem Padayachi

Related

JMeter did not execute the properly the # of users using Jenkins parameterization

I set up a Jenkins to integrate the JMeter script. Using the Freestyle project in Jenkins, I enabled "This project is parameterized" to set a String parameters for the Threads, Loop_Count and Think Time.
In .jmx file, I used the Function Parameters function to define those
variables, as shown below image:
User Defined Variable
In Jenkins, I configured the parameterization as shown below:
Set Parameterization
Command Line
However, when running the test for 40 users using the Build parameter in Jenkins, it looks like the # of threads/users are not correct that is being executed, the Samples that are being generated only 3 for most of the pages. Only the Homepage (which is the first page on the test) is only getting the correct # of Samples, but the rest of the URLS/pages are not correct. Below the actual output.
Output
Can you please help what might the causing this issue, I already checked the Jmeter script and jenkins config and appears to be correct but still I'm getting the issue. Thanks for the help.
Setting parameters in Jenkins itself is not sufficient to pass them to JMeter, you need to pass this parameterized value to JMeter startup script via -J command-line argument
-Jusers=%users%
End-to-end demo:
More information: Apache JMeter Properties Customization Guide

how to add Jenkins job parameters into system variable of a windows PC

I am trying to figure a way to add my Jenkins job parameters displayed in job configure page into slave node (windows PC).
So meanwhile if anyone know How to add Jenkins job parameters into system variable of a windows PC.
Please do share it.
Consider the following use case:
You set up a test job on Jenkins, and it accepts a distribution bundle
as a parameter and perform tests against it. You want to have
developers do local builds and let them submit builds for test
execution
on Jenkins. In such a case, your parameter is a zip file that contains
a distribution.
Your test suite takes so much time to run that in normal execution you
can't afford to run the entire test cycle. So you want to control the
portion of the test to be executed. In such a case, your parameter is
perhaps a string token that indicates that test suite to be run. The
parameters are available as environment variables. So e.g. a shell
($FOO, %FOO%) or Ant ( ${env.FOO} ) can access these values.
Example:
my.prop=${env.BAR}
More info at here

Read Jenkins log in shell

I have a requirement that I need to parse the Jenkins job after the completion to grep out the error log and send it in email to the team. Could someone of you suggest what plugin/option is available in Jenkins?
If you want to parse out the console output after the build steps, try using Groovy Postbuild Plugin.
You can use the manager.logContains function or the manager.build.logFile variable to get the console output.

Access Jenkins build log within build script

How would you go about accessing contents of the build (console) log from within a running build script?
I have a deploy script that runs, logs into a series of servers and runs scripts on those servers. I need to obtain certain output from some of those remote scripts and use them later in the build process and also in the completion email.
You can do something like this in the Post Build section, but I don't think you can do it earlier in the job. With the groovy post build plugin you can get information from the console log:
if(manager.logContains("text to find")) {
do something
}

Hudson job running as wrong user

I have a Hudson build job which runs a script called 'testUser.sh' which contains only one command: 'whoami'. The first line of the console output says 'Started by user ctisbuild', but the output of the whoami/testUser.sh script is 'root'.
Any idea what's going on? This used to be working properly, I don't know what changed to cause this.
Thanks
I guess you are running hudson as root from the command line? Using java -jar hudson.war?
The "Started by user ctisbuild" is the user if of the user that trigger the build, the person who clicked on "Build Now". This is not the userid that Hudson will use. This user id is specified in the /etc/default/hudson as HUDSON_USER
For more details read the hudson wiki

Resources