Web service framework—SoapUI研究

Web service framework—SoapUI研究

  最近接触到 web service的一些事情,是基于脚本的自动化的一个 测试过程,主要用到的是 SoapUI(groovy script)。
  SoapUI的在线文档是一个很好的资源,基于此,有一些简单的应用分享。
  有兴趣可以研究一下,自己也是一个在 学习的过程,一点学习笔记分享给大家。
  Here is a sample presented that how to run  test case in soapUI project and save data into DB
   Process:
  1.       Load properties file or DataSource so that fetch corresponding data
  2.       Set a request with parameters populated(data derive from properties or DataSource)
  3.       Through transfer property to save data into external files or DB
  4.       Using DataSink to export data to external files(such as excel,txt) or DB(need to connect DB)
  Screenshot of structure of one TestSuite:
Web service framework—SoapUI研究_第1张图片
   Step1: Load files( here I load file from properties file)
Web service framework—SoapUI研究_第2张图片
  PlaceName=Houston
   Step2: with data populated request
  (get data from properties under Form format)
Web service framework—SoapUI研究_第3张图片
   Step3: transfer data to target
  Also can transfer the designated data from original source to target( click on here)
Web service framework—SoapUI研究_第4张图片
  Step4: save data fetched into DB
  Need to connect database from DB list, here I select mysql as my db.
  Firstly you should download mysql-connector-java.zip from mysql website,after that, you should copy mysql-connector-java.jar to [JAVA_HOME]/ eviware/soapUI-Pro-3.5.1/jre/lib/ext, then configure connection and test it, if ok, you would fill in sql to insert data to table, as following:
Web service framework—SoapUI研究_第5张图片
  Step5: query mysql db and check if the data have been saved in DB
Web service framework—SoapUI研究_第6张图片
English »
AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBengaliBelarusianBulgarianCatalanChinese (Simp)Chinese (Trad)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKannadaKoreanLaoLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTamilTeluguThaiTurkishUkrainianUrduVietnameseWelshYiddish  
Options :  History :  Help :  Feedback
Text-to-speech function is limited to 100 characters

你可能感兴趣的:(Web service framework—SoapUI研究)