Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want to understand test cases for spring mvc #2

Open
wants to merge 59 commits into
base: spring-3x-codebase
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f46d46b
Supporting the latest version spring 4.x
Jul 8, 2015
b3860f9
Supporting the latest version spring 4.x
Jul 8, 2015
e3a4cd7
Supporting the latest version spring 4.x
Jul 8, 2015
5b601ea
Supporting the latest version spring 4.x
Jul 8, 2015
5d05cfa
Supporting the latest version spring 4.x
Jul 8, 2015
bf8497c
Supporting the latest version spring 4.x
Jul 8, 2015
a31bce9
Supporting the latest version spring 4.x
Jul 8, 2015
26003b3
Supporting the latest version spring 4.x
Jul 8, 2015
91048e4
Supporting the latest version spring 4.x
Jul 8, 2015
3c2ecb8
Added spring boot feature
Jul 20, 2015
0373f6c
Added spring boot feature
Jul 20, 2015
bd2488c
Added spring boot feature
Jul 20, 2015
3fa27e7
Added my 1st commit
skprasadu Nov 21, 2015
976294f
Added my 1st commit
skprasadu Nov 21, 2015
bd4dc7d
Added my 1st commit
skprasadu Nov 21, 2015
046181e
Added new code base for automated formbuilder
skprasadu Dec 2, 2015
a75c737
changed the naming convension, created enabled, disable designer button
skprasadu Dec 3, 2015
1076fe9
changed the naming convension, created enabled, disable designer button
skprasadu Dec 3, 2015
f764fdc
modified database emit part
skprasadu Dec 4, 2015
8f3702b
modified database emit part
skprasadu Dec 4, 2015
292fee9
Added new emhancements to create dynamic forms
skprasadu Dec 4, 2015
66c38ae
removed some junk files
skprasadu Dec 4, 2015
7e54c68
removed some junk files
skprasadu Dec 4, 2015
b32af12
Update README.md
skprasadu Dec 5, 2015
f6f1c34
Update README.md
skprasadu Dec 5, 2015
919a8c7
Update README.md
skprasadu Dec 5, 2015
5f1e9e0
Update README.md
skprasadu Dec 5, 2015
f62a489
removed some junk files
skprasadu Dec 6, 2015
804acd5
Merge branch 'master' of https://github.com/skprasadu/spring-mvc-exam…
skprasadu Dec 6, 2015
a0e04f3
removed some junk files
skprasadu Dec 7, 2015
837786d
fixed few more bugs
skprasadu Dec 7, 2015
aba7580
added images
skprasadu Dec 7, 2015
455a21c
added images
skprasadu Dec 7, 2015
4fca4d0
added images
skprasadu Dec 7, 2015
8f4a39a
added save document capabilities
skprasadu Dec 10, 2015
d73b055
fixed most of the issue with saving a form
skprasadu Dec 11, 2015
666cead
fixed most of the issue with saving a form
skprasadu Dec 11, 2015
6a01ca2
fixed most of the issue with saving a form
skprasadu Dec 11, 2015
0697ae2
fixed most of the issue with saving a form
skprasadu Dec 11, 2015
a34f4f6
Implemented a major single pom architecture with database injection, …
skprasadu Dec 11, 2015
f5e18c6
Implemented a major single pom architecture with database injection, …
skprasadu Dec 11, 2015
98e8259
Implemented preview page
skprasadu Dec 11, 2015
8491515
fixed issue with Add new formbuilder
skprasadu Dec 13, 2015
1ad8699
Added quick formcreation
skprasadu Dec 13, 2015
61fa761
Implemented new changes around QuickFormEditing
skprasadu Dec 14, 2015
fd47e80
Implemented FormInformation return
skprasadu Dec 15, 2015
f9b1d6b
implemented quickforms and is working now
skprasadu Dec 15, 2015
32d1932
Implemented dropdown for lookup in DynamicUiService
skprasadu Dec 17, 2015
e26a552
implemented quickforms and is working now
skprasadu Dec 18, 2015
280f0e3
implemented drools
skprasadu Dec 21, 2015
7a85454
Succeeded all the test conditions
skprasadu Dec 29, 2015
9928802
Modified to add the data
skprasadu Dec 29, 2015
c30607f
implemented save feature
skprasadu Dec 29, 2015
eb1c930
Implemented validate save using Drools
skprasadu Dec 29, 2015
0219f07
Implementing Drools rules in h2 database
skprasadu Dec 31, 2015
51ece1a
implemented automation with json to generate sql
skprasadu Dec 31, 2015
15c830e
deleted the old dynamic forms project
skprasadu Dec 31, 2015
6438c9a
Added validation for Relationtional databases as well
skprasadu Jan 1, 2016
2eb9c26
there is still some issues with id, need to solve this
skprasadu Jan 1, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ bookstore-example-with-mvc-webflow/.classpath
bookstore-example-with-mvc-webflow/.project
bookstore-example-with-mvc-webflow/target
bookstore-example-with-mvc-webflow/bookstore.log

bookstore-spring-boot/.settings
bookstore-spring-boot/.classpath
bookstore-spring-boot/.project
bookstore-spring-boot/target
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Spring MVC
==========
Spring Boot, Java 8
===================

