Unable to start appium through Jenkins programatically. This works when running from Eclipse

Unable to start appium through Jenkins programatically. This works when running from Eclipse

Jenkins giving following error on the console. This doesnt give any details error report.
I am using appium version 1.7.1 CLI npm. getting following error

===============================================
Demo App Automation Testing
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1

The script is working fine when i manually start appium from CLI and run BUILD NOW from jenkin after commenting automatic appium start.

Do i miss any configuration settings. I have configured following items.

GIT_HOME :C:\Users\Hashili.MA\AppData\Local\Programs\Git\bin\git.exe
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_151
MAVEN_HOME : C:\apache-maven-3.5.2
NODEJS_HOME : C:\Program Files\nodejs

did u find any solution?

1 Like

Sorry for the late reply… I got the solution. U have mention the Appium.JS or Main.JS path on AppiumServiceBuilder()

Sample Code below.

	try {
		builder = new AppiumServiceBuilder();
		builder.withAppiumJS(new File(APPIUM_JS));
		builder.withIPAddress(serverURL);
		builder.usingPort(Integer.parseInt(APPIUM_PORT));
		builder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);
		//builder.withArgument(GeneralServerFlag.LOG_LEVEL,"error");

		//Start the server with the builder
		appiumService = AppiumDriverLocalService.buildService(builder);
		appiumService.start();
	}catch(Exception e) {
		LogUtil.error("Error on Appium server start! : "+e.getMessage());
	}

hey @hashili , i tried to workaround with every possible thing , but it didn’t work for me ,
Thanks anyways for the reply…