0
嗨,我是詹金斯的新手。Jenkins构建成功通过集成测试后不会停止
我在本地机器上配置Jenkins,运行良好。
我需要问什么时候我的集成测试(用Junit编写)通过,Jenkin不会停止构建并继续。
但是在日志中它显示测试用例已通过并且没有发现错误。
有人可以请建议任何解决方案如何停止jenkins构建?
我的代码:
package com.workshop.airport.workshop.airport;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import cucumber.api.java.After;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.When;
public class PageStepsDefs {
public String ChromeDriverPath="C:\\Users\\zain.jamshaid\\Desktop\\chromedriver.exe";
public WebDriver webdriver;
String localhost="http://www.google.com";
public PageStepsDefs(){
System.setProperty("webdriver.chrome.driver",ChromeDriverPath);
webdriver = new ChromeDriver();
}
@Given("^I browse to the (.+) page$")
public void open_page(String url)
{
webdriver.get(localhost+url);
System.out.println(localhost+url);
}
@When("^I click on the button (.+)$")
public void click_On_Menu(String Id)
{
webdriver.findElement(By.id(Id)).click();
System.out.print(Id);
}
@After
public void close_browser(){
webdriver.close();
}
}
我还附上的詹金斯控制台日志
任何帮助将是真棒截图。
谢谢!
你停止所有子进程的脚本启动?哈德森可能正在等待子进程退出 – Jayan
嗨Jayan, 我相信我已经停止了所有的进程,你可以看看我的代码。我已经添加了它。请看一看。 – Zain