In this sample, we demonstrated a simple Bookstoree application using Spring MVC, [Kickstrap](http://ajkochanowicz.github.com/Kickstrap/). It demonstrate how to build a Spring MVC application using a TDD approach.
There is a new [spring_boot_form_builder](https://github.com/skprasadu/spring-mvc-examples/tree/master/spring_boot_form_builder) application refer [Wiki](https://github.com/skprasadu/spring-mvc-examples/wiki) for more details. It uses the latest [Spring Boot](http://projects.spring.io/spring-boot/) and [Spring Data](http://projects.spring.io/spring-data/).

Refer to this [blog](http://krishnasblog.com/2013/02/22/junit-testing-of-spring-mvc-application-introduction/) for more details.
Refer to this [blog](http://krishnasblog.com/2013/02/22/junit-testing-of-spring-mvc-application-introduction/) for initial draft details. But for latest changes refer [Wiki](https://github.com/skprasadu/spring-mvc-examples/wiki).
4 changes: 4 additions & 0 deletions bookstore-example-with-mvc-webflow/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
Spring WebFlow
==========

This code base supports latest Spring 4.1.7.RELEASE version.

In this sample, we demonstrated a simple Bookstore application using Spring MVC and Spring WebFlow, [Kickstrap](http://ajkochanowicz.github.com/Kickstrap/). It demonstrate how to build a Spring MVC application using a TDD approach.

* To run the WebFlow Layer testcase run

```
mvn clean test -Dtest=com.example.bookstore.web.controller.CreateOrderTest
```
220 changes: 94 additions & 126 deletions bookstore-example-with-mvc-webflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
<version>1.0</version>
<packaging>war</packaging>

<properties>
<springVersion>4.1.7.RELEASE</springVersion>
<springSwfVersion>2.4.1.RELEASE</springSwfVersion>
<springSecurityVersion>4.0.1.RELEASE</springSecurityVersion>
<tilesVersion>2.2.1</tilesVersion>
<hibernateVersion>4.1.9.Final</hibernateVersion>
<hibernateValidatorVersion>4.3.0.Final</hibernateValidatorVersion>
<commons-lang3-version>3.4</commons-lang3-version>
<h2-version>1.4.187</h2-version>
<itext-version>4.2.1</itext-version>
<jxl-version>2.6.12</jxl-version>
<jackson-mapper-asl-version>1.9.13</jackson-mapper-asl-version>
<commons-codec-version>1.6</commons-codec-version>
<junit-version>4.12</junit-version>
<selenium-version>2.46.0</selenium-version>
<javax.servlet-api-version>3.1.0</javax.servlet-api-version>
<jstl-version>1.2</jstl-version>
<mockito-all-version>2.0.2-beta</mockito-all-version>
<log4j-version>1.2.17</log4j-version>
<slf4j-api-version>1.7.12</slf4j-api-version>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -38,12 +59,6 @@
<version>${springVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${springVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
Expand All @@ -56,63 +71,27 @@
<version>${springVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.2</version>
<version>${commons-lang3-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.168</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectJVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectJVersion}</version>
<version>${h2-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<artifactId>hibernate-core</artifactId>
<version>${hibernateVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernateVersion}</version>
<scope>compile</scope>
</dependency>
Expand All @@ -128,46 +107,34 @@
<version>${hibernateValidatorVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehCacheVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
<version>${itext-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
<version>${jxl-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.11</version>
<version>${jackson-mapper-asl-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
<version>${commons-codec-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -176,6 +143,70 @@
<version>${springVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet-api-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>${jstl-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito-all-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-htmlunit-driver</artifactId>
<version>${selenium-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api-version}</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
Expand All @@ -194,12 +225,6 @@
<version>${springSwfVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
Expand All @@ -224,62 +249,5 @@
<version>${springSecurityVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-openid</artifactId>
<version>${springSecurityVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1-b06</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>${tilesVersion}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<springVersion>3.1.4.RELEASE</springVersion>
<tilesVersion>2.2.2</tilesVersion>
<springSecurityVersion>3.1.3.RELEASE</springSecurityVersion>
<springSwfVersion>2.3.2.RELEASE</springSwfVersion>
<hibernateVersion>4.1.9.Final</hibernateVersion>
<hibernateValidatorVersion>4.3.0.Final</hibernateValidatorVersion>
<ehCacheVersion>2.5.5</ehCacheVersion>
<aspectJVersion>1.7.1</aspectJVersion>
</properties>
</project>
20 changes: 14 additions & 6 deletions bookstore-example-with-mvc/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
Spring MVC
==========

This code base supports latest Spring 4.1.7.RELEASE version.

In this sample, we demonstrated a simple Bookstoree application using Spring MVC, [Kickstrap](http://ajkochanowicz.github.com/Kickstrap/). It demonstrate how to build a Spring MVC application using a TDD approach.

* To run the DAO Layer testcase run

```
mvn clean test -Dtest=com.example.bookstore.repository.JpaBookRepositoryTest
* To run the Service Layer testcase run
```

* To run the Service Layer testcase run
```
mvn clean test -Dtest=com.example.bookstore.service.AccountServiceTest
```
* To run the Controller Layer testcase run

```
mvn clean test -Dtest=com.example.bookstore.web.controller.LoginControllerTest
* To run the Selenium test for feontend run

mvn clean tomcat7:run
```
* To run the Selenium test for front-end run
```
mvn -DskipTests clean package tomcat7:run

In another window run

mvn clean test -Dtest=com.example.bookstore.web.frontend.SeleniumLoginFrontendTest
mvn test -Dtest=com.example.bookstore.web.frontend.SeleniumLoginFrontendTest
```


Loading