Professional Documents
Culture Documents
Made Easy
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 2
Testing!Challenges
! No User Interface
! Combination of Several
Components
! Integration Layers
! Coverage
! Security
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 3
Why!SoapUI?
! WSDL Service Inspection
! REST Service Inspection
! WSDL Service Invocation
! REST Service Invocation
! Web Service Development and Validation
! Web Service Functional Testing
! Web Service Load Testing
! Web Service Simulation
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 4
Functional!Web!Services!Testing
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 5
SoapUI!And!Groovy
! Scripting your test with Groovy
! The Groovy Script Editor
! Add a Properties step
! Read back from the properties file and assign
the values to the properties step
! Script Execution
! Groovy Script Examples
! SoapUI GroovyUtils
! Parse the response from the request using
Groovy and assert
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 6
Groovy!Examples
today = new Date()
sdf = new java.text.SimpleDateFormat("yyyy-MM-dd")
todayStr = sdf.format(today)
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 7
SoapUI!and!Ant
! Command line tools
! com.eviware.soapui.tools.SoapUITestCaseRunner
! Generating JUnit Reports
! Reporting and Exporting Functional Web Service Tests
<property name="soapui-location" location="C:/dev/soapUI-2.5/bin"/>
<property name="soapui.project.file" location="Weather-soapui-project.xml"/>
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 8
SoapUI and JUnit
<junitreport todir="${soapui-report-dir}">
<fileset dir="${soapui-report-dir}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${soapui.html.dir}" />
</junitreport>
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 9
Code!Coverage
Measuring code coverage
• Facilitates understanding
what’s not tested
• Promotes collaboration
between development
and QA
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 10
Code!Coverage!Tools
Java .NET
• Cobertura • NCover
• Clover • Clover.NET
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 11
Using!Cobertura!With!Ant
! Instrument your code
! Deploy instrumented code
! Run Tests
! Generate Reports
! Generate coverage report
<target name="instrument" depends="build">
<cobertura-instrument datafile="${cobertura-data-dile}" todir="{classes.dir}">
< fileset name="**/*.class" />
</fileset>
</cobertura-instrument>
</target>
<target name="coverage-report“
<cobertura-report datafile="${cobertura-data-file}" srcdir="${src.dir}
destdir="${coverage.xml.dir}" format="xml" />
<cobertura-report datafile="${cobertura-data-file}" srcdir="${src.dir}"
destdir="${coverage.html.dir}" />
</target>
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 12
Continuous!Integration
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 13
Integration!With!Hudson
! Configure Hudson Job
! Force a Build
! Publish the Coverage
Report
! Publish the SoapUI JUnit
Reports
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 14
Having!Trouble?
msubbarao@cigital.com
© 2006 Cigital Inc. All Rights Reserved. Proprietary and Confidential. Sunday, March 08, 2009 15