DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Launching the NoMock Movement

Launching the NoMock Movement

Antonio Goncalves user avatar by
Antonio Goncalves
·
Dec. 06, 12 · Interview
Like (0)
Save
Tweet
Share
4.26K Views

Join the DZone community and get the full member experience.

Join For Free

 Everything started when Eve said ‘No‘ when God told her not to eat the fruit. Then my daughter said ‘No‘ when I told her to clean her room. Then we had a bunch of guys saying ‘No‘ to SQL. Then I read Is there such a thing as the NoMock movement?… And today I’m saying let’s launch the NoMock Movement ( ‘No‘ meaning Not Only of course ;o)

Have you ever felt uncomfortable surrounded by a group of people who all agree and you don’t ? Feels strange doesn’t it. You think ‘what’s wrong with me ?‘. That’s exactly what I felt all these years with Unit Testing and Mocking. Everybody was unit testing, everybody was mocking… and I was questioning the relevance of so much mocking. Through my customers’ projects I’ve seen everything from zero test coverage to complex unit tests with more mocks than code to test. But everybody agreed that mocking was the way to go, so I did the same (BTW, thank you Mockito for showing me the way, your framework rocks).

Then in memory databases arrived (but some were still mocking DB access). Then in memory web servers arrived (but some were still mocking HTTP requests). Then Microsoft decided to do a 64 bits OS so we could have more memory. Then in memory containers arrived (but some where still mocking container services). Then Arquillian arrived. So while everybody was mocking I took all these new tools and started to write more and more integration tests, less unit tests and less mocks.

So now I’m officially launching the NoMock Movement (‘Not Only Mocks Movement’). This movement is for people stopping being ashamed of not mocking every single aspect of their code and starting to write more integration tests. Join the movement, don’t be ashamed and repeat after me : Stop mocking, start testing !

What are the concrete actions of this movement ? For now it’s just buying the nomock.org domain name and pointing it to my own website (isn’t that arrogant !) and then I’ll see what to do with it when I have some free time (a GitHub site where everybody can aggregate resources about integration testing would be good, so you can all contribute). I’ve also created the NoMockMov Twitter account and will use it to promote integration testing (by re-tweeting any useful article/blog/resource).

And now, go back to coding (real code)

References :

  • Is there such a thing as the NoMock movement?
  • Mocks are a Mockery
  • Stop Mocking, Start Testing
  • Dan Allen on Arquillian Testing Framework
  • What You Test Is What You Run

Disclaimer : of course I use unit tests and mocks, I’m just saying that today we can also use integration tests.

Disclaimer bis : Take a laugh, not everything in life has to be taken seriously ;o)

unit test

Published at DZone with permission of Antonio Goncalves, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Fraud Detection With Apache Kafka, KSQL, and Apache Flink
  • ChatGPT: The Unexpected API Test Automation Help
  • How To Check Docker Images for Vulnerabilities
  • Express Hibernate Queries as Type-Safe Java Streams

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: