RegTest-GitIntegration-GitHubCredentials-Repo-VM-RAPI-W10X64

  • D4_850575
    了解作者
  • 5.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 04:04
    上传日期
RegTest-GitIntegration-GitHubCredentials-Repo-VM-RAPI-W10X64
RegTest-GitIntegration-GitHubCredentials-Repo-VM-RAPI-W10X64-master.zip
  • RegTest-GitIntegration-GitHubCredentials-Repo-VM-RAPI-W10X64-master
  • settings.xml
    2.1KB
  • element.order
    11B
  • TestSuite
  • settings.xml
    397B
  • element.order
    14B
  • TestCase.xml
    2.6KB
  • project.content
    24B
  • reports
  • settings.xml
    192B
内容介绍
<?xml version="1.0" encoding="UTF-8"?> <con:testCase id="5cbe1fd5-0050-4ce9-8c47-ae2dfafa21b3" discardOkResults="false" failOnError="true" failTestCaseOnErrors="true" keepSession="false" name="TestCase" searchProperties="true" timeout="0" xmlns:con="http://eviware.com/soapui/config"> <con:settings> <con:setting id="5cbe1fd5-0050-4ce9-8c47-ae2dfafa21b3fileName">TestCase</con:setting> </con:settings> <con:testStep type="groovy" name="Groovy Script" id="ab36d8b4-a60e-438a-aee5-ca351821d246"> <con:settings/> <con:config> <script><![CDATA[import com.smartbear.ready.core.ReadyApiCoreModule; import java.util.Properties; def getBuildDate() { Properties buildInfoProperties = new Properties(); String buildTimestamp; String version; buildInfoProperties.load(ReadyApiCoreModule.class.getResourceAsStream(ReadyApiCoreModule.READY_API_BUILDINFO_PROPERTIES)); buildTimestamp = buildInfoProperties.getProperty('build.date'); version = ReadyApiCoreModule.getVersion(); return version + ' Build Date: ' + buildTimestamp; } def findFiles(String folderPath, String nameContains, String extension) { def dir = new File(folderPath) def foundFiles = dir.listFiles(new FilenameFilter() { public boolean accept(File dir1, String name) { return name.toLowerCase().endsWith(extension)&&name.toLowerCase().contains(nameContains.toLowerCase()); } }) return foundFiles; } def findValueInList(def list, def value) { def i; for (i = 0; i < list.length; i++) if (list[i].toLowerCase().contains(value.toLowerCase())) return i; return -1; } def readScenarioResultsFromFiles(String folder, List files, List perfValues) { def i, j; def foundFiles; def fileObj; def fileString; def CurValue; List results = []; results.add(getBuildDate()); for (i = 0; i < files.size; i++) { foundFiles = findFiles(folder, files[i], '.csv'); log.info foundFiles.toString(); for(j = 0; j < perfValues.size; j++) { if (foundFiles.length > 0) { fileObj = new File(foundFiles[0].toString()); fileString = fileObj.getText('UTF-8').toString(); results.add(getPerfValueFromString(fileString, perfValues[j])); } else results.add(''); } } return results; } def isArrayHasOnlyEmptyStrings(List array) { for (i = 1; i < array.size; i++) if (array[i] != '') return false; return true; }]]></script> </con:config> </con:testStep> <con:properties/> <con:reportParameters/> </con:testCase>
评论
    相关推荐