문제

I want to print my test suite into file

def fileDir = new File("C:\\SoapUIResults");
if(!fileDir .exists()) {
    fileDir .mkdirs();
} def myFile= new File(fileDir , "myFile.txt");  //If the file does not already exist, we want to create it, otherwise we want to append 
if(!myFile.exists()) {    myFile.createNewFile(); }

myFile.append(testRunner.testSuite.name +'\n' );    //Test suite Name
도움이 되었습니까?

해결책

Your question is not clear for me, the only thing that I see wrong in your code is that you are missing testCase to access testSuite properties from testRunner, to do so you must use testRunner.testCase.testSuite.name instead of testRunner.testSuite.name.

If you are looking for a way to save all testSuite results on a file take a look on this answer

Hope this helps,

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top