Saturday 5 November 2016

SoapUI Tests : Integration with QC/ALM

The article aims to explain the steps needed to integrate your SoapUI tests with HP quality center/ALM.

Prerequisites 
  •  SoapUI 2.0.2 version or above installed
  • Access to Quality Center envelope where the tests are to be integrated.

Principle of the solution

  • The solution interface presented here is based on the performance of existing SoapUI tests.
  • SOAPUI scripts are launched from the VAPI-XP scripts of the automated test under Quality Center
  • VAPI-XP tests retrieve the status of the SOAP-UI tests and returns to PASSED or FAILED state in Quality Center.
  • SopaUI test must have a assertion available to be able to determine the passed or failed status.
  • SoapUI project saved as an XML file on your system.

Creation of the Script VAPI-XP

In the TestPlan view, create a test of type VAPI-XP-Test in the corresponding directory.




On the "New Test" window, select "VAPI-XP-TEST" from the template type, update the name of the test and click on OK.


Select the script language of the test (VBScript) and name of the script, then click Next.
 

Select the type of test (Console Application Test), then click Next.



Click on "Finish" in the next step



Select the "Test Script" tab on the test. 


Replace the code generated by the Quality Center with the one given below.


The VAPI script performs the following operations.
  • Create a timestamped directory containing the result of Soap script file if it is KO, errors are listed in the file are :
  • Launch Soap Script (function "doTest")
  • Check the presence of the log file of Soap Script. 
    • File Present : QC Test status = Failed 
    • File Absent : QC Test status = Passed. 

Do not forget to update the following values in Red

URITestSet : Location of the XML file describing SOAP-UI project.
    URITestSet = "C:\TestSoapUI\FoxSoapUI\xml\Fox1-soapui-project.xml"
    Remark : Do not pur space in the directory names

RepResultSoap : Location of the result files.
    RepResultSoap = "C:\TestSoapUI\FoxSoapUI\runs\"
    Remark : Do not pur space in the directory names

WshShell.CurrentDirectory : Location of the script to launch "testrunner.bat" (SoapUI 'bin' directory)
    WshShell.CurrentDirectory = "C:\Program Files\SmartBear\SoapUI-5.0.0\bin"
    Remark : The directory above is a standard installation of SoapUI 5.0.0 software.

1 comment: