CoDED-UI test failed when ran through Jenkins - visual-studio-2012

I am running a CODED-UI test as a command in my Jenkins workflow. This command works when executed in the server machine's cmd window but fails when executed through Jenkins with the error.
"Error calling Initialization method for test class xxx.xx.xx.CodedUITest.CodedUITest3: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process. For more information, see "How to: Set Up Your Test Agent to Run Tests That Interact with the Desktop" (http://go.microsoft.com/fwlink/?LinkId=255012)
If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process. For more information, see "How to: Configure and Run Scheduled Tests After Building Your Application" (http://go.microsoft.com/fwlink/?LinkId=254735)" .
I installed Testagents , selected the option to make it desktop interactive process but the error still persists. The user ID provided in the testagent is the same user ID used for calling the command.
Trying to figure out what else I am missing.
Command used : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MStest.exe /testcontainer:"E:\workspace\Microsoft\xxx\Publish\Test2.orderedtest"

You need to install test agent. You have a Jenkins Server and from tehre you are triggering the coded ui. For coed ui tests to run u have to install and mention the test agent where to run your test. that agent should have VSTS installed in it. You can have server and agent on same machine if needed.

Related

Differences between databricks dbx execute and launch command

I have a project for which I want to be able to run some entry points on databricks. I used dbx for that, having the following deployment.yaml file:
build:
python: "poetry"
environments:
default:
workflows:
- name: "test"
existing_cluster_id: "my-culster-id"
spark_python_task:
python_file: "file://tests/test.py"
I'm able to run the test script with the execute command:
poetry run dbx execute --cluster-id=my-culster-id test
My problem with this option is that it launches the script interactively and I can't really retrieve the executed code on Databricks, except by looking at the cluster's logs.
So I tried using the deploy and launch commands, such that a proper job is created and run on Databricks.
poetry run dbx deploy test && poetry run dbx launch test
However the job run fails with the following error, which I don't understand:
Run result unavailable: job failed with error message
Library installation failed for library due to user error. Error messages:
'Manage' permissions are required to modify libraries on a cluster
In any case, what do you think is the best way to run a job that can be traced on Databricks from my local machine ?
I've recently added a documentation section on the differences of execute and launch, would that be something that answers your question?

Running nodejs command on gocd pipeline

I created a new gocd pipeline and have three shell script files to run on different stages.
The problem is the go agent doesn't know npm.
Note: I have npm installed on the machine with go agent and I manually run the shell script from the pipeline.
Here is my shell script to install the packages.
#!/bin/sh
npm install
The error:
01:34:43.674 [go] Start to execute task: <exec command="./install.sh" />.
01:34:43.680 ./install.sh: line 3: npm: command not found
01:34:43.814 [go] Current job status: failed.
Problem
Assuming you have npm/nodejs installed on the agent, the problem probably lies in the fact the user doesn't have its PATH environment variable configured to look into the folder npm was installed in.
Solution
1) You can specify the whole path (/usr/bin/npm) when creating a task.
2) You can edit the .bashrc/.bash_profile of the user running the gocd agent server. In which case you'll be able to call '/usr/bin/npm' without the path prepended.
Example Working Configuration
Consider modification of the agent init script. Changing .bashrc/.bash_profile of the user running the gocd agent does not work because the go agent insulates itself from the calling environment. So on our systems we add these PATH items to the go agent startup scripts. (I use puppet to create agents. The default agent init scripts are not that good - you need to own them.)

cordova plugin add via git fails, but only from a TeamCity build agent process

