Issue on Running JUnit Selenium tests in Jenkins - maven

I'm beginner by using Selenium and Jenkins. So here is my problem.
I got on a Linux VM, jenkins which is installed and got plugins : JUnit attachment and filesystem_SCM.
I got in a folder of that VM the java files containing my selenium tests.
I would to execute from jenkins those scripts executing on a windows machine where Selenium RC is turning on.
How could I do that ? I've seen Selenium grid plugin or just tried to create a job with a shell command containing mvn instruction but I don't really understand what to do ? Does someone could help me ?

What I believe you'll want to do is to configure a Windows Machine (VMs are terrific for this) as a Selenium Slave machine and then have your tests executed there. In this scenario, your Jenkins Master (the linux VM) would trigger the slave (the windows VM) to execute the build.
In Jenkins you can do this by having the Slave execute your build that runs the tests via JUnit. You can either configure executing the tests as a separate build in Jenkins, or simply as a build step in your main build.
Here's some relevant Links:
Jenkins Distributed Builds
Setting up Master and Slave Machines in Jenkins

Related

How to set automatic download dependencies to JMeter slave machines from JMeter Maven Plugin

I was using <jmeterExtensions> tag to specify the dependency plugins although the dependencies are not getting downloaded for slave machines where It is required to manually download them in slave machine. Is there any solution to download dependencies to slave machines as well.
This is not handled by jmeter-maven-plugin and I don't think it can be implemented there.
So the option would be to run a kind of warmup on every machine using remote ssh and launching maven on it.
You could try to automate this using Ansible.
See this blog for more details on using the plugin.

Jenkins pipeline and Chef for Continues Deployment

I'm working on scenario, Jenkins is my CI tools and Maven is my build tool, ere I will be configuring the Jenkins pipeline through Jenkins file, but after the build steps are done, I want to deploy and install the artifacts (i.e .Jar files or some other) using chef(cookbooks-recipies) on the nodes, I was confused how can I achieve this process ! please help me
Thanks.
This question is way too vague to get a useful answer, and even if you make it more specific it's a very very broad question. I've got a write-up of my most recent build of this at https://coderanger.net/jenkins/, feel free to crib from it in part or in full.
Jenkins pipeline setup for the continues integration and Deployment, My only confusion was how Jenkins and chef are going to communicate in this process, after the continue integration, I want the chef to take over and install the Jar packages and deploy them on the several nodes. Here maven is my build tool. In Jenkins pipeline I can setup until the build is done , is there any thing that I can do in the Post section of the pipeline for the chef communication for deployment or it has to be done from the chef/cookbook/recipes/name.rb, is there any Jenkins plugin that make it possible !
Check chef plugin that lets you
run chef-client on remote host.
In Jenkins, deploy to a container plugin will help you to deploy your code to any of the workstation and use knife to upload into chef server and get deployed to all the nodes

Running integration tests remotely with maven

How can I run integration tests on an environment other than the one I'm building (running maven) from? I suppose I should use the failsafe plugin, but how would it find the artifact remotely, run the tests and return results?
Specifically: I want to run my tests on a controlled environment, a docker container, regardless of building from the build server or a dev machine.

Can a Jenkins Maven build be executed on separate servers?

Specifically, have the Jenkins instance running on a Linux server execute a Maven build on a Windows server
Yep, you can have a master-slave relation with another box: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds
If you only want launch a maven build there without setting up a slave, you can install the ssh plugin, configure ssh access on the Windows box, and then remotely execute the maven build

Jenkins Inegration with TestNG.(when running from jenkins it's not invoking browser)

My project contains (Webdriver,Maven3.05,jenkins) when I run maven command "mvn test" , test will trigger and browser will be invoked, the same set when i had configured using jenkins it will run the tests but browser will not be invoked.Please help me where iam going wrong.(I had installed testng plugin for jenkins all necessary configurations are taken care).
Try starting jenkins using the command line:
java -jar jenkins.war
Usually in Windows not all the services are allowed to use the interface
Hope helps!

Resources