1
테스트가 중단 되어도 결과가 나타나지 않습니다.testng 및 gradle - 교착 상태 테스트의 결과를 확인 하시겠습니까?
출력을 실시간으로 볼 수있는 방법이 있습니까?
당신에게 미샤 감사테스트가 중단 되어도 결과가 나타나지 않습니다.testng 및 gradle - 교착 상태 테스트의 결과를 확인 하시겠습니까?
출력을 실시간으로 볼 수있는 방법이 있습니까?
당신에게 미샤 감사좋아, 난 아직 공식적으로이 작업을 수행하지만, 난 그냥 표준 출력 및 오류 리디렉션하는 방법에 대해 아무 생각이 :
/**
* Redirect standard output and error to appropriate files
*/
public void redirectStandardOutputAndErrorToFiles(className) {
def outFile=new File(System.getProperty("java.io.tmpdir")+File.separator+className+".out.log")
if (outFile.exists()) {
outFile.delete()
}
def errFile=new File(System.getProperty("java.io.tmpdir")+File.separator+className+".err.log")
if (errFile.exists()) {
errFile.delete()
}
def out=new PrintStream(new FileOutputStream(outFile))
def err=new PrintStream(new FileOutputStream(errFile))
System.setOut(out)
System.setErr(err)
}
당신은에 테스트 작업에 다음 지시문을 추가 할 수 있습니다
build.gradle:
test {
testLogging.showStandardStreams = true
}
: 출력 표준 스트림을 말해