MainService


Klicken Sie hier, um die vollständige Vorgangsliste anzuzeigen.

SaveTestCase

Saves changes to an existing test case or creates a new one.

If the Id of the provided test case is 0, then a new test case will be created. Otherwise the existing test case is updated. Updating the test case is subject to permission checks, a PermissionException will be generated in case the logged in user does not have the right permissions to access the test case.

Parameter '_saveSteps' controls whether steps hold in TestSteps collection should be saved (replacing existing ones) when updating existing test case.When creating a new test case this parameter must be 'true'. '_saveSteps' set to false (when updating existing TC) means all existing steps will remain unchanged.In order to save empty (or clear existing) list of TestSteps, please set _saveSteps=true and provide empty collection of TestSteps.

Parameter '_saveDescription' denotes whether rich text fields (e.g. rich text custom fields) should be considered during save.If true, then '_format' parameter specifies format in which text are being saved (html, rtf, plain-text). Text are converted to RTF representation automatically. If '_saveRichText' is false, then existing fields remain unchanged.



The method returns the TestCase in its state after it has been saved.

Test

Das Testformular ist nur für Anforderungen vom lokalen Computer verfügbar.

SOAP 1.1

Es folgt ein Beispiel für eine SOAP 1.1-Anforderung und -Antwort. Die angezeigten Platzhalter müssen durch tatsächliche Werte ersetzt werden.

POST /aquaAPI/mainservice.asmx HTTP/1.1
Host: aqua-demo2.andagon.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://aqua-api.andagon.com/SaveTestCase"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SaveTestCase xmlns="http://aqua-api.andagon.com/">
      <_session>string</_session>
      <_tc>
        <Usage>int</Usage>
        <TestLevel>int</TestLevel>
        <TestSteps>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
        </TestSteps>
        <LastExecutionDate>dateTime</LastExecutionDate>
        <LastExecutionStatus>NotRun or NotCompleted or Failed or Passed or Blocked</LastExecutionStatus>
        <LastExecutionHasAttachment>boolean</LastExecutionHasAttachment>
        <LastExecutionIsFinalized>boolean</LastExecutionIsFinalized>
        <LastExecutionId>int</LastExecutionId>
        <LastExecutionTestedVersion>string</LastExecutionTestedVersion>
        <ValidFor>string</ValidFor>
      </_tc>
      <_format>Html or HtmlWithEmbeddedImages or RtfWithoutImages or RtfWithImages or PlainText</_format>
      <_saveDescription>boolean</_saveDescription>
      <_saveSteps>boolean</_saveSteps>
    </SaveTestCase>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SaveTestCaseResponse xmlns="http://aqua-api.andagon.com/">
      <SaveTestCaseResult>
        <Usage>int</Usage>
        <TestLevel>int</TestLevel>
        <TestSteps>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
        </TestSteps>
        <LastExecutionDate>dateTime</LastExecutionDate>
        <LastExecutionStatus>NotRun or NotCompleted or Failed or Passed or Blocked</LastExecutionStatus>
        <LastExecutionHasAttachment>boolean</LastExecutionHasAttachment>
        <LastExecutionIsFinalized>boolean</LastExecutionIsFinalized>
        <LastExecutionId>int</LastExecutionId>
        <LastExecutionTestedVersion>string</LastExecutionTestedVersion>
        <ValidFor>string</ValidFor>
      </SaveTestCaseResult>
    </SaveTestCaseResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

Es folgt ein Beispiel für eine SOAP 1.2-Anforderung und -Antwort. Die angezeigten Platzhalter müssen durch tatsächliche Werte ersetzt werden.

POST /aquaAPI/mainservice.asmx HTTP/1.1
Host: aqua-demo2.andagon.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SaveTestCase xmlns="http://aqua-api.andagon.com/">
      <_session>string</_session>
      <_tc>
        <Usage>int</Usage>
        <TestLevel>int</TestLevel>
        <TestSteps>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
        </TestSteps>
        <LastExecutionDate>dateTime</LastExecutionDate>
        <LastExecutionStatus>NotRun or NotCompleted or Failed or Passed or Blocked</LastExecutionStatus>
        <LastExecutionHasAttachment>boolean</LastExecutionHasAttachment>
        <LastExecutionIsFinalized>boolean</LastExecutionIsFinalized>
        <LastExecutionId>int</LastExecutionId>
        <LastExecutionTestedVersion>string</LastExecutionTestedVersion>
        <ValidFor>string</ValidFor>
      </_tc>
      <_format>Html or HtmlWithEmbeddedImages or RtfWithoutImages or RtfWithImages or PlainText</_format>
      <_saveDescription>boolean</_saveDescription>
      <_saveSteps>boolean</_saveSteps>
    </SaveTestCase>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SaveTestCaseResponse xmlns="http://aqua-api.andagon.com/">
      <SaveTestCaseResult>
        <Usage>int</Usage>
        <TestLevel>int</TestLevel>
        <TestSteps>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
          <TestStep>
            <Name>string</Name>
            <StepType>Step or Condition or NestedTestCase</StepType>
            <Id>int</Id>
            <Description>string</Description>
            <ExpectedResults>string</ExpectedResults>
            <Version>int</Version>
          </TestStep>
        </TestSteps>
        <LastExecutionDate>dateTime</LastExecutionDate>
        <LastExecutionStatus>NotRun or NotCompleted or Failed or Passed or Blocked</LastExecutionStatus>
        <LastExecutionHasAttachment>boolean</LastExecutionHasAttachment>
        <LastExecutionIsFinalized>boolean</LastExecutionIsFinalized>
        <LastExecutionId>int</LastExecutionId>
        <LastExecutionTestedVersion>string</LastExecutionTestedVersion>
        <ValidFor>string</ValidFor>
      </SaveTestCaseResult>
    </SaveTestCaseResponse>
  </soap12:Body>
</soap12:Envelope>