Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:53:34+00:00 2026-05-26T08:53:34+00:00

I just threw together a quick Spring MVC app as a demo to replace

  • 0

I just threw together a quick Spring MVC app as a demo to replace an internal app in my department.

Now I’m supposed to demonstrate how Test Driven Development works in relation to Spring MVC.

Unfortunately I didn’t use TDD to build the demo and I’m not sure where to get started with it.

I’m using Maven for the build – are there any Maven-based testing frameworks that are easy to get started with in Spring MVC and that have good tutorials?

Where do I start?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:53:35+00:00Added an answer on May 26, 2026 at 8:53 am

    Because TDD has an huge influence how the code and methods are written, it is in most complex situations impossible to fake it!
    I mean if you do TDD then the code will be written in a kind that is is easy to test. If you don’t do TDD the code will be hopefully testable too, but in a complete different way. — So if you have some experience in TDD you will see the difference in the code.

    So if there is not to much code and this TDD thing is a really serious requirement, then throw the code a way and do it again.


    Anyway if you do it again or not the tools you need will be the same:

    You will need a test framwork: Go with Junit 4, because it is best supported by Spring (see Spring Referece: chapter 9 Testing).

    The integration in Maven is very easy:

    Put the test cases under `src/test/java’ and then (but this dependens on your style) in a parallel package structure to the classes under test. All you need is the maven-sure-fire plugin.

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.10</version>
      </plugin>
    

    May you want to do some mocking than have a look at easyMock or Jmock or Mockito.

    If you need to do integration tests, that access your application through its fronted than have a look at: Selenium2/Webdriver – Therefore you need to start the server first, for example Maven-Cargo will help you. But a warning: to get your first web base integration test running, that starts the server automatically and deploy the application automatically is a hard task, and will may take you more than one day.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a c# windows form app I threw together. It's fairly simple:\ inputs:
I just threw this together to help in debugging some PHP scripts. As you
I've just started debugging my first three line long android app and I can't
I've seen a lot of blogs where authors discuss throwing together quick benchmark tests,
I was trying to throw a quick WCF WebAPI project together up on AppHarbor
I've just started with Three.js. Like really just now. After playing with it for
I've got a legacy app just starting to misbehave, for whatever reason I'm not
I am trying to throw together a quick Remote Console server in the next
We have a small c# tool that we threw together to parse a data
Try this sample code I threw together to illustrate a point: <?php $url =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.