Skip to content

Commit 77047a3

Browse files
1 parent d9441e6 commit 77047a3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

manual/working/scalaGuide/main/tests/ScalaTestingWebServiceClients.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
<!--- Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> -->
2+
<!--
23
# Testing web service clients
4+
-->
5+
# Web サービスクライアントのテスト
36

7+
<!--
48
A lot of code can go into writing a web service client - preparing the request, serializing and deserializing the bodies, setting the correct headers. Since a lot of this code works with strings and weakly typed maps, testing it is very important. However testing it also presents some challenges. Some common approaches include:
9+
-->
10+
Web サービスクライアントには、リクエストを待ち受け、ボディをシリアライズ・デシリアライズし、適切なヘッダを設定するなどといった、大量のコードが書き込まれます。こうした大量のコードが文字列や弱い型付けのマップを処理するので、テストはとても重要です。他方で、テストは多少の課題をも呈します。一般的には以下のようなアプローチがあります:
511

12+
<!--
613
### Test against the actual web service
14+
-->
15+
### 本番 Web サービスに対する試験
716

817
This of course gives the highest level of confidence in the client code, however it is usually not practical. If it's a third party web service, there may be rate limiting in place that prevents your tests from running (and running automated tests against a third party service is not considered being a good netizen). It may not be possible to set up or ensure the existence of the necessary data that your tests require on that service, and your tests may have undesirable side effects on the service.
918

0 commit comments

Comments
 (0)