Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <con:soapui-project activeEnvironment="Default" name="Sample REST Project" resourceRoot="" soapui-version="5.0.0-SNAPSHOT" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config">
- <con:settings/>
- <con:interface xsi:type="con:RestService" wadlVersion="http://research.sun.com/wadl/2006/10" name="Account creation" type="rest" basePath="/" definitionUrl="WSDL-WADL/sample-service.wadl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <con:settings/>
- <con:definitionCache type="TEXT"/><con:endpoints>
- <con:endpoint>http://localhost:8080</con:endpoint>
- </con:endpoints>
- <con:resource name="accountcreation" path="accountcreation">
- <con:settings/>
- <con:parameters/>
- <con:method name="Register a new account - viewAccountRegistration" method="GET">
- <con:settings/>
- <con:parameters/>
- <con:representation type="RESPONSE" id="">
- <con:mediaType>text/html</con:mediaType>
- <con:params/>
- <con:element xsi:nil="true"/>
- <con:description xsi:nil="true"/>
- </con:representation>
- <con:request name="Registration Form" mediaType="application/json">
- <con:settings>
- <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
- </con:settings>
- <con:endpoint>http://localhost:8080</con:endpoint>
- <con:request/>
- <con:originalUri>http://localhost/accountcreation</con:originalUri>
- <con:credentials>
- <con:authType>No Authorization</con:authType>
- </con:credentials>
- <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
- <con:jmsPropertyConfig/>
- <con:parameters/>
- </con:request>
- </con:method>
- <con:method name="Register a new account - createUserAccount" method="POST">
- <con:settings/>
- <con:parameters>
- <con:parameter>
- <con:name>username</con:name>
- <con:value xsi:nil="true"/>
- <con:style>QUERY</con:style>
- <con:default xsi:nil="true"/>
- </con:parameter>
- <con:parameter>
- <con:name>password</con:name>
- <con:value xsi:nil="true"/>
- <con:style>QUERY</con:style>
- <con:default xsi:nil="true"/>
- </con:parameter>
- </con:parameters>
- <con:representation type="REQUEST" id="">
- <con:mediaType>application/json</con:mediaType>
- <con:params/>
- <con:element xsi:nil="true"/>
- <con:description xsi:nil="true"/>
- </con:representation>
- <con:representation type="RESPONSE" id="">
- <con:mediaType>text/html</con:mediaType>
- <con:params/>
- <con:element xsi:nil="true"/>
- <con:description xsi:nil="true"/>
- </con:representation>
- <con:request name="Submit Registration Form" mediaType="application/json" postQueryString="false">
- <con:settings>
- <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting>
- </con:settings>
- <con:endpoint>http://localhost:8080</con:endpoint>
- <con:request/>
- <con:originalUri>http://localhost/accountcreation</con:originalUri>
- <con:credentials>
- <con:authType>No Authorization</con:authType>
- </con:credentials>
- <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
- <con:jmsPropertyConfig/>
- <con:parameters>
- <con:entry key="username" value="john"/>
- <con:entry key="password" value="w0j39av0d8s"/>
- </con:parameters>
- </con:request>
- </con:method>
- </con:resource>
- </con:interface>
- <con:testSuite name="Test account creation">
- <con:description>TestSuite generated for REST Service [Sample REST project (5.0)]</con:description>
- <con:settings/>
- <con:runType>SEQUENTIAL</con:runType>
- <con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="accountcreation TestCase" searchProperties="true" id="3923f7a8-171b-45cc-9b5d-a50bfa715f0a">
- <con:description>TestCase generated for REST Resource [accountcreation] located at [/accountcreation]</con:description>
- <con:settings/>
- <con:testStep type="restrequest" name="View Form">
- <con:settings/>
- <con:config service="Account creation" resourcePath="/accountcreation" methodName="Register a new account - viewAccountRegistration" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <con:restRequest name="View Form" mediaType="application/json">
- <con:settings/>
- <con:endpoint>http://localhost:8080</con:endpoint>
- <con:request/>
- <con:credentials>
- <con:authType>No Authorization</con:authType>
- </con:credentials>
- <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
- <con:jmsPropertyConfig/>
- <con:parameters/>
- </con:restRequest>
- </con:config>
- </con:testStep>
- <con:testStep type="restrequest" name="Submit Account Details">
- <con:settings/>
- <con:config service="Account creation" resourcePath="/accountcreation" methodName="Register a new account - createUserAccount" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <con:restRequest name="Submit Account Details" mediaType="application/json" postQueryString="false">
- <con:settings/>
- <con:endpoint>http://localhost:8080</con:endpoint>
- <con:request/>
- <con:credentials>
- <con:authType>No Authorization</con:authType>
- </con:credentials>
- <con:jmsConfig JMSDeliveryMode="PERSISTENT"/>
- <con:jmsPropertyConfig/>
- <con:parameters/>
- </con:restRequest>
- </con:config>
- </con:testStep>
- <con:properties/>
- <con:reportParameters/></con:testCase>
- <con:properties/>
- <con:reportParameters/></con:testSuite>
- <con:restMockService port="8080" path="/" name="Account creation mock" host="LPTWRK-ANDREAS">
- <con:settings/>
- <con:properties/>
- <con:restMockAction name="accountcreation" method="GET" resourcePath="/accountcreation">
- <con:settings/>
- <con:defaultResponse>Form view</con:defaultResponse>
- <con:dispatchStyle>SEQUENCE</con:dispatchStyle>
- <con:response name="Form View" httpResponseStatus="200" mediaType="text/html">
- <con:settings/>
- <con:responseContent><![CDATA[<html>
- <head>
- <meta charset="utf-8">
- <title>Account registration</title>
- <meta name="description" content="SoapUI Sample content">
- </head>
- <body>
- <h1>Welcome!</h1>
- <form action="accountcreation" method="post" name="account_registration_form">
- <input type="text" name="username" placeholder="John Doe" />
- <input type="password" name="password" />
- <input type="submit" name="password" />
- </form>
- </body>
- </html>]]></con:responseContent>
- </con:response>
- </con:restMockAction>
- <con:restMockAction name="accountcreation" method="POST" resourcePath="/accountcreation">
- <con:settings/>
- <con:defaultResponse>Successful</con:defaultResponse>
- <con:dispatchStyle>SEQUENCE</con:dispatchStyle>
- <con:response name="Successful" httpResponseStatus="200" mediaType="text/html">
- <con:settings/>
- <con:responseContent><![CDATA[<html>
- <head>
- <meta charset="utf-8"/>
- <title>Account registration</title>
- <meta name="description" content="SoapUI Sample content"/>
- </head>
- <body>
- <h1>Welcome!</h1>
- <p>You have successfully registered your account!</p>
- </body>
- </html>]]></con:responseContent>
- </con:response>
- <con:response name="Already Existing User" httpResponseStatus="200" mediaType="text/html">
- <con:settings/>
- <con:responseContent><![CDATA[<html>
- <head>
- <meta charset="utf-8">
- <title>Account registration</title>
- <meta name="description" content="SoapUI Sample content">
- </head>
- <body>
- <h1>User already exists</h1>
- <p>A user has already registered with the selected username - try another.</p>
- </body>
- </html>]]></con:responseContent>
- </con:response>
- <con:response name="Internal Server Error" httpResponseStatus="500" mediaType="text/html">
- <con:settings/>
- <con:responseContent><![CDATA[<html>
- <head>
- <meta charset="utf-8"/>
- <title>Internal Server Error</title>
- <meta name="description" content="SoapUI Sample content"/>
- </head>
- <body>
- <h1>The server was unable to serve your request</h1>
- <p>Due to some technical error the server was unable to complete the request, pleas come back later.</p>
- </body>
- </html>]]></con:responseContent>
- </con:response>
- </con:restMockAction>
- </con:restMockService>
- <con:requirements/><con:properties/>
- <con:wssContainer/>
- <con:databaseConnectionContainer/><con:oAuth2ProfileContainer/>
- <con:reporting><con:xmlTemplates/><con:parameters/></con:reporting><con:sensitiveInformation/>
- </con:soapui-project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement