Spring Web Application Integration Testing

I need to perform integration tests in my web application for each build.

I currently have a set of JUnit tests that test various parts of an application before it goes into war. Now I need to check if the application is in good shape after it is deployed in a web container.

The application is written using the Spring framework, I read a lot of documents on testing Spring integration, but they all talk about testing integration with databases, etc. I read about Cactus, but the information is also pretty scarce.

Any pointers to good tutorials and source code are welcome.

Details of the software used by the application: Spring 2.5, Hibernate 3.2, Maven 2.2, Tomcat 6.0

Many thanks!

+3
source share
1 answer

You have two tasks to solve: A) Get a container running in an automatic (maven-based) process, and B) run some tests against it.

We use selenium and maven-jetty-plugin to test a fairly similar installation of the application. It works like a charm. You can find the same plugins for tomcat, or just run in the pier.

The advantage of selenium is that it allows you to test the application in a very real environment using a real browser. You may find that tools that skip part of the “real browser” are easier to start with.

+2

Source: https://habr.com/ru/post/1715611/


All Articles