gecatcht! realtime.at ist NICHT Inhaber dieser Domain, diese Domain kann über uns nicht mehr erworben werden. Für Fragen zur Domain wenden Sie sich bitte direkt an den Domaininhaber laut Whois.

Post published:July 4, 2014 Post Author:Mattias Severson Post Category:Java / Testing / Web Post Comments:80 Comments Spring Boot brings about some welcome defaults configurations that significantly decreases the development time of Spring projects. It also has some useful additions when it comes to simplified integration testing. Traditionally, one would use the build script to fire up an embedde
以前、Spring MVC 3.2のSpring MVC Testを触ったでSpring MVC 3.2から導入されたSpring MVCのテストを紹介しましたが、今回はJSONのテストについて紹介します。 今回のアプリケーションもGitHubに上げています。いろいろなSpringのサンプルをまとめています。 https://github.com/kuwalab/SpringSample Eclipse 4.3でMaven+WTPのプロジェクトとして作成していますので、その環境であればプロジェクトをimportすることですぐに使えます。 サンプル中のspring_mvc32_json_testフォルダをEclipseのプロジェクトとしてインポートしてください。 テスト用のアプリケーション テスト用のアプリケーションとして、簡易書籍管理アプリケーションを作ります。今回はJSONのテストのため
SpringBootで作ったWebアプリのユニットテスト こちらを参考に作り始めたのですが、動かすまでは簡単にできたのですが、ユニットテストの方法が良くわからなかったので調べてみました。 あと、テストにはやっぱりSpockを使いたかったので、その辺も調べました。 Webアプリを作成 公式サイトのチュートリアル通りにやれば一直線です。迷うところは特にありません。 Spockも使うつもりだったので最初からGroovyで作っています。 HelloController.groovy package la.urau import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestMethod import org.springfram
This post shows how to do integration testing of a ReST service as part of Gradle build process, using Spock to implement the test and Docker to make required database available. It’s build upon the example project described in my previous blog post. Following technologies are used: ReST service is implemented with Spring Boot Database is MongoDB running in Docker container Gradle used to build an
Spring Framework 3.2 introduces a very elegant way to test Spring MVC controller using MockMvc. Based on the documentation, there are two ways to configure MockMvc:- MockMvcBuilders.webAppContextSetup(webApplicationContext).build() MockMvcBuilders.standaloneSetup(controller).build() The first approach will automatically load the Spring configuration and inject WebApplicationContext into the test.
Last updated: May 13, 2025 I started to write a new version of my Spring MVC Test tutorial. When this tutorial is finished, it describes how you can write both unit and integration tests for Spring MVC controllers by using the Spring MVC Test framework (aka Spring MockMvc) and JUnit 5. At the moment, my new Spring MVC Test tutorial consists of these blog posts: Introduction and Unit Testing Introd
Integration Testing of Spring MVC Applications: Migrating to Spring 3.2 When Spring Framework 3.2 was released, spring-test-mvc was officially included in this release under the name Spring MVC Test Framework. Although many things remained the same, there are some changes that might cause confusion when we are migrating our applications from Spring Framework 3.1 to 3.2. This blog entry was written
Integration Testing of Spring MVC Applications: REST API, Part Two This is the fifth part of my spring-test-mvc tutorial and it describes the integration testing of a REST API that is implemented by using Spring MVC 3.1. During this tutorial we will continue writing integration tests for a simple REST API that provides CRUD functions for todo entries. This blog entry concentrates on two controller
Integration Testing of Spring MVC Applications: REST API, Part One This is the fourth part of my spring-test-mvc tutorial and it describes how we can write integration tests for a REST API that is implemented by using Spring MVC 3.1. During this tutorial we write integration tests for a simple REST API that provides CRUD functions for todo entries. This blog entry concentrates on three controller
Author: Petri Kainulainen Published: November 4, 2012 40 comments This is the third part of my spring-test-mvc tutorial and it describes how we can write integration tests for controller methods that are processing form submissions. During this tutorial we will continue writing integration tests for a simple todo application. This tutorial concentrates on two functions that are used to create new
Spring Bootは単体テスト機能もついてます。 35. Testing Spring Bootでコントローラの単体テストをするには、まず単体テストのクラスをアノテーションでいろいろ飾ってやる必要があります。 package okazuki.validationEdu; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnit; import org
Spring Bootの1.2.0正式版がリリースされ、中で使っているSpringも4.0から4.1になりました。 SpringMVCも4.1になったわけですが、一つ興味深い変更がありました。 それが@RequestParamのOptional対応です。 SprinMVCでは、クエリ文字列の値をメソッドの引数にバインドするための @RequestParamアノテーションは、何も書かないと「必須項目」と見なされてしまいます。 @RestController public class HelloController { @RequestMapping("/") public String hello(@RequestParam("name") String name) { if (name != null) { return "Hello, " + name; } else { return
Groovy ユーザーグループのイベントでタイトルに Grails とありながら groovy も grails も gradle も使わないハンズオンに行ってきました。 Grails 3.0先取り!? Spring Boot入門ハンズオン - 日本Grails/Groovyユーザーグループ | Doorkeeper 157 ページに及ぶ入魂のスライドはこちら。 Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot from makingx 所感 一日分くらいの内容を二時間で駆け抜ける超高濃度ハンズオン Web サービスを上手かつユニークに活用 入力するコードはすべて gist にアップロードされていて、スライドに貼られた bit.ly の URL をクリックしてコピペすれば OK という至れり尽くせり仕様 Same Origin Policy を突
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く