1. file i/o
import os,shutil #print os.getcwd() sourceRootFolder="D:\Automation\TestSuites\polaris" count=0 filecount=0 for f in os.listdir(sourceRootFolder): tmpdir=os.path.join(sourceRootFolder, f) if f.startswith("T"): count=count+1 newpath=os.path.join(tmpdir,"Scenarios") print (newpath) for sf in os.listdir(newpath): if os.path.isfile(os.path.join(newpath,sf)) and sf.endswith(".xml") : filecount=filecount+1 print (count," test suites in total") print (filecount,"test Scenarios in total")
时间: 2024-10-29 01:34:24