Search in sources :

Example 1 with OutputFile

use of com.coveros.selenified.OutputFile in project selenified by Coveros.

the class OutputFileTest method createOutputHeaderVersionTest.

@Test
public void createOutputHeaderVersionTest() throws IOException {
    new OutputFile("newdirectory", "file", Browser.ANDROID, null, null, null, null, "My Version", null);
    File file = new File("newdirectory", "fileANDROID.html");
    Assert.assertTrue(file.exists());
    String content = Files.toString(file, Charsets.UTF_8);
    Assert.assertTrue(content.contains("My Version"));
    file.delete();
    new File("newdirectory").delete();
}
Also used : OutputFile(com.coveros.selenified.OutputFile) OutputFile(com.coveros.selenified.OutputFile) File(java.io.File) Test(org.testng.annotations.Test)

Example 2 with OutputFile

use of com.coveros.selenified.OutputFile in project selenified by Coveros.

the class OutputFileTest method recordActionBadFile.

@Test
public void recordActionBadFile() {
    OutputFile file = new OutputFile("/somenewdir", "file", Browser.ANDROID, null, null, null, null, null, null);
    file.recordAction("my action", "expected", "actual", Result.WARNING);
// we are just verifying that no errors were thrown
}
Also used : OutputFile(com.coveros.selenified.OutputFile) Test(org.testng.annotations.Test)

Example 3 with OutputFile

use of com.coveros.selenified.OutputFile in project selenified by Coveros.

the class OutputFileTest method packageResultsPositiveTest.

@Test
public void packageResultsPositiveTest() throws IOException {
    OutputFile outputFile = new OutputFile("results", "file", Browser.ANDROID, null, null, null, null, null, null);
    File directory = new File("results");
    File file = new File("results", "fileANDROID.html");
    System.setProperty("packageResults", "true");
    outputFile.finalizeOutputFile();
    System.clearProperty("packageResults");
    File results = new File("results", file.getName() + "_RESULTS.zip");
    Assert.assertTrue(results.exists());
    file.delete();
    results.delete();
    directory.delete();
}
Also used : OutputFile(com.coveros.selenified.OutputFile) OutputFile(com.coveros.selenified.OutputFile) File(java.io.File) Test(org.testng.annotations.Test)

Example 4 with OutputFile

use of com.coveros.selenified.OutputFile in project selenified by Coveros.

the class ResponseTest method checkNewResponseFileMessageTest.

@Test
public void checkNewResponseFileMessageTest() {
    Response response = new Response(new OutputFile("directory", "file", Browser.ANDROID, null, null, null, null, null, null));
    Assert.assertNull(response.getMessage());
}
Also used : Response(com.coveros.selenified.services.Response) OutputFile(com.coveros.selenified.OutputFile) Test(org.testng.annotations.Test)

Example 5 with OutputFile

use of com.coveros.selenified.OutputFile in project selenified by Coveros.

the class ResponseTest method createFile.

@BeforeMethod
public void createFile() {
    outputFile = new OutputFile("directory", "file", Browser.NONE, null, null, null, null, null, null);
    directory = new File("directory");
    file = new File("directory", "fileNONE.html");
}
Also used : OutputFile(com.coveros.selenified.OutputFile) OutputFile(com.coveros.selenified.OutputFile) File(java.io.File) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

OutputFile (com.coveros.selenified.OutputFile)12 Test (org.testng.annotations.Test)10 File (java.io.File)8 BeforeMethod (org.testng.annotations.BeforeMethod)2 Response (com.coveros.selenified.services.Response)1