You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+20-43Lines changed: 20 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,37 +5,34 @@
5
5
:source-highlighter: prettify
6
6
:project_id: gs-testing-web
7
7
8
-
This guide walks you through the process of creating a Spring application and then testing
9
-
it with JUnit.
8
+
This guide walks you through the process of creating a Spring application and then testing it with JUnit.
10
9
11
10
== What You Will Build
12
11
13
-
You will build a simple Spring application and test it with JUnit. You probably already
14
-
know how to write and run unit tests of the individual classes in your application, so,
15
-
for this guide, we will concentrate on using Spring Test and Spring Boot features to test
16
-
the interactions between Spring and your code. You will start with a simple test that the
17
-
application context loads successfully and continue on to test only the web layer by using
18
-
Spring's `MockMvc`.
12
+
You will build a simple Spring application and test it with JUnit.
13
+
You probably already know how to write and run unit tests of the individual classes in your application, so,
14
+
for this guide, we will concentrate on using Spring Test and Spring Boot features to test the interactions between Spring and your code.
15
+
You will start with a simple test that the application context loads successfully and continue on to test only the web layer by using Spring's `MockMvc`.
You can use this https://start.spring.io/#!type=maven-project&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=testing-web&name=testing-web&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.testingweb&dependencies=web[pre-initialized project] and click Generate to download a ZIP file. This project is configured to fit the examples in this tutorial.
28
+
You can use this https://start.spring.io/#!type=gradle-project&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=testing-web&name=testing-web&packageName=com.example.testingweb&dependencies=web,spring-restclient[pre-initialized project] and click Generate to download a ZIP file. This project is configured to fit the examples in this tutorial.
32
29
33
30
To manually initialize the project:
34
31
35
32
. Navigate to https://start.spring.io.
36
33
This service pulls in all the dependencies you need for an application and does most of the setup for you.
37
34
. Choose either Gradle or Maven and the language you want to use.
38
-
. Click *Dependencies* and select *Spring Web*.
35
+
. Click *Dependencies* and select *Spring Web* and *HTTP Client*.
39
36
. Click *Generate*.
40
37
. Download the resulting ZIP file, which is an archive of a web application that is configured with your choices.
0 commit comments