I am trying to run a QTP test from Hudson as Hudson gives a way to run multiple QTP scripts on multiple slaves at the same time.
As a proof of concept, I need to to run one QTP scripts from Hudson and produce the results in Hudson using HTML publisher plugin.
So far I have done following:
1. I have written a QTP script for proof of concept.
2. I have written a VB Script code and put that in a .vbs file in c drive. This code will invoke QTP and pull the required test on QTP, execute it and save the HTML result in a specified location.
3. I have created a .bat file in c drive which will run the .vbs file (.vbs file will invoke QTP and run the test).
4. I have created a project in Hudson and only Master is running the build.
I am facing difficulties in configuring the project. Under Build section I have chosen "Execute Windows Batch Command".
I want to know what command I need to specify to run the .bat file as above?
Could someone please help?
Thanks,
Robert
cmd /C C:\<path-to-your-bat>
You are not setting up your build well, though - everything is hard-coded. You need flexibility as far as paths are concerned. I hope you'll fix it after you are done with your POC.
Related
Basically Jenkins is calling a bat file which is proprietary and does some compilation.
Calling the file directly from command prompt works fine. However when Jenkins calls the bat file it cannot find environment variables it needs and an error is thrown that the value is unknown.
I know if I could edit the bat file I could circumvent the issue, but the file is proprietary so that is not an option. Any thoughts?
Disclaimer: Been a while since I used it (and Jenkins).
Back in the day we did this with the EnvInject plugin. Worked quite well as far as I remember it.
(Jenkins newb-newb-newbie here)
Hi there.
I have a Maven project, deployed on Jenkins . In this project, I have an integration test, which depends on a .Net server in order to be run correctly.
The problem is, when I'm trying to build my project on Jenkins, the integration test fails, because the .Net isn't launched...
I need to execute a shell script (for launhing the .Net server) before building my project.
So my question is : how can I launch a script of my project before building from Jenkins?
Theres a build step Execute Windows batch command which you could use to start your server.
You might have to use START to have it launched in a separate process, so your build continues without waiting for the server process to finish, and you might need to put in some delay in case your server needs some time to settle before your tests can run.
You might also need to kill your server after your tests are done, you might be able to use tasklistand taskkill in another Execute Windows batch command build step, and some batch magic to do this.
I've been tasked to install and figure out how to use the JMeter Aggregator plugin for Bamboo on a locally built vagrant server with Bamboo on it on my machine so I can learn how to use it before putting it on the project that I'm working on's Bamboo instance but I can't figure out how to get the Aggregator plugin to actually read any of the test results properly so it keeps failing the assertions.
Currently, I've just set up a JMeter test through the gui client and saved the .jmx to my jmeter folder on the vagrant server so I can run it headless from a bash script and send the results to a .jtl file in another directory. Below is the bash script:
I've got the Aggregator plugin installed and I've pointed it to the resulting .jtl file but when I try and put any assertions on it, it breaks the build and says the assertion failed because the value was 0, which is not actually the case. Below is the current configuration I've got on the plugin - I've tried changing the filepath to an absolute one but that didn't fix it so I don't know if it's pointed at the wrong file or if it needs to be XML to do anything with the data it gets out?
If anyone could offer any guidance on this, I'd really appreciate the assist - been struggling with this for a couple of days now and there's precious little in the way of documentation on it...
I know it is an old post, I recently came across a similar issue.
hope this helps.
Bamboo looks for .jtl files in working directory of the job. So instead changing directory give absolute/relative path of the JMeter executable file changing the command to
bash <path to jmeter executable>jmeter -n -t <path to jmx>/steve.jmx -l results.jtl
While giving Build log file path use expression like
**/<file_name>.jtl (for picking up specific file)
or you can also use
**/*.jtl (to pickup all files available in working dir).
When executing Team Foundation commands in a free-style Jenkins job on a Windows Slave (within a 'Execute Windows Batch command' section), the successful execution of a command will cause that build step of batch commands to exit regardless of whether there are other commands remaining after the tf.cmd call.
For example, to create a new workspace and then map that workspace, I need 2 individual instances of 'Execute Windows Batch command' build steps. Placing both these commands in the same build step will result in only the first being executed.
Does anyone know why this might be happening and how to resolve it (other than the current workaround of many build steps).
Thanks.
Note: The TF plugin does not fit my needs for this particular Jenkins job because the plugin does not allow gets from labels.
Since there isn't another answer for a while, I recently found a different workaround that resolves this issue a bit nicer.
When calling the tf.cmd, use call before the command. This allows multiple tf commands to be executed in the same Jenkins window.
Example:
call tf.cmd workspaces /format:brief /server:http://servername
I have a shell script that runs lcov (test coverage) on an iOS project that I have Hudson. Hudson's copy of this project is derived from a Git repository. The way that I have set up now is that whenever the repo is updated or if someone manually builds the project in Hudson, Hudson would automatically run the app, and then run my shell script after the build is done. lcov can only be run after the app is not only built, but automatically run with some functional test tools. So, I cannot run the shell script as part of the build process, through XCode. It must be run after the app finishes building and running.
However, I would like to use this project in multiple Hudson jobs. Unfortunately, in each Hudson job, the iOS project is named differently. I would like to refer to the build path with some sort of environmental variable, but I don't know how to. Does anyone have any tips as to how to find that?
If I understand you correctly this is really a Hudson question. You can set "global variables" in your Hudson config and then invoke shell scripts, batch files, ant builds etc. You can also set them dynamically on each invocation of your Hudson job. Not sure exactly how to help you in your specific environment without more info.