Our cordova builds in TeamCity have started failing while adding plugins. The plugins that are fetched via npm work fine. There are a few which we still install via git for various reasons (haven't been added to the registry, internal/private, etc.)
The error we get is the infamous
fatal: Unable to find remote helper for 'https'
Questions about that error have been asked before, but the solutions to those questions have not helped, as this problem only exists in the context of a TeamCity build agent process spawning a cordova plugin add which in turn spawns the git clone (via node's child_process.spawn).
Some things we know so far
On the same build agent machine, as the build agent service account,
we can add this plugin at a command prompt with no issues.
On the same build agent, same service account, we can git clone the associated repo at the command prompt with no issue.
We altered the cordova source to log out the cmd, args,
and spawnOptions passed to child_process.spawn in superspawn.js. We watch
that fail from the TeamCity build agent process, but can send the
same args to child_process.spawn in our own node script and it clones fine. For what it's worth, here is the child_process.spawn line created from the args in the build log: child_process.spawn('C:\\Program Files\\Git\\mingw64\\bin\\git.exe ', ['clone','--depth=1', 'https://github.com/EddyVerbruggen/cordova-plugin-backgroundaudio','C:\\TeamCity\\buildAgent\\temp\\buildTmp\\git\\1448324988055' ], {});
We've confirmed that the build agent process is running the same
version of node, npm, and git as we have interactively at the
command prompt.
We don't see any environment variables in the build agent process
that seem relevant or different from what we have at an interactive
command prompt.
We've tried reinstalling git, node, and the build agent itself.
Nothing has seemed to help. I'm hoping that someone else has seen this before and can point us toward what we're missing. If not, I'll answer my own question once we get this sorted out.

Running SoapUI and HermesJMS on headless Linux Server

I'm trying to get SoapUI and HermesJMS to work with each other on a headless Linux server. And by "headless" I do mean headless; the only account we are authorized to use that has any kind of admin privileges is unable to forward an X-server session.
First, the steps I've done so far:
Unpacked the tar.gz containing SoapUI 4.6.0 into a soapui directory.
Using my own account, which has X-server, I ran the HermesJMS installer.
Set 777 permissions so the admin user could work with the files.
I entered the soapui-config.xml and test.xml files and told them where to find the hermes-config.xml
Independently, they both work. I can run a generic SoapUI test and if I use my X-server to run Hermes, I can see the queues I need to be using.
However, when I try to use the testrunner.sh, I get a NullPointer exception on HermesUtils.addHermesJarsToClasspath.
An error occured [java.lang.NullPointerException], see error log for details java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.addHermesJarsToClasspath(HermesUtils.java:120)
Any ideas on what the issue is? I tried running soapui's GUI the same way I ran Hermes' but I run into a segmentation fault on startup.

Running Karma from TeamCity

Does anyone know how you would run the following command within TeamCity? (the command is normally ran in a Node.js command window)..."Karma start karma.conf.js". I have successfully installed Nodejs on the TeamCity server. I have then successfully installed Karma on the same server (using npm install -g karma).
In TeamCity, my build step has "Runner type = Command Line", and the Custom Script is set to "FULLPATHOFKARMAEXE\karma.cmd start FULLPATHOFKARMACONFIGFILE/kara.conf.js"
When i run TeamCity, it comes back with the error "node is not recognized as an internal or external command"
Anyone know the step-by step process of running Karma within TeamCity?
In your case, the Karma installation seems to be OK, but your TeamCity agent process is unable to resolve the path to Node.exe (it's installation folder is missing from the %PATH% variable).
First verify the NodeJS installation by opening a Commandline window on the agent machine, type node and press enter:
c:> node
>
If the result in your Command window is a >-prompt, you might solve your problems by restarting the build agent.
If the result in your Command window is some error message saying "node is not recognized as an internal or external command", you need to add the NodeJS installation folder to the %PATH% variable, and restart the build agent.
You can, of course, just change the %PATH% for your build agent service by running a initialization script included in the NodeJS installtion folder in your build step. Depending on where your NodeJS installastion is, your custom script might look like this:
"C:\Program Files (x86)\nodejs\nodevars.bat"
"FULLPATHOFKARMAEXE\karma.cmd start FULLPATHOFKARMACONFIGFILE/kara.conf.js"

Resources