Tag: java

How to get PID and Port # for a Jenkins Process

I need to get PID & Port# for a Jenkins process run. If i get that PID, i can kill the process if ever i need to. I am running the Jenkins process by below commands: java -jar jenkins.war Sometimes, Jenkins Process fail to start if that port is taken and below occurs: Jenkins home […]

Jenkins Packages on Groovy Classpath?

When using the Groovy Jenkins plugin (not the Groovy Post Build Plugin, which is a different thing) as a Post Step, I can’t resolve classes in the hudson.model package. Do I need to add the Jenkins .war onto the classpath, or should these packages already be there? Script: import hudson.model.*; import hudson.util.*; AbstractBuild currentBuild = […]

Error in running cucumber-jvm selenium test cases in headless mode under jenkins build

Background I have a project desgined in spring-boot and maven. It contains cucumber-jvm selenium test cases which I want to run in headless mode in jenkins build. To do so, I have installed XVfb on jenkins build machine and also have made sure that Xvfb is running. $ps -ef | grep Xvfb root 3804 1 […]

Run custom database scripts in Jenkins

So far I’ve seen different options and jobs in Jenkins that were related to the build process. I wonder if there is a way to create a job that would connect to the database and run a script, that would perform some actions. Maybe, Jenkins could run a script file or just store some actions […]

JUnit tests failed executed as an ant target

I am trying to get code coverage using Cobertura plugin for Jenkins so I instrument, run tests and then coverage report in my build.xml as follow <?xml version=”1.0″ encoding=”UTF-8″?> <project name=”CoberturaAndJenkins” default=”default” basedir=”.”> <description>Builds, tests, and runs the project CoberturaAndJenkins.</description> <import file=”nbproject/build-impl.xml”/> <property name=”lib.dir” value=”lib/” /> <property name=”junit.file” value=”junit-4.11.jar” /> <property name=”cobertura.dir” value=”${lib.dir}/cobertura/” /> <property […]

Jenkins: Using validateButton on a class without Descriptor

I have a hudson.model.ManagementLink (which creates a page which can be accessed via Manage Jenkins. I have some form fields which I’d like to validate using the f:validateButton. If this were to be done on say the config.jelly page of a Publisher (which has a descriptor) a simple doXXX() method would work in the descriptor. […]

JSch session timeout limit

I’m using JSch 0.1.50 to set up a connection to the remote server for my CI Jenkins plugin. Let’s assume I’m trying to use here session.connect(60000); for the timeout 60 sec: Session session = null; try { JSch jsch = new JSch(); if (rsaIdentity != null && !rsaIdentity.equals(“”)) { jsch.addIdentity(rsaIdentity.trim()); } session = jsch.getSession(serverLogin, serverHost, […]

Maven run class before test phase: exec-maven-plugin exec:java not executing class

I am running jUnit4 tests, built with Maven, on a Jenkins box. My goal is to restore a test database before executing the tests. It looks like exec-maven-plugin is the way to go, but I cannot get it running. Any pointers? Although there are lots of examples, the doc on the mojo site is pretty […]

How do you run SOAP UI test suite with Commandline tool like Jenkins

I am new to soap ui and Jenkins how do you run soap ui test suites using Jenkins? how do you generate reports in soap ui?

Pass variable from jenkins to testng.xml

I want to run test cases depending on variables passed from jenkins for example, choose testcases you want to run : testcaseOne, testcaseTwo in pom.xml (maven) : <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <suiteXmlFiles> <suiteXmlFile>testng.xml</suiteXmlFile> </suiteXmlFiles> <systemPropertyVariables> <chooseCase>${chooseCase}</chooseCase> <–this dont work </systemPropertyVariables> <parallel>tests</parallel> <threadCount>10</threadCount> </configuration> </plugin> I have two testng @test methods: @Test(groups=”caseOne”) @Test(groups=”caseTwo”) And my […]

Git Baby is a git and github fan, let's start git clone.