0
我在用java编写selenium webdriver的测试,我用TestNG将它与testlink集成在一起。所以当我运行测试并且运行正确时,它在testlink中正确保存。但是当测试失败时,测试中出现以下错误:测试失败时出现TestLink错误
testlink.api.java.client.TestLinkAPIException:调用者未提供所需的参数状态。
这是我的测试方法:
@Parameters({"nombreBuild", "nombrePlan", "nomTL_validacionCantidadMensajes"})
@Test
public void validarMensajes(String nombreBuild, String nombrePlan, String nomTL_validacionCantidadMensajes) throws Exception {
String resultado = null;
String nota = null;
boolean test;
try{
homePage = new HomePageAcquirer(driver);
homePage.navigateToFraudMonitor();
fraud = new FraudMonitorPageAcquirer(driver);
test = fraud.validarCantidadMensajes();
Assert.assertTrue(test);
if(test){
resultado = TestLinkAPIResults.TEST_PASSED;
}else {
nota = fraud.getError();
System.out.println(nota);
resultado = TestLinkAPIResults.TEST_FAILED;
}
}catch (Exception e){
resultado = TestLinkAPIResults.TEST_FAILED;
nota = fraud.getError();
e.printStackTrace();
}finally{
ResultadoExecucao.reportTestCaseResult(PROJETO, nombrePlan, nomTL_validacionCantidadMensajes, nombreBuild, nota, resultado);
}
}
XML被罚款怎么一回事,因为当测试通过它的工作原理。
并设置值的testlink方法。
public static void reportTestCaseResult(String projetoTeste, String planoTeste, String casoTeste, String nomeBuild, String nota, String resultado) throws TestLinkAPIException {
TestLinkAPIClient testlinkAPIClient = new TestLinkAPIClient(DEVKEY, URL);
testlinkAPIClient.reportTestCaseResult(projetoTeste, planoTeste, casoTeste, nomeBuild, nota, resultado);
}
感谢回复它的完美,将去看听者。 – elcharrua
根据你的个人资料 - 很高兴如果你upvote或接受答案,当你发现它有用,这将激励人们给你一些答案 –
对不起,我没有意识到我没有接受答案,谢谢你让我知道这一点。 – elcharrua