我有一个问题,如果我运行一个有6个步骤,3个传递,1个失败,2个跳过的测试 . 它将始终在我的范围报告中报告为通过 . 我正在使用Klov . 我可能没有正确配置报告吗?如果有的话,是否有人有解决此问题的建议 .

public class MyRunner {


@BeforeClass
public static void initialize(){
    d = new Date();

    ExtentProperties extentProperties = ExtentProperties.INSTANCE;

    extentProperties.setKlovServerUrl("http://localhost");
    extentProperties.setKlovProjectName("Test Project");
    extentProperties.setKlovReportName("Test Report: " + d);

    extentProperties.setMongodbHost("localhost");
    extentProperties.setMongodbPort(27017);
    extentProperties.setMongodbDatabase("klov");

}
}
@AfterClass
public static void teardown(ITestResult result){


    extent.flush();
}

}

这是我的测试,它只是一个简单的测试,打开谷歌登录页面,只是为了确保范围报告将做我需要的一切

public class Google {
WebDriver driver;

@Given("^that I am on the webpage Google$")
public void thatIAmOnTheWebpageGoogle() throws Throwable {
    System.setProperty("webdriver.chrome.driver","\\\\hiscox.nonprod\\profiles\\Citrix\\XDRedirect\\CaseyG\\Desktop\\chromedriver.exe");

    driver = new ChromeDriver();
    driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
    driver.get("https://accounts.google.com/signin/v2/identifier?hl=en&passive=true&continue=https%3A%2F%2Fwww.google.com%2F&flowName=GlifWebSignIn&flowEntry=ServiceLogin");
    driver.manage().window().maximize();
    MyRunner.logger.log(Status.INFO, "Opened Google login page")
    //throw new PendingException();
    //extent.createTest("Step 1").pass("log");
}

@When("^I try to login$")
public void i_try_to_login() throws Throwable {
    // find the username field and enters the username, then clicks next
    WebElement username = driver.findElement(By.xpath("//input[@id='identifierId']"));
    username.sendKeys("********");
    driver.findElement(By.id("identifierNext")).click();

    //finds the password field and enters the password
    WebElement password = driver.findElement(By.xpath("//input[@name='password']"));
    password.sendKeys("**********");
    Assert.assertFalse(true);
    driver.findElement(By.id("passwordNext")).click();
    //throw new PendingException();
    //extent.createTest("Step 2").pass("log");
}

@Then("^I will be successfully logged into Google$")
public void i_will_be_successfully_logged_into_Google() throws Throwable {

    String account = "Google Account: greg casey  \n" + "(klovtest@gmail.com)";
    //WebElement loggedInUser = driver.findElement(By.xpath("//*[@id="gbw"]/div/div/div[2]/div[4]/div[1]"))

    //*[@id="gbw"]/div/div/div[2]/div[4]/div[1]/a

    //extent.createTest("Step 3").pass("log");
    throw new PendingException();
}
}