Tag: robotium

如何将输出写入到robotium的Excel中?

我已经使用POI将输出写入Excel。 我的代码在一个正常的Android应用程序中完美工作。 但是当我运行应用程序作为Android J单位写入Excelfunction不起作用。这里是我在robotiumtesting项目中使用的条件 if (solo.getButton("Submit").isShown()){ new TestResult().resultToExcel("/mnt/sdcard/Test_output.xls",0, "TC_memory1", "passed","testcase passed",6); } else { new TestResult().resultToExcel("/mnt/sdcard/Test_output.xls",0, "TC_memory1", "failed","testcase failed",6); } 任何人都可以提出一个方法来使用robotium将输出写入excel文件。

读取一个excel的内容并使用我的Robotiumtesting用例中的值

我想写一个代码,其中,我正在阅读一个Excel的内容,我必须使用从Excel中的值,并将其传递给我的Robotiumtesting用例。 这是我的代码: ReadExcel类://读取第3列第2行的值以及第4列和第2行的值 公共类ReadExcel { private String user,pass; public void read() throws BiffException, IOException { Workbook wrk1 = Workbook.getWorkbook(new File("D:/Robo/Book1.xls")); Sheet sheet1 = wrk1.getSheet(0); Cell username = sheet1.getCell(2,1); // the username from the excel Cell password = sheet1.getCell(3,1); // the password from the excel setUser(username.getContents()); setPass(password.getContents()); } public void setUser(String user) { this.user = user; […]

testing完成后,生成Android JUnittesting用例的结果

我有一个Android JUnittesting用例,它使用Robotium自动化我的android应用程序的整个functionstream程。 但是,我想要的是,一旦testing运行完毕,我需要将结果写入文本文件,最好是写入Excel表格,并在其中写入“Pass”或“Fail”来对付不同的testing用例。 期待您的帮助! 提前致谢!