
utilities.allure.AllureBatchGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AUTOTESTIMATIC-JAVA Show documentation
Show all versions of AUTOTESTIMATIC-JAVA Show documentation
An open-source Selenium Java-based Test automation Framework that allows you to perform multiple actions
to test a web application's functionality, behaviour, which provides easy to use syntax,
and easy to set up environment according to the needed requirements for testing
package utilities.allure;
import org.apache.commons.lang.SystemUtils;
import utilities.LoggingManager;
import java.io.*;
import java.nio.file.*;
public class AllureBatchGenerator {
private AllureBatchGenerator(){
}
public static void generateBatFile(){
Path file;
if(SystemUtils.IS_OS_WINDOWS) {
file = Paths.get("generateAllureReport.bat");
}
else {
file = Paths.get("generateAllureReport.sh");
}
if(!Files.exists(file)){
try {
Files.writeString(file,"@echo off\n", StandardOpenOption.CREATE, StandardOpenOption.APPEND);
Files.writeString(file,"allure serve target/allure-results\n", StandardOpenOption.CREATE,
StandardOpenOption.APPEND);
Files.writeString(file,"pause\n", StandardOpenOption.CREATE, StandardOpenOption.APPEND);
Files.writeString(file,"exit", StandardOpenOption.CREATE, StandardOpenOption.APPEND);
} catch (IOException e) {
LoggingManager.error("Unable to create Allure Batch File" + e.getMessage());
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy