TestCases Example

After defining the TestSuite elements, define TestCases. A TestCase is a series of tests using which you can determine whether or not a particular operation works properly.

The TestCases defined in the configuration file refer to the soapUI project XML file. Therefore, define the <ns:SOAPUILookup> tag after the <TestCase> tag. The <ns:SOAPUILookup> tag executes all the steps defined under a particular TestCase.

BaseActions TestCase

The BaseActions TestCase contains three main actions that must be executed sequentially - creating an enterprise, creating an user, and uploading metadata. These actions are a part of the BaseActions TestCase that is already defined in the soapUI project XML file. Hence, in the configuration file, define the BaseActions TestCase under the SoapUILookup tag. To upload metadata, specify the file from where the metadata is to be uploaded. Specify the Attachment tag. The following example defines the BasicOperationsTestCase:

<ns:TestCase abortOnError="true" failTestCaseOnError="true" socketTimeOut="900000">
       <ns:Name>BasicOperations</ns:Name>
       <ns:ExternalProperties>
       </ns:ExternalProperties>
       <ns:SOAPUILookup>
             <ns:TestSuite>Master Suite</ns:TestSuite>
             <ns:TestCase>BaseActions</ns:TestCase>
       </ns:SOAPUILookup>
<ns:Attachment>
<ns:testStep>UploadMetadata</ns:testStep>
<ns:url>metadata/Metadata.jar</ns:url>
</ns:Attachment>
</ns:TestCase>