-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSample-REST-Project-soapui-project.xml
210 lines (205 loc) · 9.23 KB
/
Sample-REST-Project-soapui-project.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?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>