我正在尝试从我的MyTest()
文件中调用build.gradle
测试方法。我如何从build.gradle
文件中调用以下课程?我对Java和gradle
public class Test{
public void MyTest() throws IOException, InterruptedException {
String filePathString=System.getProperty("user.dir")+"\\target\\site\\serenity\\index.html";
Path path = Paths.get(filePathString);
System.out.println("*********************Path of file***********************************"+path);
try {
if (Files.exists(path)) {
System.out.println("File Found");
}
else{
System.out.println("File not Found");
}
}catch (Exception e) {
e.printStackTrace();
}
}